Allow the IntersectionObserver constructor to take a Document as the 'root' argument, causing intersections to be calculated against the scrolling viewport of the document.

Motivation

This is primarily targeted towards observers running in an iframe; prior to this feature, there was no way to measure intersection with the scrolling viewport of the iframe's document.

Documentation

Specification

Specification link


Unknown standards status - check spec link for status

Status in Chromium

Blink>JavaScript>API


Enabled by default (tracking bug)

Consensus & Standardization

After a feature ships in Chrome, the values listed here are not guaranteed to be up to date.

  • No signal
  • No signal
  • No signal
  • Positive

Owner

Intent to Prototype url

Intent to Prototype thread

Last updated on 2021-08-09