package bonsai

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Experimental.HandleSource

Sourcetype ('result, 'incoming) t
Sourceval show : (_, _) t -> unit

show prints out the result of the component as specified by the Result_spec that was passed into Handle.create.

Sourceval store_view : (_, _) t -> unit
Sourceval show_diff : ?location_style:Patdiff_kernel.Format.Location_style.t -> ?diff_context:int -> (_, _) t -> unit
Sourceval advance_clock_by : (_, _) t -> Core.Time_ns.Span.t -> unit
Sourceval advance_clock : to_:Core.Time_ns.t -> (_, _) t -> unit
Sourceval do_actions : (_, 'incoming) t -> 'incoming list -> unit
Sourceval recompute_view : (_, _) t -> unit

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.

Sourceval recompute_view_until_stable : ?max_computes:int -> (_, _) t -> unit

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.

Sourceval flush_async_and_bonsai : ?max_iterations:int -> ?silence_between_frames:bool -> (_, _) t -> unit Async_kernel.Deferred.t
Sourceval click_on : ?extra_event_fields:(string * Js_of_ocaml.Js.Unsafe.any) list -> ?shift_key_down:bool -> ?alt_key_down:bool -> ?ctrl_key_down:bool -> ('a, 'b) t -> selector:string -> unit
Sourceval submit_form : ?extra_event_fields:(string * Js_of_ocaml.Js.Unsafe.any) list -> ('a, 'b) t -> selector:string -> unit
Sourceval set_checkbox : ?extra_event_fields:(string * Js_of_ocaml.Js.Unsafe.any) list -> ?shift_key_down:bool -> ?alt_key_down:bool -> ?ctrl_key_down:bool -> ('a, 'b) t -> selector:string -> checked:bool -> unit
Sourceval input_text : ?extra_event_fields:(string * Js_of_ocaml.Js.Unsafe.any) list -> ('a, 'b) t -> selector:string -> text:string -> unit
Sourceval keydown : ?extra_event_fields:(string * Js_of_ocaml.Js.Unsafe.any) list -> ?shift_key_down:bool -> ?alt_key_down:bool -> ?ctrl_key_down:bool -> ('a, 'b) t -> selector:string -> key:Js_of_ocaml.Dom_html.Keyboard_code.t -> unit
Sourceval change : ?extra_event_fields:(string * Js_of_ocaml.Js.Unsafe.any) list -> ('a, 'b) t -> selector:string -> value:string -> unit
Sourceval focus : ?extra_event_fields:(string * Js_of_ocaml.Js.Unsafe.any) list -> ('a, 'b) t -> selector:string -> unit
Sourceval blur : ?extra_event_fields:(string * Js_of_ocaml.Js.Unsafe.any) list -> ?related_target:string -> ('a, 'b) t -> selector:string -> unit
Sourceval mousemove : ?extra_event_fields:(string * Js_of_ocaml.Js.Unsafe.any) list -> ('a, 'b) t -> selector:string -> unit
Sourceval mouseenter : ?extra_event_fields:(string * Js_of_ocaml.Js.Unsafe.any) list -> ('a, 'b) t -> selector:string -> unit
Sourceval wheel : ?extra_event_fields:(string * Js_of_ocaml.Js.Unsafe.any) list -> ('a, 'b) t -> selector:string -> delta_y:float -> unit
Sourceval trigger_hook : ('a, 'b) t -> selector:string -> name:string -> ('c -> unit Bonsai_web.Vdom.Effect.t) Core.Type_equal.Id.t -> 'c -> unit
Sourceval trigger_hook_via : ('a, 'b) t -> selector:string -> name:string -> 't Core.Type_equal.Id.t -> f:('t -> 'c -> unit Bonsai_web.Vdom.Effect.t) -> 'c -> unit
Sourceval get_hook_value : ('a, 'b) t -> selector:string -> name:string -> 'c Core.Type_equal.Id.t -> 'c
Sourcemodule Bulk_size_tracker : sig ... end
Sourcemodule Position_tracker : sig ... end
Sourcemodule Drag_and_drop : sig ... end