ocamlPackages.incr_dom: fix for JSoO 4.0 ocamlPackages.ocsigen-toolkit: 3.1.1 → 3.2.0main
parent
9a45461cdf
commit
29d63a169a
@ -0,0 +1,24 @@ |
|||||||
|
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) =
|
@ -1,13 +1,26 @@ |
|||||||
{ buildDunePackage, js_of_ocaml-compiler |
{ lib, buildDunePackage, fetchFromGitHub |
||||||
, ocamlbuild |
, ocamlbuild |
||||||
}: |
}: |
||||||
|
|
||||||
buildDunePackage { |
buildDunePackage rec { |
||||||
pname = "js_of_ocaml-ocamlbuild"; |
pname = "js_of_ocaml-ocamlbuild"; |
||||||
|
version = "4.0.0"; |
||||||
inherit (js_of_ocaml-compiler) version src meta useDune2; |
|
||||||
|
|
||||||
minimalOCamlVersion = "4.02"; |
minimalOCamlVersion = "4.02"; |
||||||
|
|
||||||
|
src = fetchFromGitHub { |
||||||
|
owner = "ocsigen"; |
||||||
|
repo = pname; |
||||||
|
rev = "852302c8f35b946e2ec275c529a79e46d8749be6"; |
||||||
|
sha256 = "sha256:03ayvakvbh4wi4dwcgd7r9y8ka8cv3d59hb81yk2dxyd94bln145"; |
||||||
|
}; |
||||||
|
|
||||||
propagatedBuildInputs = [ ocamlbuild ]; |
propagatedBuildInputs = [ ocamlbuild ]; |
||||||
|
|
||||||
|
meta = { |
||||||
|
description = "An ocamlbuild plugin to compile to JavaScript"; |
||||||
|
license = lib.licenses.lgpl2Only; |
||||||
|
maintainers = [ lib.maintainers.vbgl ]; |
||||||
|
inherit (src.meta) homepage; |
||||||
|
}; |
||||||
} |
} |
||||||
|
Loading…
Reference in new issue