Intersection observer
Widely available since 2021-09-25 (baseline high)
The Intersection Observer API asynchronously observes changes in the intersection of a target element with an ancestor element or with a top-level document's viewport.
Compatibility (view on caniuse.com)
- Chrome 58 Released on 2017-04-19
- Chrome Android 58 Released on 2017-04-25
- Edge 16 Released on 2017-10-17
- Firefox 55 Released on 2017-08-08
- Firefox for Android 55 Released on 2017-08-08
- Safari 12.1 Released on 2019-03-25
- Safari on iOS 12.2 Released on 2019-03-25
MDN docs
- IntersectionObserver
- IntersectionObserver.IntersectionObserver
- IntersectionObserver.disconnect
- IntersectionObserver.observe
- IntersectionObserver.root
- IntersectionObserver.rootMargin
- IntersectionObserver.takeRecords
- IntersectionObserver.unobserve
- IntersectionObserverEntry
- IntersectionObserverEntry.boundingClientRect
- IntersectionObserverEntry.intersectionRatio
- IntersectionObserverEntry.intersectionRect
- IntersectionObserverEntry.rootBounds
- IntersectionObserverEntry.target
- IntersectionObserverEntry.time
- IntersectionObserver.thresholds
- IntersectionObserverEntry.isIntersecting
Specifications
BCD data
- api.IntersectionObserver
- api.IntersectionObserver.IntersectionObserver
- api.IntersectionObserver.disconnect
- api.IntersectionObserver.observe
- api.IntersectionObserver.root
- api.IntersectionObserver.rootMargin
- api.IntersectionObserver.takeRecords
- api.IntersectionObserver.unobserve
- api.IntersectionObserverEntry
- api.IntersectionObserverEntry.boundingClientRect
- api.IntersectionObserverEntry.intersectionRatio
- api.IntersectionObserverEntry.intersectionRect
- api.IntersectionObserverEntry.rootBounds
- api.IntersectionObserverEntry.target
- api.IntersectionObserverEntry.time
- api.IntersectionObserver.thresholds
- api.IntersectionObserverEntry.isIntersecting