summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/IntersectionObserver/IntersectionObserver.idl
blob: c5d2a4bbfc31d4f23cc2657ca77642c35c3341de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#import <DOM/Element.idl>
#import <DOM/Node.idl>

[Exposed=(Window)]
interface IntersectionObserver {
    // FIXME: Should be: IntersectionObserverCallback
    constructor(any callback, optional IntersectionObserverInit options = {});

    undefined observe(Element target);
    undefined unobserve(Element target);
    undefined disconnect();

    // FIXME:
    // sequence<IntersectionObserverEntry> takeRecords();
};

dictionary IntersectionObserverInit {
    // FIXME: Should be: (Element or Document)?
    Node? root = null;

    DOMString rootMargin = "0px";

    // FIXME: Should be: (double or sequence<double>)
    any threshold = 0;
};