IntersectionObserverEntry
Baseline Widely available *
This feature is well established and works across many devices and browser versions. It’s been available across browsers since March 2019.
* Some parts of this feature may have varying levels of support.
TheIntersectionObserverEntry interface of theIntersection Observer API describes the intersection between the target element and its root container at a specific moment of transition.
Instances ofIntersectionObserverEntry are delivered to anIntersectionObserver callback in itsentries parameter; otherwise, these objects can only be obtained by callingIntersectionObserver.takeRecords().
In this article
Instance properties
IntersectionObserverEntry.boundingClientRectRead onlyReturns the bounds rectangle of the target element as a
DOMRectReadOnly. The bounds are computed as described in the documentation forElement.getBoundingClientRect().IntersectionObserverEntry.intersectionRatioRead onlyReturns the ratio of the
intersectionRectto theboundingClientRect.IntersectionObserverEntry.intersectionRectRead onlyReturns a
DOMRectReadOnlyrepresenting the target's visible area.IntersectionObserverEntry.isIntersectingRead onlyA Boolean value which is
trueif the target element intersects with the intersection observer's root. If this istrue, then, theIntersectionObserverEntrydescribes a transition into a state of intersection; if it'sfalse, then you know the transition is from intersecting to not-intersecting.IntersectionObserverEntry.rootBoundsRead onlyReturns a
DOMRectReadOnlyfor the intersection observer's root.IntersectionObserverEntry.targetRead onlyThe
Elementwhose intersection with the root changed.IntersectionObserverEntry.timeRead onlyA
DOMHighResTimeStampindicating the time at which the intersection was recorded, relative to theIntersectionObserver'stime origin.
Instance methods
This interface has no methods.
Specifications
| Specification |
|---|
| Intersection Observer> # intersection-observer-entry> |