Module

GlobalScope.Dedicated

Package
purescript-workers
Repository
truqu/purescript-workers

#name Source

name :: forall e. Eff (worker :: WORKER | e) String

Returns dedicatedWorkerGlobal’s name, i.e. the value given to the Worker constructor. Primarily useful for debugging.

#postMessage Source

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

Clones message and transmits it to the Worker object.

#postMessage' Source

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

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

#onMessage Source

onMessage :: forall msg e' e. (msg -> Eff e' Unit) -> Eff (exception :: EXCEPTION, worker :: WORKER | e) Unit

Event handler for the message event

#onMessageError Source

onMessageError :: forall e' e. (Error -> Eff e' Unit) -> Eff (worker :: WORKER | e) Unit

Event handler for the messageError event

Re-exports from GlobalScope

#onUnhandledRejection Source

onUnhandledRejection :: forall e' e. Eff e' Unit -> Eff (worker :: WORKER | e) Unit

#onRejectionHandled Source

onRejectionHandled :: forall e' e. Eff e' Unit -> Eff (worker :: WORKER | e) Unit

#onOnline Source

onOnline :: forall e' e. Eff e' Unit -> Eff (worker :: WORKER | e) Unit

#onOffline Source

onOffline :: forall e' e. Eff e' Unit -> Eff (worker :: WORKER | e) Unit

#onLanguageChange Source

onLanguageChange :: forall e' e. Eff e' Unit -> Eff (worker :: WORKER | e) Unit

#onError Source

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

#navigator Source

navigator :: forall e. Eff (worker :: WORKER | e) Navigator

#location Source

location :: forall e. Eff (worker :: WORKER | e) Location

#close Source

close :: forall e. Eff (worker :: WORKER | e) Unit