package brr
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha512=4b3d42eb6a32c1d6f1c5ef003f5311b5029156b31f6e51af098b695c769699e0304b66afd2dd574ecf1084e095bbbc4eac552daab083766cd81ed2f1d9897d51
doc/brr/Brr/G/index.html
Module Brr.G
The global object, its global objects and functions.
If you are:
- In Webworker context, see also
Brr_webworkers.Worker.G - In an audio worklet, see also
Brr_webaudio.Audio.Worklet.G
Global objects
Depending on the JavaScript environment theses values can be undefined. You should know what you are doing or use Jv.defined to test the values.
Because of type dependencies some global objects are defined in their dedicated modules:
Brr_io.Fetch.cachesis the globalcachesobject.Brr_webcrypto.Crypto.cryptois the globalcryptoobject.
val console : Console.tconsole is the global console object (if available). This is what Console.get returns initially.
val document : Document.tdocument is the global document object (if available).
navigator is the global navigator object (if available).
val performance : Performance.tperformance is the global performance object (if available).
Global event target and messaging
val target : Ev.targettarget is globalThis as an event target.
Global properties
is_secure_context is true iff the current context is secure.
Timers
val set_timeout : ms:int -> (unit -> unit) -> timer_idset_timeout ~ms f is a timer calling f in ms milliseconds unless stopped before.
val set_interval : ms:int -> (unit -> unit) -> timer_idset_interval ~ms f is a timer calling f every ms milliseconds until it is stopped.
val stop_timer : timer_id -> unitstop_timer tid stops timer tid.
Animation timing
val request_animation_frame : (float -> unit) -> animation_frame_idrequest_animation_frame f request f now to be called before the next repaint. With now indicating the point in time in ms when the function is called.
val cancel_animation_frame : animation_frame_id -> unitcancel_animation_frame fid cancels the animation frame request a.