package virtual_dom

  1. Overview
  2. Docs
type t = Ui_event.t = ..
type t +=
  1. | Ignore
    (*

    Ignore events are dropped, so no handler is called

    *)
  2. | Viewport_changed
    (*

    Viewport_changed events are delivered to all visibility handlers

    *)
  3. | Stop_propagation
    (*

    Stop_propagation prevents the underlying DOM event from propagating up to the parent elements

    *)
  4. | Prevent_default
    (*

    Prevent_default prevents the default browser action from occurring as a result of this event

    *)
  5. | Many of t list
    (*

    Allows one to represent a list of handlers, which will be individually dispatched to their respective handlers. This is so callbacks can return multiple events of whatever kind.

    *)
module type Handler = sig ... end
module type Visibility_handler = sig ... end
module type S = sig ... end
module Define (Handler : Handler) : S with type action := Handler.Action.t and type t := t

For registering a new handler and a corresponding new constructor of the Event.t type

module Define_visibility (VH : Visibility_handler) : sig ... end

For registering a handler for Viewport_changed events. Note that if this functor is called multiple times, each handler will see all of the events.

module Expert : sig ... end
OCaml

Innovation. Community. Security.