package virtual_dom
OCaml bindings for the virtual-dom library
Install
Dune Dependency
Authors
Maintainers
Sources
virtual_dom-v0.14.0.tar.gz
sha256=6964ee633d70badc0cc51763f8e2d211c37e5c5388de73ec98aa2d0915d74d6b
md5=fdfe48cea9cb5df272f2462672e0de72
doc/src/virtual_dom/dom_float.ml.html
Source file dom_float.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
open Js_of_ocaml let to_js_string value = (Js.number_of_float value)##toString let to_string value = to_js_string value |> Js.to_string let%expect_test _ = let open Core_kernel in let print f = printf "%s" (to_string f) in print 1.; [%expect {| 1 |}]; print Float.nan; [%expect {| NaN |}]; print Float.infinity; [%expect {| Infinity |}]; print Float.neg_infinity; [%expect {| -Infinity |}]; print 0.00000001; [%expect {| 1e-8 |}]; print (-1.); [%expect {| -1 |}]; print 1.0000001; [%expect {| 1.0000001 |}] ;;
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>