IntersectionObserverEntry: thuộc tính rootBounds

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.

Thuộc tính chỉ đọc rootBounds của giao diện IntersectionObserverEntry là một DOMRectReadOnly tương ứng với hình chữ nhật giao nhau của root của target, đã được bù bởi IntersectionObserver.rootMargin nếu có chỉ định.

Giá trị

Một DOMRectReadOnly mô tả hình chữ nhật giao nhau của root. Với root là viewport của Document, hình chữ nhật này là biên của toàn bộ tài liệu. Nếu không, đó là biên của phần tử root.

Hình chữ nhật này được dịch theo các giá trị trong IntersectionObserver.rootMargin.

Thông số kỹ thuật

Thông số kỹ thuật
Intersection Observer
# dom-intersectionobserverentry-rootbounds

Tương thích trình duyệt