package bonsai
A library for building dynamic webapps, using Js_of_ocaml
Install
Dune Dependency
Authors
Maintainers
Sources
v0.15.1.tar.gz
sha256=0c4a714146073f421f1a6179561f836b45d8dc012c743207d3481ea63bef74bf
doc/bonsai.bench/Bonsai_bench/Test/index.html
Module Bonsai_bench.Test
Source
t
is equivalent to Core_bench_js.Test.t
. We don't expose the equality because these benchmarks should only be run using Bonsai_bench.bench
so that we can do necessary clean-up between benchmark runs.
Source
val create :
?clock:Bonsai_test.Incr.Clock.t ->
name:string ->
component:'r Bonsai.Computation.t ->
get_inject:('r -> 'a -> unit Bonsai_test.Effect.t) ->
'a Interaction.t ->
t
create
produces a benchmark which performs interactions
on component
. The computation is shared between runs within the benchmark runner. Since they are run a non-deterministic amount of times, benchmarks created this way should either have an interaction which is idempotent on the state, or have similar performance when the interaction is repeated many times.
Source
val create_with_resetter :
?clock:Bonsai_test.Incr.Clock.t ->
name:string ->
component:'r Bonsai.Computation.t ->
get_inject:('r -> 'a -> unit Bonsai_test.Effect.t) ->
'a Interaction.t ->
t
create_with_resetter
is equivalent to calling create
, with interactions equal to Interaction.many interactions; Interaction.reset_model; Interaction.stabilize
.
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>