Liking cljdoc? Tell your friends :D

web.SharedWorker

The SharedWorker interface represents a specific kind of worker can be accessed from several browsing contexts, such as several iframes or even workers. They implement an interface different dedicated workers and have a different global scope, web.SharedWorkerGlobalScope.

The SharedWorker interface represents a specific kind of worker
can be accessed from several browsing contexts, such as several
iframes or even workers. They implement an interface different
dedicated workers and have a different global scope, `web.SharedWorkerGlobalScope`.
raw docstring

constructorcljs

Constructor.

The SharedWorker() constructor creates a web.SharedWorker object that executes the script at the specified URL. This script must obey the same-origin policy.

aURL A dom.DOMString representing the URL of the script the worker will execute. It must obey the same-origin policy. name Optional A dom.DOMString specifying an identifying name for the web.SharedWorkerGlobalScope representing the scope of the worker, which is mainly useful for debugging purposes. options Optional An object containing option properties that can set when creating the object instance. Available properties are as follows:

type: A dom.DOMString specifying the type of worker to create. The value can be classic or module. If not specified, the default used is classic. credentials: A dom.DOMString specifying the type of credentials to use for the worker. The value can be omit, same-origin, or include. If not specified, or if type is classic, the default used is omit (no credentials required). name: A dom.DOMString specifying an identifying name for the web.SharedWorkerGlobalScope representing the scope of the worker, which is mainly useful for debugging purposes.

See also: https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker/SharedWorker

Constructor.

The SharedWorker() constructor creates a `web.SharedWorker` object that executes the script at the specified URL. This script must obey the same-origin policy.

aURL
A `dom.DOMString` representing the URL of the script the worker will execute. It must obey the same-origin policy.
name Optional
A `dom.DOMString` specifying an identifying name for the `web.SharedWorkerGlobalScope` representing the scope of the worker, which is mainly useful for debugging purposes.
options Optional
An object containing option properties that can set when creating the object instance. Available properties are as follows:

type: A `dom.DOMString` specifying the type of worker to create. The value can be classic or module. If not specified, the default used is classic.
credentials: A `dom.DOMString` specifying the type of credentials to use for the worker. The value can be omit, same-origin, or include. If not specified, or if type is classic, the default used is omit (no credentials required).
name: A `dom.DOMString` specifying an identifying name for the `web.SharedWorkerGlobalScope` representing the scope of the worker, which is mainly useful for debugging purposes.

See also: `https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker/SharedWorker`
sourceraw docstring

onerrorcljs

(onerror this)

Property.

The AbstractWorker.onerror property of the web.AbstractWorker represents an web.EventHandler, that is a function to be called the error event occurs and bubbles through the web.Worker.

myWorker.onerror = function() { ... };

See also: https://developer.mozilla.org/en-US/docs/Web/API/AbstractWorker/onerror

Property.

The AbstractWorker.onerror property of the `web.AbstractWorker`
represents an `web.EventHandler`, that is a function to be called
the error event occurs and bubbles through the `web.Worker`.

`myWorker.onerror = function() { ... };`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/AbstractWorker/onerror`
sourceraw docstring

portcljs

(port this)

Property.

The port property of the web.SharedWorker interface returns web.MessagePort object used to communicate and control the worker.

myWorker.port;

See also: https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker/port

Property.

The port property of the `web.SharedWorker` interface returns
`web.MessagePort` object used to communicate and control the
worker.

`myWorker.port;`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker/port`
sourceraw docstring

set-onerror!cljs

(set-onerror! this val)

Property.

The AbstractWorker.onerror property of the web.AbstractWorker represents an web.EventHandler, that is a function to be called the error event occurs and bubbles through the web.Worker.

myWorker.onerror = function() { ... };

See also: https://developer.mozilla.org/en-US/docs/Web/API/AbstractWorker/onerror

Property.

The AbstractWorker.onerror property of the `web.AbstractWorker`
represents an `web.EventHandler`, that is a function to be called
the error event occurs and bubbles through the `web.Worker`.

`myWorker.onerror = function() { ... };`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/AbstractWorker/onerror`
sourceraw docstring

set-port!cljs

(set-port! this val)

Property.

The port property of the web.SharedWorker interface returns web.MessagePort object used to communicate and control the worker.

myWorker.port;

See also: https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker/port

Property.

The port property of the `web.SharedWorker` interface returns
`web.MessagePort` object used to communicate and control the
worker.

`myWorker.port;`

See also: `https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker/port`
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close