Bonsai_web_arrow_deprecated.Startmodule Handle : sig ... endmodule App_input : sig ... endThe input of an application-level component is a value of type ('input, 'outgoing) App_input.t.
module App_result : sig ... endThe result of an application-level component is a value of type 'incoming App_result.t. This value contains the view of the app, and also an inject function: a way for the holder of the Handle.t to send events into the application component.
val start_standalone :
?optimize:bool ->
?simulate_body_focus_on_root_element:bool ->
?profile:bool ->
?time_source:Bonsai_cont.Time_source.t ->
initial_input:'input ->
bind_to_element_with_id:string ->
('input, Vdom.Node.t) Bonsai_arrow_deprecated.t ->
('input, unit, Core.Nothing.t, Core.Nothing.t) Handle.tStart an application, receiving a handle that can't schedule any actions.
The outermost Bonsai.t's result type parameter should be a Vdom.Node.t, which will be bound to the DOM element with id bind_to_element_with_id.
val start :
?optimize:bool ->
?simulate_body_focus_on_root_element:bool ->
?profile:bool ->
?time_source:Bonsai_cont.Time_source.t ->
initial_input:'input ->
bind_to_element_with_id:string ->
(('input, 'outgoing) App_input.t, ('extra, 'incoming) App_result.t)
Bonsai_arrow_deprecated.t ->
('input, 'extra, 'incoming, 'outgoing) Handle.tStart an application, receiving a handle that can schedule actions of a user-defined type.
The outermost Bonsai.t's result type parameter should be a pair consisting of:
Vdom.Node.t, which will be bound to the DOM element with id bind_to_element_with_id; andinject function that accepts external actions and returns unit Vdom.Effect.ts.This function can take the following optional arguments:
?optimize (defaults to true)?simulate_body_focus_on_root_element (defaults to true) Makes it so that attaching event listeners to the root element behaves as if they were attached to the page body element. Enabling this makes the bonsai app behave differently from a traditional web page.?profile (defaults to false) Sends performance marks and measures to the browser performance timeline.?time_source should only be provided in tests.