1
- callback IntersectionObserverCallback = void (sequence<IntersectionObserverEntry> entries, IntersectionObserver observer);
1
+ callback IntersectionObserverCallback = undefined (sequence<IntersectionObserverEntry> entries, IntersectionObserver observer);
2
2
3
- [Constructor(IntersectionObserverCallback callback, optional IntersectionObserverInit options),
4
- Exposed=Window]
3
+ [Exposed=Window]
5
4
interface IntersectionObserver {
6
- readonly attribute Element? root;
5
+ constructor(IntersectionObserverCallback callback, optional IntersectionObserverInit options = {});
6
+ readonly attribute (Element or Document)? root;
7
7
readonly attribute DOMString rootMargin;
8
8
readonly attribute FrozenArray<double> thresholds;
9
- void observe(Element target);
10
- void unobserve(Element target);
11
- void disconnect();
9
+ undefined observe(Element target);
10
+ undefined unobserve(Element target);
11
+ undefined disconnect();
12
12
sequence<IntersectionObserverEntry> takeRecords();
13
13
};
14
14
15
- [Constructor(IntersectionObserverEntryInit intersectionObserverEntryInit) ]
15
+ [Exposed=Window ]
16
16
interface IntersectionObserverEntry {
17
+ constructor(IntersectionObserverEntryInit intersectionObserverEntryInit);
17
18
readonly attribute DOMHighResTimeStamp time;
18
19
readonly attribute DOMRectReadOnly? rootBounds;
19
20
readonly attribute DOMRectReadOnly boundingClientRect;
@@ -34,7 +35,7 @@ dictionary IntersectionObserverEntryInit {
34
35
};
35
36
36
37
dictionary IntersectionObserverInit {
37
- Element? root = null;
38
+ ( Element or Document) ? root = null;
38
39
DOMString rootMargin = "0px";
39
40
(double or sequence<double>) threshold = 0;
40
41
};
0 commit comments