1// GENERATED CONTENT - DO NOT EDIT 2// Content was automatically extracted by Reffy into webref 3// (https://github.com/w3c/webref) 4// Source: Intersection Observer (https://w3c.github.io/IntersectionObserver/) 5 6callback IntersectionObserverCallback = undefined (sequence<IntersectionObserverEntry> entries, IntersectionObserver observer); 7 8[Exposed=Window] 9interface IntersectionObserver { 10 constructor(IntersectionObserverCallback callback, optional IntersectionObserverInit options = {}); 11 readonly attribute (Element or Document)? root; 12 readonly attribute DOMString rootMargin; 13 readonly attribute FrozenArray<double> thresholds; 14 undefined observe(Element target); 15 undefined unobserve(Element target); 16 undefined disconnect(); 17 sequence<IntersectionObserverEntry> takeRecords(); 18}; 19 20[Exposed=Window] 21interface IntersectionObserverEntry { 22 constructor(IntersectionObserverEntryInit intersectionObserverEntryInit); 23 readonly attribute DOMHighResTimeStamp time; 24 readonly attribute DOMRectReadOnly? rootBounds; 25 readonly attribute DOMRectReadOnly boundingClientRect; 26 readonly attribute DOMRectReadOnly intersectionRect; 27 readonly attribute boolean isIntersecting; 28 readonly attribute double intersectionRatio; 29 readonly attribute Element target; 30}; 31 32dictionary IntersectionObserverEntryInit { 33 required DOMHighResTimeStamp time; 34 required DOMRectInit? rootBounds; 35 required DOMRectInit boundingClientRect; 36 required DOMRectInit intersectionRect; 37 required boolean isIntersecting; 38 required double intersectionRatio; 39 required Element target; 40}; 41 42dictionary IntersectionObserverInit { 43 (Element or Document)? root = null; 44 DOMString rootMargin = "0px"; 45 (double or sequence<double>) threshold = 0; 46}; 47