Module Bonsai_web__.Start
module Handle : sig ... end
Start functions
val start_standalone : initial_input:'input -> initial_model:'model -> bind_to_element_with_id:string -> ('input, 'model, Bonsai_web__.Import.Vdom.Node.t) Bonsai_web__.Import.Bonsai.t -> ('input, Core_kernel.Nothing.t, Core_kernel.Nothing.t) Handle.t
Start an application, receiving a handle that can't schedule any actions.
The outermost
Bonsai.t
s result type parameter should be aVdom.Node.t
, which will be bound to the DOM element with idbind_to_element_with_id
.
val start : initial_input:'input -> initial_model:'model -> bind_to_element_with_id:string -> ('input * ('outgoing -> Bonsai_web__.Import.Vdom.Event.t), 'model, Bonsai_web__.Import.Vdom.Node.t * ('incoming -> Bonsai_web__.Import.Vdom.Event.t)) Bonsai_web__.Import.Bonsai.t -> ('input, 'incoming, 'outgoing) Handle.t
Start an application, receiving a handle that can schedule actions of a user-defined type.
The outermost
Bonsai.t
s result type parameter should be pair of:- a
Vdom.Node.t
, which will be bound to the DOM element with idbind_to_element_with_id
; and - an
inject
function that accepts external actions and returnsVdom.Event.t
s.
- a