enum ResizeObserverBoxOptions { "border-box", "content-box", "device-pixel-content-box" }; dictionary ResizeObserverOptions { ResizeObserverBoxOptions box = "content-box"; }; // TODO: remove this once the `constructor()` syntax is supported. [Constructor(ResizeObserverCallback callback), Exposed=(Window)] interface ResizeObserver { constructor(ResizeObserverCallback callback); undefined observe(Element target, optional ResizeObserverOptions options = {}); undefined unobserve(Element target); undefined disconnect(); }; callback ResizeObserverCallback = undefined (sequence entries, ResizeObserver observer); [Exposed=Window] interface ResizeObserverEntry { readonly attribute Element target; readonly attribute DOMRectReadOnly contentRect; readonly attribute FrozenArray borderBoxSize; readonly attribute FrozenArray contentBoxSize; readonly attribute FrozenArray devicePixelContentBoxSize; }; [Exposed=Window] interface ResizeObserverSize { readonly attribute unrestricted double inlineSize; readonly attribute unrestricted double blockSize; };