Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Source file event_intf.ml
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374(** The event type used for creating virtual-dom callbacks.
The various kinds of handlers are registered by users of virtual dom, and allow them
to pick up events that are scheduled by other users, without these use-cases
interfering with each other.
*)openJs_of_ocamlmoduletypeHandler=sigmoduleAction:sigtypetendvalhandle:Action.t->unitendmoduletypeVisibility_handler=sigvalhandle:unit->unitendmoduletypeS=sigtypeactiontypet=private..typet+=C:action->tvalinject:action->tendmoduletypeEvent=sigtypet=private..typet+=|Ignore(** [Ignore] events are dropped, so no handler is called *)|Viewport_changed(** [Viewport_changed] events are delivered to all visibility handlers *)|Stop_propagation(** [Stop_propagation] prevents the underlying DOM event from propagating up to the
parent elements *)|Prevent_default(** [Prevent_default] prevents the default browser action from occurring as a result
of this event *)|Manyoftlist(** 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. *)moduletypeHandler=HandlermoduletypeVisibility_handler=Visibility_handlermoduletypeS=S(** For registering a new handler and a corresponding new constructor of the Event.t
type *)moduleDefine(Handler:Handler):Swithtypeaction:=Handler.Action.tandtypet:=t(** 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. *)moduleDefine_visibility(VH:Visibility_handler):sigendmoduleExpert:sig(** [handle t] looks up the [Handler.handle] function in the table of [Define]d
functions, unwraps the [Event.t] back into its underlying [Action.t], and applies
the two. This is only intended for internal use by this library, specifically by
the attribute code. *)valhandle:#Dom_html.eventJs.t->t->unit(** [handle_non_dom_event_exn] is the same as [handle] except that it raises in any
case that would have required the [#Dom_html.event Js.t]. In particular, this
can be to feed Actions back to the system that are not triggered by events from
the DOM and do not have a corresponding [#Dom_html.event Js.t]. *)valhandle_non_dom_event_exn:t->unitendend