package bonsai
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=0c4a714146073f421f1a6179561f836b45d8dc012c743207d3481ea63bef74bf
doc/bonsai.web_test/Bonsai_web_test/Handle/index.html
Module Bonsai_web_test.Handle
Source
include module type of struct include Bonsai_test.Handle end
show
prints out the result of the component as specified by the Result_spec
that was passed into Handle.create
.
show_diff
will print the diff of the view between now and the last time that show
or show_diff
was called.
recompute_view
is like show
, but it doesn't print anything. Calling recompute_view
between invocations of show_diff
does not affect the diff the gets shown.
This function calls recompute_view
until either max_computes
is reached (defaults to 100), or there are no more after-display lifecycle events for processing.
This can be useful when using e.g. Bonsai.Edge.on_change
, which might otherwise delay their effects until the next frame.
store_view
is like show
except that instead of printing the view to stdout, it only stores the current view for use with show_diff
. This can be useful if you want to print the diff of "before->after" without being required to print the entirety of "before".
Flushes all the events in the event queue. This can be useful if e.g. you are completing an Effect synchronously via Svar, and don't want to go through the other functions which flush (like show
)
val create :
(module Bonsai_test__.Proc.Result_spec.S
with type incoming = 'incoming
and type t = 'result) ->
?clock:Bonsai_test__.Import.Incr.Clock.t ->
'result Bonsai.Computation.t ->
('result, 'incoming) t
val trigger_hook :
('a, 'b) t ->
get_vdom:('a -> Bonsai_web_test__.Import.Vdom.Node.t) ->
selector:string ->
name:string ->
('c -> unit Bonsai_web_test__.Import.Vdom.Effect.t) Core.Type_equal.Id.t ->
'c ->
unit
val get_hook_value :
('a, 'b) t ->
get_vdom:('a -> Bonsai_web_test__.Import.Vdom.Node.t) ->
selector:string ->
name:string ->
'c Core.Type_equal.Id.t ->
'c