Module Note_brr.Evr
DOM events as Note events.
val on_target :
?capture:bool ->
?propagate:bool ->
?default:bool ->
'b Brr.Ev.type' ->
('b Brr.Ev.t -> 'c) ->
Brr.Ev.target ->
'c Note.eventon_target ~capture ~propagate ~default et f t is an event that reports events of type et transformed by f on target t such that:
- If
captureistruethe event occurs during the capture phase. Defaults tofalse. - If
propagateistruethe event is propagated. Defaults totrue. - If
defaultistruethe default behaviour is performed. Defaults totrue.
val on_targets :
?capture:bool ->
?propagate:bool ->
?default:bool ->
'b Brr.Ev.type' ->
(Brr.Ev.target -> 'b Brr.Ev.t -> 'c) ->
Brr.Ev.target list ->
'c Note.eventon_targets is like on_target except the event occurs for the event kind on the given list of targets.
val on_el :
?capture:bool ->
?propagate:bool ->
?default:bool ->
'b Brr.Ev.type' ->
('b Brr.Ev.t -> 'c) ->
Brr.El.t ->
'c Note.eventon_el et f el is for_target et f (El.as_target el).
val on_els :
?capture:bool ->
?propagate:bool ->
?default:bool ->
'b Brr.Ev.type' ->
(Brr.El.t -> 'b Brr.Ev.t -> 'c) ->
Brr.El.t list ->
'c Note.eventon_els et f els is for_targets et f (List.map El.as_target els).
Event mappers
val unit : 'b Brr.Ev.t -> unitunit e is ().
val stamp : 'a -> 'b Brr.Ev.t -> 'astamp v e is v.
Low level functions
XXX. Maybe move that to Brr.Ev
val instruct : ?propagate:bool -> ?default:bool -> 'a Brr.Ev.t -> unitinstruct ?propagate ?default e defines the propagation and default behaviour of e according to propagate (defaults to true) and default (defaults to true).
val listen :
?capture:bool ->
?propagate:bool ->
?default:bool ->
Brr.Ev.target ->
'a Brr.Ev.type' ->
('a Brr.Ev.t -> unit) ->
unit ->
unitval endless_listen :
?capture:bool ->
?propagate:bool ->
?default:bool ->
Brr.Ev.target ->
'a Brr.Ev.type' ->
('a Brr.Ev.t -> unit) ->
unit