jon.recoil.org

Module Merlin_client.WebworkerSource

include module type of struct include Brr_webworkers.Worker end

Enumerations

The worker type enum.

Workers

The type for worker options.

val opts : ?type':Type.t -> ?credentials:Brr_io.Fetch.Request.Credentials.t -> ?name:Jstr.t -> unit -> Merlin_client.Webworker.opts

opts ~type' ~credentials ~name () are worker options with given parameters. See here for defaults and semantics.

The type for Worker objects.

create ~opts uri creates a worker that executes the script uri. This may throw a Jv.Error exception.

as_target w is w as an event target.

val terminate : Merlin_client.Webworker.t -> unit

terminate w terminates worker w.

Shared workers

Shared workers.

Worker context

These APIs are used by the workers.

val ami : unit -> bool

ami () is true if we are executing in a worker context.

Worker global functions

Sourceval post : Merlin_client.Webworker.t -> 'a -> unit