package quill
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=a9a8a9787f8250337187bb7b21cb317c41bfd2ecf08bcfe0ab407c7b6660764d
sha512=fe13cf257c487e41efe2967be147d80fa94bac8996d3aab2b8fd16f0bbbd108c15e0e58c025ec9bf294d4a0d220ca2ba00c3b1b42fa2143f758c5f0ee4c15782
doc/quill.editor/Quill_editor/Brr_ext/Ev/index.html
Module Brr_ext.Ev
Source
include module type of struct include Brr.Ev end
Event types
type 'a type' = 'a Brr.Ev.type'
The type for events which can pose as values of type 'a
. See the predefined event types.
module Type = Brr.Ev.Type
Event types.
Events
type target = Brr.Ev.target
The type for EventTarget
abiding objects.
type init = Brr.Ev.init
The type for event initialisation objects.
val init : ?bubbles:bool -> ?cancelable:bool -> ?composed:bool -> unit -> init
init
is an event initialisation object with given parameters.
type 'a event = 'a Brr.Ev.event
See t
.
create ?init t
is an event of type t
initialised with init
.
val as_type : 'a t -> 'a
as_type e
specialises the event to its type.
current_target e
is the target currently handling e
. See also target
.
composed_path e
are the targets on which listeners will be invoked.
val event_phase : 'a t -> [ `None | `Capturing | `At_target | `Bubbling ]
val bubbles : 'a t -> bool
bubbles e
is true
whether the event can bubble up through the DOM.
val stop_propagation : 'a t -> unit
stop_propagation e
prevents the propagation of e
in the DOM, remaining handlers of e
on the current_target
are still invoked use stop_immediate_propagation
to stop these. The user agent's default action for e
still occurs, use prevent_default
to prevent that.
val stop_immediate_propagation : 'a t -> unit
stop_immediate_propagation e
is like stop_propagation
but it also prevents the invocation of other handlers for e
that may be listening on the current_target
.
val cancelable : 'a t -> bool
cancelable e
indicates whether e
can be cancelled, that is whether prevent_default
will succeed.
val prevent_default : 'a t -> unit
prevent_default e
prevents the user agent's default action for e
to happen. This may have no effect if cancelable
is false
, see default_prevented
.
val default_prevented : 'a t -> bool
default_prevented e
is true
indicates whether a call to prevent_default
succeded.
val is_trusted : 'a t -> bool
is_trusted e
is true
if e
was dispatched by the user agent and false
otherwise.
val timestamp_ms : 'a t -> float
timestamp_ms e
is the time in milleseconds since the POSIX epoch when the event was created.
dispatch e t
dispatches event e
on target t
.
Listening
type listen_opts = Brr.Ev.listen_opts
The type for listening options.
val listen_opts :
?capture:bool ->
?once:bool ->
?passive:bool ->
unit ->
listen_opts
listen_opts ()
are options for listen
.
capture
indicates if events are listened before being dispatched to descendents of the target in the DOM tree. Defaults tofalse
.once
indicates at most a single event will be listened. Iftrue
the listener is automatically removed when invoked. Defaults tofalse
.passive
indicates the listener never callsprevent_default
on the event. If it does nothing will happen (except maybe a console warning). Defaults tofalse
.
type listener = Brr.Ev.listener
The type for event listeners. See listen
.
val listen :
?opts:listen_opts ->
'a type' ->
('a t -> unit) ->
target ->
listener
listen ~opts type' f t
is a listener listening for events of type type'
on target t
with function f
and options opts
(see listen_opts
for defaults). The listener can be used to unlisten
, if you don't need to, you can just `ignore` the result.
val unlisten : listener -> unit
unlisten l
stops the listening done by l
.
next type' t
is a future that determines the next event of type type'
on target t
. For capture
see listen_opts
.
Event subobjects
module Data_transfer = Brr.Ev.Data_transfer
DataTransfer
objects.
module Clipboard = Brr.Ev.Clipboard
Clipboard events.
module Composition = Brr.Ev.Composition
Composition events.
module Error = Brr.Ev.Error
Error events.
module Extendable = Brr.Ev.Extendable
Extendable events.
module Focus = Brr.Ev.Focus
Focus events.
module Hash_change = Brr.Ev.Hash_change
Hash change events
module Input = Brr.Ev.Input
Input events.
module Keyboard = Brr.Ev.Keyboard
Keyboard events.
module Mouse = Brr.Ev.Mouse
Mouse events.
module Drag = Brr.Ev.Drag
Drag events.
module Pointer = Brr.Ev.Pointer
Pointer events
module Wheel = Brr.Ev.Wheel
Wheel events.
Predefined types
Due to type dependencies some events are defined in their dedicated modules:
- History events
- Fetch events
- Form events
- Media device events
- Media recorder events
- Media stream events
- Media track events
- Message events
- Notification events
- Storage events
Events that have no special type dependencies are defined here, in alphabetic order.
val activate : Extendable.t type'
activate
is the activate
event.
beforeinput
is the beforeinput
event.
val beforeunload : void
beforeunload
is the beforeunload
event.
val canplaythrough : void
canplaythrough
is the type for canplaythrough
events
val clipboardchange : Clipboard.t type'
change
is the clipboardchange
event.
val compositionend : Composition.t type'
compositionstend
is the compositionend
event.
val compositionstart : Composition.t type'
compositionstart
is the compositionstart
event.
val compositionudpate : Composition.t type'
compositionstupdate
is the compositionupdate
event.
val controllerchange : void
controllerchange
is the controllerchange
event.
val copy : Clipboard.t type'
copy
is the copy
event.
val cut : Clipboard.t type'
cut
is the cut
event.
val dom_content_loaded : void
dom_content_loaded
is the type for DOMContentLoaded_event
events.
val durationchange : void
durationchange
is the type for durationchange
events
val fullscreenchange : void
fullscreenchange
is the fullscreenchange
event.
val fullscreenerror : void
fullscreenerror
is the fullscreenerror
event.
gotpointercaputer
is the gotpointercapture
event.
val hashchange : Hash_change.t type'
hashchange
is the type for hashchange
events
val install : Extendable.t type'
install
is the install
event.
val keydown : Keyboard.t type'
keydown
is the keydown
event
val keyup : Keyboard.t type'
keyup
is the keyup
event
val languagechange : void
languagechange
is the type type for languagechange
events.
val loadeddata : void
loadeddata
is the type for loadeddata
events
val loadedmetadata : void
loadedmetadata
is the type for loadedmetadata
events
lostpointercapture
is the lostpointercaptpure
event.
mouseenter
is the type for mouseenter
events.
mouseleave
is the type for mouseleave
events.
val paste : Clipboard.t type'
paste
is the paste
event.
pointercancel
is the pointercancel
event.
pointerdown
is the pointerdown
event.
pointerneter
is the pointerenter
event.
pointerleave
is the pointerleave
event.
val pointerlockchange : void
pointerlockchange
is the pointerlockchange
event.
val pointerlockerror : void
pointerlockerror
is the pointerlockerror
event.
pointemove
is the pointermove
event.
pointerout
is the pointerout
event.
pointerover
is the pointerover
event.
pointerrawupdate
is the pointerrawupdate
event.
val ratechange : void
ratechange
is the type for ratechange
events
val statechange : void
statechange
is the type for statechange
events.
val timeupdate : void
timeupdate
is the type for timeupdate
events
val updatefound : void
updatefound
is the type for updatefound
events.
val visibilitychange : void
visibilitychange
is the type for visibilitychange
events.
val volumechange : void
volumechange
is the type for volumechange
events
Event type for the selectionchange
event, fired on the document when the current text selection changes.