IntersectionObserverEntry
Experimental
これは実験的な機能です。
本番で使用する前にブラウザー互換性一覧表をチェックしてください。
Intersection Observer API の IntersectionObserverEntry
インターフェイスは、特定の遷移時点でのターゲット要素とそのルートコンテナ間の共通部分を記述します。 IntersectionObserverEntry
のインスタンスは、その entries
パラメータで IntersectionObserver
コールバックに渡されます。それ以外の場合、これらのオブジェクトは IntersectionObserver.takeRecords()
を呼び出すことによってのみ取得できます。
プロパティ
IntersectionObserverEntry.boundingClientRect
読取専用- Returns the bounds rectangle of the target element as a
DOMRectReadOnly
. The bounds are computed as described in the documentation forElement.getBoundingClientRect()
. IntersectionObserverEntry.intersectionRatio
読取専用- Returns the ratio of the
intersectionRect
to theboundingClientRect
. IntersectionObserverEntry.intersectionRect
読取専用- Returns a
DOMRectReadOnly
representing the target's visible area. IntersectionObserverEntry.isIntersecting
読取専用- A Boolean value which is
true
if the target element intersects with the intersection observer's root. If this istrue
, then, theIntersectionObserverEntry
describes a transition into a state of intersection; if it'sfalse
, then you know the transition is from intersecting to not-intersecting. IntersectionObserverEntry.rootBounds
読取専用- Returns a
DOMRectReadOnly
for the intersection observer's root. IntersectionObserverEntry.target
読取専用- The
Element
whose intersection with the root changed. IntersectionObserverEntry.time
読取専用- A
DOMHighResTimeStamp
indicating the time at which the intersection was recorded, relative to theIntersectionObserver
's time origin.
メソッド
このインタフェースにはメソッドがありません。
仕様
仕様書 | ステータス | コメント |
---|---|---|
Intersection Observer IntersectionObserverEntry の定義 |
草案 | 初回定義 |
ブラウザの互換性
BCD tables only load in the browser
このページの互換性テーブルは構造化データから生成されます。データに貢献したい場合は https://github.com/mdn/browser-compat-data をチェックして、プルリクエストを送信してください。