diff options
Diffstat (limited to 'test/wpt/tests/interfaces/resize-observer.idl')
-rw-r--r-- | test/wpt/tests/interfaces/resize-observer.idl | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/test/wpt/tests/interfaces/resize-observer.idl b/test/wpt/tests/interfaces/resize-observer.idl new file mode 100644 index 0000000..07f9703 --- /dev/null +++ b/test/wpt/tests/interfaces/resize-observer.idl @@ -0,0 +1,37 @@ +// GENERATED CONTENT - DO NOT EDIT +// Content was automatically extracted by Reffy into webref +// (https://github.com/w3c/webref) +// Source: Resize Observer (https://drafts.csswg.org/resize-observer-1/) + +enum ResizeObserverBoxOptions { + "border-box", "content-box", "device-pixel-content-box" +}; + +dictionary ResizeObserverOptions { + ResizeObserverBoxOptions box = "content-box"; +}; + +[Exposed=(Window)] +interface ResizeObserver { + constructor(ResizeObserverCallback callback); + undefined observe(Element target, optional ResizeObserverOptions options = {}); + undefined unobserve(Element target); + undefined disconnect(); +}; + +callback ResizeObserverCallback = undefined (sequence<ResizeObserverEntry> entries, ResizeObserver observer); + +[Exposed=Window] +interface ResizeObserverEntry { + readonly attribute Element target; + readonly attribute DOMRectReadOnly contentRect; + readonly attribute FrozenArray<ResizeObserverSize> borderBoxSize; + readonly attribute FrozenArray<ResizeObserverSize> contentBoxSize; + readonly attribute FrozenArray<ResizeObserverSize> devicePixelContentBoxSize; +}; + +[Exposed=Window] +interface ResizeObserverSize { + readonly attribute unrestricted double inlineSize; + readonly attribute unrestricted double blockSize; +}; |