1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:38:11 +00:00
serenity/Userland/Libraries/LibWeb/IntersectionObserver/IntersectionObserver.idl

26 lines
746 B
Text

#import <DOM/Element.idl>
#import <DOM/Node.idl>
callback IntersectionObserverCallback = undefined (sequence<IntersectionObserverEntry> entries, IntersectionObserver observer);
[Exposed=(Window)]
interface IntersectionObserver {
constructor(IntersectionObserverCallback 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;
};