Get to know MDN better
This feature is well established and works across many devices and browser versions. It’s been available across browsers since March 2019.
The intersectionRect read-only property of the IntersectionObserverEntry interface is a DOMRectReadOnly object which describes the smallest rectangle that contains the entire portion of the target element which is currently visible within the intersection root.
A DOMRectReadOnly which describes the part of the target element that's currently visible within the root's intersection rectangle.
This rectangle is computed by taking the intersection of boundingClientRect with each of the target's ancestors' clip rectangles, with the exception of the intersection root itself.
In this simple example, an intersection callback stores the intersection rectangle for later use by the code that draws the target elements' contents, so that only the visible area is redrawn.
| Intersection Observer # dom-intersectionobserverentry-intersectionrect |
Enable JavaScript to view this browser compatibility table.
This page was last modified on Jun 24, 2025 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.