package brr

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

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.event

on_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 capture is true the event occurs during the capture phase. Defaults to false.
  • If propagate is true the event is propagated. Defaults to true.
  • If default is true the default behaviour is performed. Defaults to true.
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.event

on_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.event

on_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.event

on_els et f els is for_targets et f (List.map El.as_target els).

Event mappers

val unit : 'b Brr.Ev.t -> unit

unit e is ().

val stamp : 'a -> 'b Brr.Ev.t -> 'a

stamp v e is v.

Low level functions

XXX. Maybe move that to Brr.Ev

val instruct : ?propagate:bool -> ?default:bool -> 'a Brr.Ev.t -> unit

instruct ?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 -> unit
val endless_listen : ?capture:bool -> ?propagate:bool -> ?default:bool -> Brr.Ev.target -> 'a Brr.Ev.type' -> ('a Brr.Ev.t -> unit) -> unit