package virtual_dom
-
virtual_dom
-
-
virtual_dom.keyboard
-
-
virtual_dom.layout
-
virtual_dom.svg
-
virtual_dom.ui_effect
-
virtual_dom.vdom_test_helpers
Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
A Handler.t
handles a keyboard event by returning a unit Vdom.Effect.t
. These should be used as building blocks for keyboard event handlers, for instance to handle a specific set of keys.
type t = Keyboard_event.t -> unit Virtual_dom.Vdom.Effect.t
include Sexplib0.Sexpable.S with type t := t
val t_of_sexp : Sexplib0.Sexp.t -> t
val sexp_of_t : t -> Sexplib0.Sexp.t
with_prevent_default t
handles the event using handler t
, and additionally prevents the default handler.
val only_handle_if : ?prevent_default:unit -> Condition.t -> t -> t
only_handle_if ?prevent_default cond t
handles the event using handler t
if cond ev
evaluates to true (and additionally prevent the default handler if prevent_default
is passed in), and does nothing otherwise.
val handle_by_case : ?prevent_default:unit -> (Condition.t * t) list -> t
handle_by_case
is similar to only_handle_if
, but allows the user to provide a list of handlers and their respective conditions instead of a single one. If multiple handlers' conditions evaluate to true, the first one is used.
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>