IntersectionObserver
Reports when observed elements enter or leave the viewport or a root element. Specification: w3c.github.io/IntersectionObserver/.
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):
- IntersectionObserver: interface not defined.
happy-dom 21.0.3
Stub0 of 2 checks work.
Web IDL existence (coverage):
-
IntersectionObserver: interface present; 4 of 10 members present, missing:
root,rootMargin,scrollMargin,thresholds,delay,trackVisibility. -
A new observer has root null, rootMargin "0px 0px 0px 0px" and thresholds [0]. Intersection Observer §2.2: root is "null if none was provided"; rootMargin: "If no rootMargin was passed to the IntersectionObserver constructor, the value of this attribute is '0px 0px 0px 0px'"; §3.2.1 (initialize a new IntersectionObserver): "If thresholds is empty, append 0 to thresholds."
- Result:
root: expected null, got undefined
- Result:
-
Observing a connected element delivers an initial entry for it with an isIntersecting boolean, whether or not it intersects. Intersection Observer §3.2.2 (observe a target Element) registers it with "a previousThresholdIndex property set to -1"; §3.2.10 (update intersection observations) computes a thresholdIndex of 0 or more and "If thresholdIndex does not equal previousThresholdIndex … queue an IntersectionObserverEntry". HTML runs these steps in "update the rendering", and §3.4.2 forbids skipping that update while a target has had no entry yet.
- Result:
no entry delivered (waited 500 ms)
- Result:
jsdom 30.1.3
MissingNot defined in this engine's window.
Web IDL existence (coverage):
- IntersectionObserver: interface not defined.
linkedom 0.18.13
MissingNot defined in this engine's window.
Web IDL existence (coverage):
- IntersectionObserver: interface not defined.
Checks
defaults: A new observer has root null, rootMargin "0px 0px 0px 0px" and thresholds [0]. Intersection Observer §2.2: root is "null if none was provided"; rootMargin: "If no rootMargin was passed to the IntersectionObserver constructor, the value of this attribute is '0px 0px 0px 0px'"; §3.2.1 (initialize a new IntersectionObserver): "If thresholds is empty, append 0 to thresholds." (spec)initial-notification: Observing a connected element delivers an initial entry for it with an isIntersecting boolean, whether or not it intersects. Intersection Observer §3.2.2 (observe a target Element) registers it with "a previousThresholdIndex property set to -1"; §3.2.10 (update intersection observations) computes a thresholdIndex of 0 or more and "If thresholdIndex does not equal previousThresholdIndex … queue an IntersectionObserverEntry". HTML runs these steps in "update the rendering", and §3.4.2 forbids skipping that update while a target has had no entry yet. (spec)
Working around it in tests
Tests usually replace it with a mock class (for example the "react-intersection-observer/test-utils" helpers or a hand-written stub).