Brr_webworkers.Worker
Web workers.
See the Web Workers API.
module Type : sig ... end
The worker type enum.
val opts : ?type':Type.t -> ?credentials:Brr_io.Fetch.Request.Credentials.t -> ?name:Jstr.t -> unit -> opts
opts ~type' ~credentials ~name ()
are worker options with given parameters. See here for defaults and semantics.
The type for Worker
objects.
val as_target : t -> Brr.Ev.target
as_target w
is w
as an event target.
val terminate : t -> unit
terminate w
terminates worker w
.
val post : ?opts:Brr_io.Message.opts -> t -> 'a -> unit
post ~opts w v
posts value v
on port p
with options opts
(the target_origin
option is meaningless in this case).
Shared workers.
These APIs are used by the workers.
module G : sig ... end
Worker global functions