Closed jayfz closed 7 months ago
The spec seems to describe when it's null:
rootBounds, of type DOMRectReadOnly, readonly, nullable For a same-origin-domain target, this will be the root intersection rectangle. Otherwise, this will be null.
You are right! Thanks for pointing that out. That's a corner case I didn't consider.
Hi!
The
IntersectionObserverEntry
interface inlib.dom.d.ts
includesrootBounds
definition asDOMRectReadOnly | null
. However while reading MDN documentation and based on my own experimentation it seems this property is never null. It either represents the bounds of the root element or the viewport's.MDN documentation link.
Current behavior:
Expected behavior
Thank you.