Module

Workers

Package
purescript-workers
Repository
truqu/purescript-workers

#WORKER Source

data WORKER :: Effect

#Location Source

newtype Location

Constructors

Instances

#Navigator Source

newtype Navigator

Constructors

Instances

#WorkerType Source

#Options Source

type Options = { name :: String, requestCredentials :: Credentials, workerType :: WorkerType }

#onError Source

onError :: forall worker e' e. AbstractWorker worker => worker -> (Error -> Eff e' Unit) -> Eff (worker :: WORKER | e) Unit

Event handler for the error event.

#postMessage Source

postMessage :: forall channel msg e. Channel channel => channel -> msg -> Eff (exception :: EXCEPTION, worker :: WORKER | e) Unit

Clones message and transmits it to the Worker object.

#postMessage' Source

postMessage' :: forall channel transfer msg e. Channel channel => channel -> msg -> Array transfer -> Eff (exception :: EXCEPTION, worker :: WORKER | e) Unit

Clones message and transmits it to the port object associated with dedicatedWorker-Global.transfer can be passed as a list of objects that are to be transferred rather than cloned.