-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathResizeObserverAPI.res
More file actions
58 lines (51 loc) · 1.76 KB
/
ResizeObserverAPI.res
File metadata and controls
58 lines (51 loc) · 1.76 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
@@warning("-30")
open DOMAPI
type resizeObserverBoxOptions =
| @as("border-box") BorderBox
| @as("content-box") ContentBox
| @as("device-pixel-content-box") DevicePixelContentBox
/**
[See ResizeObserverSize on MDN](https://developer.mozilla.org/docs/Web/API/ResizeObserverSize)
*/
type resizeObserverSize = {
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/ResizeObserverSize/inlineSize)
*/
inlineSize: float,
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/ResizeObserverSize/blockSize)
*/
blockSize: float,
}
/**
[See ResizeObserverEntry on MDN](https://developer.mozilla.org/docs/Web/API/ResizeObserverEntry)
*/
type resizeObserverEntry = {
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/ResizeObserverEntry/target)
*/
target: element,
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/ResizeObserverEntry/contentRect)
*/
contentRect: domRectReadOnly,
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/ResizeObserverEntry/borderBoxSize)
*/
borderBoxSize: array<resizeObserverSize>,
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/ResizeObserverEntry/contentBoxSize)
*/
contentBoxSize: array<resizeObserverSize>,
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/ResizeObserverEntry/devicePixelContentBoxSize)
*/
devicePixelContentBoxSize: array<resizeObserverSize>,
}
/**
[See ResizeObserver on MDN](https://developer.mozilla.org/docs/Web/API/ResizeObserver)
*/
@editor.completeFrom(ResizeObserver)
type resizeObserver = {}
type resizeObserverOptions = {mutable box?: resizeObserverBoxOptions}
type resizeObserverCallback = array<resizeObserverEntry> => resizeObserver => unit