-
Notifications
You must be signed in to change notification settings - Fork 421
/
Resize Observer.widl
39 lines (33 loc) · 1.23 KB
/
Resize Observer.widl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
enum ResizeObserverBoxOptions {
"border-box", "content-box", "device-pixel-content-box"
};
dictionary ResizeObserverOptions {
ResizeObserverBoxOptions box = "content-box";
};
[Exposed=(Window),
Constructor(ResizeObserverCallback callback)]
interface ResizeObserver {
void observe(Element target, optional ResizeObserverOptions options);
void unobserve(Element target);
void disconnect();
};
callback ResizeObserverCallback = void (FrozenArray<ResizeObserverEntry> entries, ResizeObserver observer);
[Exposed=Window]
interface ResizeObserverEntry {
readonly attribute Element target;
readonly attribute DOMRectReadOnly contentRect;
readonly attribute sequence<ResizeObserverSize> borderBoxSize;
readonly attribute sequence<ResizeObserverSize> contentBoxSize;
readonly attribute sequence<ResizeObserverSize> devicePixelContentBoxSize;
};
interface ResizeObserverSize {
readonly attribute unrestricted double inlineSize;
readonly attribute unrestricted double blockSize;
};
[Constructor(Element target)
]
interface ResizeObservation {
readonly attribute Element target;
readonly attribute ResizeObserverBoxOptions observedBox;
readonly attribute sequence<ResizeObserverSize> lastReportedSizes;
};