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