diff --git a/baselines/dom.generated.d.ts b/baselines/dom.generated.d.ts index 73fc0251f..ddee223b3 100644 --- a/baselines/dom.generated.d.ts +++ b/baselines/dom.generated.d.ts @@ -611,7 +611,7 @@ interface IntersectionObserverEntryInit { } interface IntersectionObserverInit { - root?: Element | null; + root?: Element | Document | null; rootMargin?: string; threshold?: number | number[]; } @@ -9611,7 +9611,7 @@ declare var InputEvent: { /** provides a way to asynchronously observe changes in the intersection of a target element with an ancestor element or with a top-level document's viewport. */ interface IntersectionObserver { - readonly root: Element | null; + readonly root: Element | Document | null; readonly rootMargin: string; readonly thresholds: ReadonlyArray; disconnect(): void; diff --git a/inputfiles/idl/Intersection Observer.widl b/inputfiles/idl/Intersection Observer.widl index 3b1e6018c..1b4f5d48a 100644 --- a/inputfiles/idl/Intersection Observer.widl +++ b/inputfiles/idl/Intersection Observer.widl @@ -1,19 +1,20 @@ -callback IntersectionObserverCallback = void (sequence entries, IntersectionObserver observer); +callback IntersectionObserverCallback = undefined (sequence entries, IntersectionObserver observer); -[Constructor(IntersectionObserverCallback callback, optional IntersectionObserverInit options), - Exposed=Window] +[Exposed=Window] interface IntersectionObserver { - readonly attribute Element? root; + constructor(IntersectionObserverCallback callback, optional IntersectionObserverInit options = {}); + readonly attribute (Element or Document)? root; readonly attribute DOMString rootMargin; readonly attribute FrozenArray thresholds; - void observe(Element target); - void unobserve(Element target); - void disconnect(); + undefined observe(Element target); + undefined unobserve(Element target); + undefined disconnect(); sequence takeRecords(); }; -[Constructor(IntersectionObserverEntryInit intersectionObserverEntryInit)] +[Exposed=Window] interface IntersectionObserverEntry { + constructor(IntersectionObserverEntryInit intersectionObserverEntryInit); readonly attribute DOMHighResTimeStamp time; readonly attribute DOMRectReadOnly? rootBounds; readonly attribute DOMRectReadOnly boundingClientRect; @@ -34,7 +35,7 @@ dictionary IntersectionObserverEntryInit { }; dictionary IntersectionObserverInit { - Element? root = null; + (Element or Document)? root = null; DOMString rootMargin = "0px"; (double or sequence) threshold = 0; }; diff --git a/inputfiles/idlSources.json b/inputfiles/idlSources.json index e3e3be65e..2aa4073b8 100644 --- a/inputfiles/idlSources.json +++ b/inputfiles/idlSources.json @@ -387,7 +387,7 @@ "title": "Indexed Database" }, { - "url": "https://www.w3.org/TR/intersection-observer/", + "url": "https://w3c.github.io/IntersectionObserver/", "title": "Intersection Observer" }, {