The DedicatedWorkerGlobalScope object (the web.Worker
global
is accessible through the web.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.Worker` global is accessible through the `web.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.
(close this)
Method.
The close() method of the web.DedicatedWorkerGlobalScope
interface
any tasks queued in the DedicatedWorkerGlobalScope's event loop,
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.DedicatedWorkerGlobalScope` interface any tasks queued in the DedicatedWorkerGlobalScope's event loop, closing this particular scope. `self.close();` See also: `https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope/close`
(console this)
Property.
The console read-only property of the web.WorkerGlobalScope
returns a web.Console
object providing access to the browser
for the worker.
var consoleObj = self.console;
See also: https://developer.mozilla.org/en-US/docs/Web/API/WorkerGlobalScope/console
Property. The console read-only property of the `web.WorkerGlobalScope` returns a `web.Console` object providing access to the browser for the worker. `var consoleObj = self.console;` See also: `https://developer.mozilla.org/en-US/docs/Web/API/WorkerGlobalScope/console`
(dump this & args)
Method.
The dump() method of the web.WorkerGlobalScope
interface allows
to write a message to stdout — i.e. in your terminal, in Firefox
This is the same as Firefox's web.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.WorkerGlobalScope` interface allows to write a message to stdout — i.e. in your terminal, in Firefox This is the same as Firefox's `web.window.dump`, but for workers. `dump('My message\\n');` See also: `https://developer.mozilla.org/en-US/docs/Web/API/WorkerGlobalScope/dump`
(import-scripts this & args)
Method.
The importScripts() method of the web.WorkerGlobalScope
interface
imports one or more scripts into the worker's scope.
self.importScripts('foo.js'); self.importScripts('foo.js', 'bar.js', ...);
See also: https://developer.mozilla.org/en-US/docs/Web/API/WorkerGlobalScope/importScripts
Method. The importScripts() method of the `web.WorkerGlobalScope` interface imports one or more scripts into the worker's scope. `self.importScripts('foo.js'); self.importScripts('foo.js', 'bar.js', ...);` See also: `https://developer.mozilla.org/en-US/docs/Web/API/WorkerGlobalScope/importScripts`
(location this)
Property.
The location read-only property of the web.WorkerGlobalScope
returns the web.WorkerLocation
associated with the worker.
is a specific location object, mostly a subset of the web.Location
browsing scopes, but adapted to workers.
var locationObj = self.location;
See also: https://developer.mozilla.org/en-US/docs/Web/API/WorkerGlobalScope/location
Property. The location read-only property of the `web.WorkerGlobalScope` returns the `web.WorkerLocation` associated with the worker. is a specific location object, mostly a subset of the `web.Location` browsing scopes, but adapted to workers. `var locationObj = self.location;` See also: `https://developer.mozilla.org/en-US/docs/Web/API/WorkerGlobalScope/location`
(name this)
Property.
The name read-only property of the web.DedicatedWorkerGlobalScope
returns the name that the web.Worker
was (optionally) given
it was created. This is the name that the web.Worker()
constructor
pass to get a reference to the web.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.DedicatedWorkerGlobalScope` returns the name that the `web.Worker` was (optionally) given it was created. This is the name that the `web.Worker()` constructor pass to get a reference to the `web.DedicatedWorkerGlobalScope`. `var nameObj = self.name;` See also: `https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope/name`
(navigator this)
Property.
The navigator read-only property of the web.WorkerGlobalScope
returns the web.WorkerNavigator
associated with the worker.
is a specific navigator object, mostly a subset of the web.Navigator
browsing scopes, but adapted to workers.
var navigatorObj = self.navigator;
See also: https://developer.mozilla.org/en-US/docs/Web/API/WorkerGlobalScope/navigator
Property. The navigator read-only property of the `web.WorkerGlobalScope` returns the `web.WorkerNavigator` associated with the worker. is a specific navigator object, mostly a subset of the `web.Navigator` browsing scopes, but adapted to workers. `var navigatorObj = self.navigator;` See also: `https://developer.mozilla.org/en-US/docs/Web/API/WorkerGlobalScope/navigator`
(onmessage this)
Property.
The onmessage property of the web.DedicatedWorkerGlobalScope
represents an web.EventHandler
to be called when the message
occurs and bubbles through the web.Worker
— i.e. when a message
sent to the worker using the web.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.DedicatedWorkerGlobalScope` represents an `web.EventHandler` to be called when the message occurs and bubbles through the `web.Worker` — i.e. when a message sent to the worker using the `web.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.DedicatedWorkerGlobalScope
is an web.EventListener
, called whenever an web.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.DedicatedWorkerGlobalScope` is an `web.EventListener`, called whenever an `web.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`
(performance this)
Property.
The performance read-only property of the web.WorkerGlobalScope
returns a performance.Performance
object to be used on the
var perfObj = self.performance;
See also: https://developer.mozilla.org/en-US/docs/Web/API/WorkerGlobalScope/performance
Property. The performance read-only property of the `web.WorkerGlobalScope` returns a `performance.Performance` object to be used on the `var perfObj = self.performance;` See also: `https://developer.mozilla.org/en-US/docs/Web/API/WorkerGlobalScope/performance`
(post-message this a-message transfer-list)
Method.
The postMessage() method of the web.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.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.WorkerGlobalScope
interface
a reference to the WorkerGlobalScope itself. Most of the time
is a specific scope like web.DedicatedWorkerGlobalScope
, web.SharedWorkerGlobalScope
,
web.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.WorkerGlobalScope` interface a reference to the WorkerGlobalScope itself. Most of the time is a specific scope like `web.DedicatedWorkerGlobalScope`, `web.SharedWorkerGlobalScope`, `web.ServiceWorkerGlobalScope`. `var selfRef = self;` See also: `https://developer.mozilla.org/en-US/docs/Web/API/WorkerGlobalScope/self`
(set-location! this val)
Property.
The location read-only property of the web.WorkerGlobalScope
returns the web.WorkerLocation
associated with the worker.
is a specific location object, mostly a subset of the web.Location
browsing scopes, but adapted to workers.
var locationObj = self.location;
See also: https://developer.mozilla.org/en-US/docs/Web/API/WorkerGlobalScope/location
Property. The location read-only property of the `web.WorkerGlobalScope` returns the `web.WorkerLocation` associated with the worker. is a specific location object, mostly a subset of the `web.Location` browsing scopes, but adapted to workers. `var locationObj = self.location;` See also: `https://developer.mozilla.org/en-US/docs/Web/API/WorkerGlobalScope/location`
(set-name! this val)
Property.
The name read-only property of the web.DedicatedWorkerGlobalScope
returns the name that the web.Worker
was (optionally) given
it was created. This is the name that the web.Worker()
constructor
pass to get a reference to the web.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.DedicatedWorkerGlobalScope` returns the name that the `web.Worker` was (optionally) given it was created. This is the name that the `web.Worker()` constructor pass to get a reference to the `web.DedicatedWorkerGlobalScope`. `var nameObj = self.name;` See also: `https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope/name`
(set-navigator! this val)
Property.
The navigator read-only property of the web.WorkerGlobalScope
returns the web.WorkerNavigator
associated with the worker.
is a specific navigator object, mostly a subset of the web.Navigator
browsing scopes, but adapted to workers.
var navigatorObj = self.navigator;
See also: https://developer.mozilla.org/en-US/docs/Web/API/WorkerGlobalScope/navigator
Property. The navigator read-only property of the `web.WorkerGlobalScope` returns the `web.WorkerNavigator` associated with the worker. is a specific navigator object, mostly a subset of the `web.Navigator` browsing scopes, but adapted to workers. `var navigatorObj = self.navigator;` See also: `https://developer.mozilla.org/en-US/docs/Web/API/WorkerGlobalScope/navigator`
(set-onmessage! this val)
Property.
The onmessage property of the web.DedicatedWorkerGlobalScope
represents an web.EventHandler
to be called when the message
occurs and bubbles through the web.Worker
— i.e. when a message
sent to the worker using the web.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.DedicatedWorkerGlobalScope` represents an `web.EventHandler` to be called when the message occurs and bubbles through the `web.Worker` — i.e. when a message sent to the worker using the `web.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.DedicatedWorkerGlobalScope
is an web.EventListener
, called whenever an web.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.DedicatedWorkerGlobalScope` is an `web.EventListener`, called whenever an `web.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.WorkerGlobalScope
interface
a reference to the WorkerGlobalScope itself. Most of the time
is a specific scope like web.DedicatedWorkerGlobalScope
, web.SharedWorkerGlobalScope
,
web.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.WorkerGlobalScope` interface a reference to the WorkerGlobalScope itself. Most of the time is a specific scope like `web.DedicatedWorkerGlobalScope`, `web.SharedWorkerGlobalScope`, `web.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