package bonsai
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
A library for building dynamic webapps, using Js_of_ocaml
Install
dune-project
Dependency
Authors
Maintainers
Sources
v0.17.0.tar.gz
sha256=c78c4476ee6b856846e2d0941e5965009d5e1b853e564b2b1bee61202f0b1ebb
doc/src/bonsai.test_of_bonsai_itself/test_match_sub_runtime_error.ml.html
Source file test_match_sub_runtime_error.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20open! Core open! Import open Bonsai.Let_syntax open Bonsai_test let%expect_test "match%sub defers exceptions until runtime" = let var = Bonsai.Var.create true in let component = match%sub Bonsai.Var.value var with | true -> Bonsai.const "yay!" | false -> assert false in let handle = Handle.create (Result_spec.string (module String)) component in Handle.show handle; [%expect {| yay! |}]; Bonsai.Var.set var false; Expect_test_helpers_core.require_does_raise ~hide_positions:true [%here] (fun () -> Handle.show handle); [%expect {| "Assert_failure test_match_sub_runtime_error.ml:LINE:COL" |}] ;;
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>