To focus the search input from anywhere on the page, press the 'S' key.
in-package search v0.1.0
val make : ?dispose:(unit -> unit) -> sync:(Vdom.Custom.t -> bool) -> Js_browser.Element.t -> t
Create a custom controller out of DOM element.
sync function is in charge of updating the internal state of the custom element when the VDOM changes. It must return
true if the update was successful, or
false if the element needs to be destroyed and recreated.
val parent : ctx -> Js_browser.Element.t
val send_event : ctx -> Vdom.event -> unit
Can only be called after the handler returns (typically in a DOM event callback).
val after_redraw : ctx -> (unit -> unit) -> unit
Record an action to be executed after the next redraw.
type handler = ctx -> Vdom.Custom.t -> t option
A custom element handler recognizes some kinds of custom elements described in the VDOM and instantiante a concrete controller for them.