IntersectionObserver.idl 646 B

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