--- title: IntersectionObserver.root slug: Web/API/IntersectionObserver/root translation_of: Web/API/IntersectionObserver/root ---

root 属性用来获取当前 intersectionObserver 实例的根元素。

语法

intersectionObserver.root;

规范

Specification Status Comment
{{SpecName('IntersectionObserver', '#dom-intersectionobserver-root', 'IntersectionObserver')}} {{Spec2('IntersectionObserver')}} Initial definition

浏览器兼容性

{{Compat("api.IntersectionObserver.root")}}