IntersectionObserver.idl 993 B

12345678910111213141516171819202122232425
  1. #import <DOM/Document.idl>
  2. #import <DOM/Element.idl>
  3. #import <DOM/Node.idl>
  4. #import <IntersectionObserver/IntersectionObserverEntry.idl>
  5. callback IntersectionObserverCallback = undefined (sequence<IntersectionObserverEntry> entries, IntersectionObserver observer);
  6. [Exposed=(Window), UseNewAKString]
  7. interface IntersectionObserver {
  8. constructor(IntersectionObserverCallback callback, optional IntersectionObserverInit options = {});
  9. readonly attribute (Element or Document)? root;
  10. // FIXME: readonly attribute DOMString rootMargin;
  11. // FIXME: `sequence<double>` should be `FrozenArray<double>`
  12. readonly attribute sequence<double> thresholds;
  13. undefined observe(Element target);
  14. undefined unobserve(Element target);
  15. undefined disconnect();
  16. sequence<IntersectionObserverEntry> takeRecords();
  17. };
  18. dictionary IntersectionObserverInit {
  19. (Element or Document)? root = null;
  20. DOMString rootMargin = "0px";
  21. (double or sequence<double>) threshold = 0;
  22. };