The DedicatedWorkerGlobalScope object (the web.workers.Worker
scope) is accessible through the self
keyword. Some additional
functions, namespaces objects, and constructors, not typically
with the worker global scope, but available on it, are listed
the JavaScript Reference. See also: Functions available to workers.
The DedicatedWorkerGlobalScope object (the `web.workers.Worker` scope) is accessible through the `self` keyword. Some additional functions, namespaces objects, and constructors, not typically with the worker global scope, but available on it, are listed the JavaScript Reference. See also: Functions available to workers.
(atob this & args)
Method.
Decodes a string of data which has been encoded using base-64
Method. Decodes a string of data which has been encoded using base-64
(close this)
Method.
The close() method of the web.workers.DedicatedWorkerGlobalScope
discards any tasks queued in the DedicatedWorkerGlobalScope's
loop, effectively closing this particular scope.
self.close();
See also: https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope/close
Method. The close() method of the `web.workers.DedicatedWorkerGlobalScope` discards any tasks queued in the DedicatedWorkerGlobalScope's loop, effectively closing this particular scope. `self.close();` See also: `https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope/close`
(dump this & args)
Method.
The dump() method of the web.workers.WorkerGlobalScope
interface
you to write a message to stdout — i.e. in your terminal, in
only. This is the same as Firefox's window.dump
, but for workers.
dump('My message\\n');
See also: https://developer.mozilla.org/en-US/docs/Web/API/WorkerGlobalScope/dump
Method. The dump() method of the `web.workers.WorkerGlobalScope` interface you to write a message to stdout — i.e. in your terminal, in only. This is the same as Firefox's `window.dump`, but for workers. `dump('My message\\n');` See also: `https://developer.mozilla.org/en-US/docs/Web/API/WorkerGlobalScope/dump`
(name this)
Property.
The name read-only property of the web.workers.DedicatedWorkerGlobalScope
returns the name that the web.workers.Worker
was (optionally)
when it was created. This is the name that the Worker()
constructor
pass to get a reference to the web.workers.DedicatedWorkerGlobalScope
.
var nameObj = self.name;
See also: https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope/name
Property. The name read-only property of the `web.workers.DedicatedWorkerGlobalScope` returns the name that the `web.workers.Worker` was (optionally) when it was created. This is the name that the `Worker()` constructor pass to get a reference to the `web.workers.DedicatedWorkerGlobalScope`. `var nameObj = self.name;` See also: `https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope/name`
(onmessage this)
Property.
The onmessage property of the web.workers.DedicatedWorkerGlobalScope
represents an EventHandler
to be called when the message event
and bubbles through the web.workers.Worker
— i.e. when a message
sent to the worker using the Worker.postMessage
method.
self.onmessage = function() { ... };
See also: https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope/onmessage
Property. The onmessage property of the `web.workers.DedicatedWorkerGlobalScope` represents an `EventHandler` to be called when the message event and bubbles through the `web.workers.Worker` — i.e. when a message sent to the worker using the `Worker.postMessage` method. `self.onmessage = function() { ... };` See also: `https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope/onmessage`
(onmessageerror this)
Property.
The onmessageerror event handler of the web.workers.DedicatedWorkerGlobalScope
is an web.EventListener
, called whenever an web.workers.MessageEvent
type messageerror is fired on the worker—that is, when it receives
message that cannot be deserialized.
onmessageerror = function() { ... };
See also: https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope/onmessageerror
Property. The onmessageerror event handler of the `web.workers.DedicatedWorkerGlobalScope` is an `web.EventListener`, called whenever an `web.workers.MessageEvent` type messageerror is fired on the worker—that is, when it receives message that cannot be deserialized. `onmessageerror = function() { ... };` See also: `https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope/onmessageerror`
(post-message this a-message transfer-list)
Method.
The postMessage() method of the web.workers.DedicatedWorkerGlobalScope
sends a message to the main thread that spawned it. This accepts
single parameter, which is the data to send to the worker. The
may be any value or JavaScript object handled by the structured
algorithm, which includes cyclical references.
postMessage(aMessage, transferList);
See also: https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope/postMessage
Method. The postMessage() method of the `web.workers.DedicatedWorkerGlobalScope` sends a message to the main thread that spawned it. This accepts single parameter, which is the data to send to the worker. The may be any value or JavaScript object handled by the structured algorithm, which includes cyclical references. `postMessage(aMessage, transferList);` See also: `https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope/postMessage`
(self this)
Property.
The self read-only property of the web.workers.WorkerGlobalScope
returns a reference to the WorkerGlobalScope itself. Most of
time it is a specific scope like web.workers.DedicatedWorkerGlobalScope
,
or web.workers.ServiceWorkerGlobalScope
.
var selfRef = self;
See also: https://developer.mozilla.org/en-US/docs/Web/API/WorkerGlobalScope/self
Property. The self read-only property of the `web.workers.WorkerGlobalScope` returns a reference to the WorkerGlobalScope itself. Most of time it is a specific scope like `web.workers.DedicatedWorkerGlobalScope`, or `web.workers.ServiceWorkerGlobalScope`. `var selfRef = self;` See also: `https://developer.mozilla.org/en-US/docs/Web/API/WorkerGlobalScope/self`
(set-name! this val)
Property.
The name read-only property of the web.workers.DedicatedWorkerGlobalScope
returns the name that the web.workers.Worker
was (optionally)
when it was created. This is the name that the Worker()
constructor
pass to get a reference to the web.workers.DedicatedWorkerGlobalScope
.
var nameObj = self.name;
See also: https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope/name
Property. The name read-only property of the `web.workers.DedicatedWorkerGlobalScope` returns the name that the `web.workers.Worker` was (optionally) when it was created. This is the name that the `Worker()` constructor pass to get a reference to the `web.workers.DedicatedWorkerGlobalScope`. `var nameObj = self.name;` See also: `https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope/name`
(set-onmessage! this val)
Property.
The onmessage property of the web.workers.DedicatedWorkerGlobalScope
represents an EventHandler
to be called when the message event
and bubbles through the web.workers.Worker
— i.e. when a message
sent to the worker using the Worker.postMessage
method.
self.onmessage = function() { ... };
See also: https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope/onmessage
Property. The onmessage property of the `web.workers.DedicatedWorkerGlobalScope` represents an `EventHandler` to be called when the message event and bubbles through the `web.workers.Worker` — i.e. when a message sent to the worker using the `Worker.postMessage` method. `self.onmessage = function() { ... };` See also: `https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope/onmessage`
(set-onmessageerror! this val)
Property.
The onmessageerror event handler of the web.workers.DedicatedWorkerGlobalScope
is an web.EventListener
, called whenever an web.workers.MessageEvent
type messageerror is fired on the worker—that is, when it receives
message that cannot be deserialized.
onmessageerror = function() { ... };
See also: https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope/onmessageerror
Property. The onmessageerror event handler of the `web.workers.DedicatedWorkerGlobalScope` is an `web.EventListener`, called whenever an `web.workers.MessageEvent` type messageerror is fired on the worker—that is, when it receives message that cannot be deserialized. `onmessageerror = function() { ... };` See also: `https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope/onmessageerror`
(set-self! this val)
Property.
The self read-only property of the web.workers.WorkerGlobalScope
returns a reference to the WorkerGlobalScope itself. Most of
time it is a specific scope like web.workers.DedicatedWorkerGlobalScope
,
or web.workers.ServiceWorkerGlobalScope
.
var selfRef = self;
See also: https://developer.mozilla.org/en-US/docs/Web/API/WorkerGlobalScope/self
Property. The self read-only property of the `web.workers.WorkerGlobalScope` returns a reference to the WorkerGlobalScope itself. Most of time it is a specific scope like `web.workers.DedicatedWorkerGlobalScope`, or `web.workers.ServiceWorkerGlobalScope`. `var selfRef = self;` See also: `https://developer.mozilla.org/en-US/docs/Web/API/WorkerGlobalScope/self`
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close