File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change
1
+ /// Support for https://developer.mozilla.org/en-US/docs/Web/API/VisualViewport
2
+
3
+ type t
4
+
5
+ @get external height : t => int = "height"
6
+ @get external width : t => int = "width"
7
+ @get external scale : t => float = "scale"
8
+ @get external offsetLeft : t => int = "offsetLeft"
9
+ @get external offsetTop : t => int = "offsetTop"
10
+ @get external pageLeft : t => int = "pageLeft"
11
+ @get external pageTop : t => int = "pageTop"
12
+
13
+ include Webapi__Dom__EventTarget .Impl ({
14
+ type t = t
15
+ })
Original file line number Diff line number Diff line change @@ -146,6 +146,9 @@ module Impl = (
146
146
@set
147
147
external setOnLoad : (t_window , unit => unit ) => unit =
148
148
"onload" /* use addEventListener instead? */
149
+
150
+ /* VisualViewport API */
151
+ @get external visualViewport : t_window => Webapi__Dom__VisualViewport .t = "visualViewport"
149
152
}
150
153
151
154
type t = Dom .window
You can’t perform that action at this time.
0 commit comments