Intersection Observer Now Also Accepts a Document as the Root Element

Javascript Update

The IntersectionObserver constructor now also accepts a Document as the root. Before this only DOM elements could be set as root.

This will be helpful for observers running in iframes — intersection can be calculated against the iframe window's entire content area.

Browser Compatibility

May 18, 2020

Comments

Loading Comments