2022-04-02 00:44:16 +03:00
|
|
|
#import <DOM/Document.idl>
|
2022-02-15 22:40:51 +03:30
|
|
|
#import <DOM/Element.idl>
|
|
|
|
|
#import <DOM/Node.idl>
|
|
|
|
|
|
2022-03-30 23:45:36 +03:00
|
|
|
callback IntersectionObserverCallback = undefined (sequence<IntersectionObserverEntry> entries, IntersectionObserver observer);
|
|
|
|
|
|
2021-10-13 14:20:50 -04:00
|
|
|
[Exposed=(Window)]
|
|
|
|
|
interface IntersectionObserver {
|
2022-03-30 23:45:36 +03:00
|
|
|
constructor(IntersectionObserverCallback callback, optional IntersectionObserverInit options = {});
|
2021-10-13 14:20:50 -04:00
|
|
|
|
|
|
|
|
undefined observe(Element target);
|
|
|
|
|
undefined unobserve(Element target);
|
|
|
|
|
undefined disconnect();
|
|
|
|
|
|
|
|
|
|
// FIXME:
|
|
|
|
|
// sequence<IntersectionObserverEntry> takeRecords();
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
dictionary IntersectionObserverInit {
|
2022-04-02 00:44:16 +03:00
|
|
|
(Element or Document)? root = null;
|
2021-10-13 14:20:50 -04:00
|
|
|
DOMString rootMargin = "0px";
|
2022-04-02 00:44:16 +03:00
|
|
|
(double or sequence<double>) threshold = 0;
|
2021-10-13 14:20:50 -04:00
|
|
|
};
|