IntersectionObserverEntry: boundingClientRect プロパティ

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.

IntersectionObserverEntry インターフェイスの読み取り専用の boundingClientRect プロパティは、簡単にいえば、対象要素全体を含む最小の矩形を記述した DOMRectReadOnly を返します。

DOMRectReadOnly で、交差状態の変化を記述している対象要素のすべての部分を含む、最小の矩形を記述します。この値は Element.getBoundingClientRect() と同じアルゴリズムで取得されるので、この矩形を得るために何が行われ、何がその境界内に含まれ、何が含まれないかという正確な内容については、その記事を参照してください。

しかし、一般的なケースでは、これを対象要素の外接矩形と考えるのが無難でしょう。

仕様書

Specification
Intersection Observer
# dom-intersectionobserverentry-boundingclientrect

ブラウザーの互換性

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
boundingClientRect

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support