nixpkgs-suyu/pkgs/development/ocaml-modules/janestreet/incr_dom_jsoo_4_0.patch
Vincent Laporte 29d63a169a ocamlPackages.js_of_ocaml: 3.11.0 → 4.0.0
ocamlPackages.incr_dom: fix for JSoO 4.0

ocamlPackages.ocsigen-toolkit: 3.1.1 → 3.2.0
2022-05-06 10:26:40 +02:00

24 lines
650 B
Diff

diff --git a/src/js_misc.ml b/src/js_misc.ml
index 65f7b44..bfef103 100644
--- a/src/js_misc.ml
+++ b/src/js_misc.ml
@@ -28,17 +28,11 @@ type rows_or_columns =
[@@deriving sexp, bin_io, variants, compare]
let innerHeight () =
- Js.Optdef.case
- Dom_html.window##.innerHeight
- (fun () -> Dom_html.document##.documentElement##.clientHeight)
- Fn.id
+ Dom_html.window##.innerHeight
;;
let innerWidth () =
- Js.Optdef.case
- Dom_html.window##.innerWidth
- (fun () -> Dom_html.document##.documentElement##.clientWidth)
- Fn.id
+ Dom_html.window##.innerWidth
;;
let element_is_in_viewport (elt : Dom_html.element Js.t) =