IntersectionObserverEntry:rootBounds 属性
Baseline
Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2019年3月.
IntersectionObserverEntry 接口的 rootBounds 只读属性是一个对应于 target 的根相交矩形的 DOMRectReadOnly,并在指定了 IntersectionObserver.rootMargin 时该矩形将按该值进行偏移。
值
用于描述根相交矩形的 DOMRectReadOnly。对于根为 Document 视口的情况,该矩形即为整个文档的边界矩形。否则,它将是根元素的边界。
该矩形会根据 IntersectionObserver.rootMargin 中的值进行偏移。
规范
| Specification |
|---|
| Intersection Observer> # dom-intersectionobserverentry-rootbounds> |