package virtual_dom

  1. Overview
  2. Docs
OCaml bindings for the virtual-dom library

Install

Dune Dependency

Authors

Maintainers

Sources

virtual_dom-v0.14.0.tar.gz
sha256=6964ee633d70badc0cc51763f8e2d211c37e5c5388de73ec98aa2d0915d74d6b
md5=fdfe48cea9cb5df272f2462672e0de72

doc/virtual_dom.vdom_test_helpers/Virtual_dom_test_helpers/Handler/index.html

Module Virtual_dom_test_helpers.HandlerSource

Sourcetype t

The type representing an event handler e.g. onclick, onkeydown, etc... These event handlers can be triggered, but take care, accessing any of the fields on the event object in the callback will cause an exception to be raised.

Sourceval sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
Sourceval of_any_exn : Js_of_ocaml.Js.Unsafe.any -> name:string -> t

Converts a js_any into a handler. Throws an exception if the value isn't a javascript function.

Sourceval trigger : ?extra_fields:(string * Js_of_ocaml.Js.Unsafe.any) list -> t -> unit

Triggers the provided event handler.

Use the extra_fields parameter in order to put extra fields on the event. This will let you simulate event handlers that read the event object's properties.

OCaml

Innovation. Community. Security.