package virtual_dom

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Source file vdom_keyboard.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
module Grouped_help_text = Grouped_help_text
module Help_text = Help_text
module Keyboard_event_handler = Keyboard_event_handler
module Keystroke = Keystroke
module Variable_keyboard_event_handler = Variable_keyboard_event_handler
module Keyboard_event = Keyboard_event

let with_keyboard_handler node keyboard_handler =
  let open Virtual_dom.Vdom in
  Node.div
    ~attrs:
      [ Attr.on_keydown (fun event ->
          Keyboard_event_handler.handle_or_ignore_event keyboard_handler event)
      ]
    [ node ]
;;
OCaml

Innovation. Community. Security.