package virtual_dom

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

    Viewport_changed events are delivered to all visibility handlers

    *)
  2. | Viewport_changed
    (*

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

    *)
  3. | Stop_propagation
    (*

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

    *)
  4. | Prevent_default
    (*

    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.

    *)
  5. | Many of t list
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.