ResizeObserver
Reports changes to the size of observed elements. Specification: drafts.csswg.org/resize-observer/.
Results
Probed on 2026-10-19 with Node.js v22.23.3.
warpdom 0.1.6
MissingNot defined in this engine's window.
Web IDL existence (coverage):
- ResizeObserver: interface not defined.
happy-dom 21.0.3
Partial1 of 2 checks work.
Web IDL existence (coverage):
-
ResizeObserver: interface present; 3 of 3 members present.
-
Observing a connected element delivers an initial entry for it, whatever its size. Resize Observer §3.1: new ResizeObservation sets lastReportedSizes to [(-1,-1)], and isActive() is true when the current size differs from it, which any size (0×0 included) does; §3.4.1 gathers active observations and §3.4.5 invokes the callback with their entries. HTML runs these in the event loop's "update the rendering" steps ("gather active resize observations", "broadcast active resize observations"). The intro sums it up: "Observation will fire when observation starts."
- Result:
no entry delivered (waited 500 ms)
- Result:
jsdom 30.1.3
MissingNot defined in this engine's window.
Web IDL existence (coverage):
- ResizeObserver: interface not defined.
linkedom 0.18.13
MissingNot defined in this engine's window.
Web IDL existence (coverage):
- ResizeObserver: interface not defined.
Checks
observe: new ResizeObserver(cb).observe(el) and disconnect() do not throw. Resize Observer §2.1: the constructor, observe(target, options) and disconnect() steps have no step that throws. (spec)initial-notification: Observing a connected element delivers an initial entry for it, whatever its size. Resize Observer §3.1: new ResizeObservation sets lastReportedSizes to [(-1,-1)], and isActive() is true when the current size differs from it, which any size (0×0 included) does; §3.4.1 gathers active observations and §3.4.5 invokes the callback with their entries. HTML runs these in the event loop's "update the rendering" steps ("gather active resize observations", "broadcast active resize observations"). The intro sums it up: "Observation will fire when observation starts." (spec)
Working around it in tests
Tests usually replace it with a stub class or the "resize-observer-polyfill" package.