intersection-observer.idl (2011B)
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 6 callback IntersectionObserverCallback = undefined (sequence<IntersectionObserverEntry> entries, IntersectionObserver observer); 7 8 [Exposed=Window] 9 interface IntersectionObserver { 10 constructor(IntersectionObserverCallback callback, optional IntersectionObserverInit options = {}); 11 readonly attribute (Element or Document)? root; 12 readonly attribute DOMString rootMargin; 13 readonly attribute DOMString scrollMargin; 14 readonly attribute FrozenArray<double> thresholds; 15 readonly attribute long delay; 16 readonly attribute boolean trackVisibility; 17 undefined observe(Element target); 18 undefined unobserve(Element target); 19 undefined disconnect(); 20 sequence<IntersectionObserverEntry> takeRecords(); 21 }; 22 23 [Exposed=Window] 24 interface IntersectionObserverEntry { 25 constructor(IntersectionObserverEntryInit intersectionObserverEntryInit); 26 readonly attribute DOMHighResTimeStamp time; 27 readonly attribute DOMRectReadOnly? rootBounds; 28 readonly attribute DOMRectReadOnly boundingClientRect; 29 readonly attribute DOMRectReadOnly intersectionRect; 30 readonly attribute boolean isIntersecting; 31 readonly attribute boolean isVisible; 32 readonly attribute double intersectionRatio; 33 readonly attribute Element target; 34 }; 35 36 dictionary IntersectionObserverEntryInit { 37 required DOMHighResTimeStamp time; 38 required DOMRectInit? rootBounds; 39 required DOMRectInit boundingClientRect; 40 required DOMRectInit intersectionRect; 41 required boolean isIntersecting; 42 required boolean isVisible; 43 required double intersectionRatio; 44 required Element target; 45 }; 46 47 dictionary IntersectionObserverInit { 48 (Element or Document)? root = null; 49 DOMString rootMargin = "0px"; 50 DOMString scrollMargin = "0px"; 51 (double or sequence<double>) threshold = 0; 52 long delay = 0; 53 boolean trackVisibility = false; 54 };