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.
Comments