package virtual_dom
- Overview
- No Docs
You can search for identifiers within the package.
in-package search v0.2.0
Install
    
    dune-project
 Dependency
Authors
Maintainers
Sources
sha256=7f1fa83287458114c5b0cab8aae00d69972d15e1d20a446ce13f246aacef3216
    
    
  doc/virtual_dom.keyboard/Vdom_keyboard/Keyboard_event_handler/Handler/index.html
Module Keyboard_event_handler.HandlerSource
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.
with_prevent_default t handles the event using handler t, and additionally prevents the default handler.
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.
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.