Liking cljdoc? Tell your friends :D

web.workers.ServiceWorkerContainer

The ServiceWorkerContainer interface of the ServiceWorker API an object representing the service worker as an overall unit the network ecosystem, including facilities to register, unregister update service workers, and access the state of service workers their registrations.

The ServiceWorkerContainer interface of the ServiceWorker API
an object representing the service worker as an overall unit
the network ecosystem, including facilities to register, unregister
update service workers, and access the state of service workers
their registrations.
raw docstring

controllercljs

(controller this)

Property.

[Read Only]

The controller read-only property of the web.workers.ServiceWorkerContainer returns a web.workers.ServiceWorker object if its state is (the same object returned by ServiceWorkerRegistration.active). property returns null if the request is a force refresh (Shift or if there is no active worker.

var myController = navigator.serviceWorker.controller;

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

Property.

[Read Only]

The controller read-only property of the `web.workers.ServiceWorkerContainer`
returns a `web.workers.ServiceWorker` object if its state is
(the same object returned by `ServiceWorkerRegistration.active`).
property returns null if the request is a force refresh (Shift
or if there is no active worker.

`var myController = navigator.serviceWorker.controller;`

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

get-registrationcljs

(get-registration this scope)

Method.

The getRegistration() method of the web.workers.ServiceWorkerContainer gets a web.workers.ServiceWorkerRegistration object whose scope matches the provided document URL. The method returns a Promise resolves to a web.workers.ServiceWorkerRegistration or undefined.

ServiceWorkerContainer.getRegistration(scope).then(function(ServiceWorkerRegistration) { ... });

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

Method.

The getRegistration() method of the `web.workers.ServiceWorkerContainer`
gets a `web.workers.ServiceWorkerRegistration` object whose scope
matches the provided document URL. The method returns a Promise
resolves to a `web.workers.ServiceWorkerRegistration` or undefined.

`ServiceWorkerContainer.getRegistration(scope).then(function(ServiceWorkerRegistration) { ... });`

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

get-registrationscljs

(get-registrations this & args)

Method.

The getRegistrations() method of the web.workers.ServiceWorkerContainer returns all web.workers.ServiceWorkerRegistrations associated a ServiceWorkerContainer in an array. If the method can't return it returns a js.Promise.

ServiceWorkerContainer.getRegistrations().then(function(ServiceWorkerRegistrations) { ... });

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

Method.

The getRegistrations() method of the `web.workers.ServiceWorkerContainer`
returns all `web.workers.ServiceWorkerRegistration`s associated
a ServiceWorkerContainer in an array. If the method can't return
it returns a `js.Promise`.

`ServiceWorkerContainer.getRegistrations().then(function(ServiceWorkerRegistrations) { ... });`

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

oncontrollerchangecljs

(oncontrollerchange this)

Property.

[Experimental]

The oncontrollerchange property of the web.workers.ServiceWorkerContainer is an event handler fired whenever a controllerchange event occurs when the document's associated web.workers.ServiceWorkerRegistration a new ServiceWorkerRegistration.active worker.

ServiceWorkerContainer.oncontrollerchange = function(controllerchangeevent) { ... }

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

Property.

[Experimental]

The oncontrollerchange property of the `web.workers.ServiceWorkerContainer`
is an event handler fired whenever a controllerchange event occurs
when the document's associated `web.workers.ServiceWorkerRegistration`
a new `ServiceWorkerRegistration.active` worker.

`ServiceWorkerContainer.oncontrollerchange = function(controllerchangeevent) { ... }`

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

onerrorcljs

(onerror this)

Property.

[Experimental]

The onerror property of the web.workers.ServiceWorkerContainer is an event handler fired whenever an error event occurs in the service workers.

ServiceWorkerContainer.onerror = function(errorevent) { ... }

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

Property.

[Experimental]

The onerror property of the `web.workers.ServiceWorkerContainer`
is an event handler fired whenever an error event occurs in the
service workers.

`ServiceWorkerContainer.onerror = function(errorevent) { ... }`

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

onmessagecljs

(onmessage this)

Property.

[Experimental]

The onmessage property of the web.workers.ServiceWorkerContainer is an event handler fired whenever a message event occurs — when messages are received to the web.workers.ServiceWorkerContainer (e.g., via a MessagePort.postMessage() call).

ServiceWorkerContainer.onmessage = function(messageevent) { ... }

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

Property.

[Experimental]

The onmessage property of the `web.workers.ServiceWorkerContainer`
is an event handler fired whenever a message event occurs — when
messages are received to the `web.workers.ServiceWorkerContainer`
(e.g., via a `MessagePort.postMessage()` call).

`ServiceWorkerContainer.onmessage = function(messageevent) { ... }`

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

readycljs

(ready this)

Property.

[Read Only]

The ready read-only property of the web.workers.ServiceWorkerContainer provides a way of delaying code execution until a service worker active. It returns a js.Promise that will never reject, and waits indefinitely until the web.workers.ServiceWorkerRegistration with the current page has an active worker. Once that condition met, it resolves with the web.workers.ServiceWorkerRegistration.

navigator.serviceWorker.ready.then(function(serviceWorkerRegistration) { ... });

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

Property.

[Read Only]

The ready read-only property of the `web.workers.ServiceWorkerContainer`
provides a way of delaying code execution until a service worker
active. It returns a `js.Promise` that will never reject, and
waits indefinitely until the `web.workers.ServiceWorkerRegistration`
with the current page has an `active` worker. Once that condition
met, it resolves with the `web.workers.ServiceWorkerRegistration`.

`navigator.serviceWorker.ready.then(function(serviceWorkerRegistration) { ... });`

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

registercljs

(register this & args)

Method.

The register() method of the web.workers.ServiceWorkerContainer creates or updates a web.workers.ServiceWorkerRegistration the given scriptURL.

ServiceWorkerContainer.register(scriptURL, options) .then(function(ServiceWorkerRegistration) { ... });

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

Method.

The register() method of the `web.workers.ServiceWorkerContainer`
creates or updates a `web.workers.ServiceWorkerRegistration`
the given scriptURL.

`ServiceWorkerContainer.register(scriptURL, options)
.then(function(ServiceWorkerRegistration) { ... });`

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

set-oncontrollerchange!cljs

(set-oncontrollerchange! this val)

Property.

[Experimental]

The oncontrollerchange property of the web.workers.ServiceWorkerContainer is an event handler fired whenever a controllerchange event occurs when the document's associated web.workers.ServiceWorkerRegistration a new ServiceWorkerRegistration.active worker.

ServiceWorkerContainer.oncontrollerchange = function(controllerchangeevent) { ... }

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

Property.

[Experimental]

The oncontrollerchange property of the `web.workers.ServiceWorkerContainer`
is an event handler fired whenever a controllerchange event occurs
when the document's associated `web.workers.ServiceWorkerRegistration`
a new `ServiceWorkerRegistration.active` worker.

`ServiceWorkerContainer.oncontrollerchange = function(controllerchangeevent) { ... }`

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

set-onerror!cljs

(set-onerror! this val)

Property.

[Experimental]

The onerror property of the web.workers.ServiceWorkerContainer is an event handler fired whenever an error event occurs in the service workers.

ServiceWorkerContainer.onerror = function(errorevent) { ... }

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

Property.

[Experimental]

The onerror property of the `web.workers.ServiceWorkerContainer`
is an event handler fired whenever an error event occurs in the
service workers.

`ServiceWorkerContainer.onerror = function(errorevent) { ... }`

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

set-onmessage!cljs

(set-onmessage! this val)

Property.

[Experimental]

The onmessage property of the web.workers.ServiceWorkerContainer is an event handler fired whenever a message event occurs — when messages are received to the web.workers.ServiceWorkerContainer (e.g., via a MessagePort.postMessage() call).

ServiceWorkerContainer.onmessage = function(messageevent) { ... }

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

Property.

[Experimental]

The onmessage property of the `web.workers.ServiceWorkerContainer`
is an event handler fired whenever a message event occurs — when
messages are received to the `web.workers.ServiceWorkerContainer`
(e.g., via a `MessagePort.postMessage()` call).

`ServiceWorkerContainer.onmessage = function(messageevent) { ... }`

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

start-messagescljs

(start-messages this)

Method.

The startMessages() method of the web.workers.ServiceWorkerContainer explicitly starts the flow of messages being dispatched from service worker to pages under its control (e.g. sent via Client.postMessage()). can be used to react to sent messages earlier, even before that content has finished loading.

ServiceWorkerContainer.startMessages();

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

Method.

The startMessages() method of the `web.workers.ServiceWorkerContainer`
explicitly starts the flow of messages being dispatched from
service worker to pages under its control (e.g. sent via `Client.postMessage()`).
can be used to react to sent messages earlier, even before that
content has finished loading.

`ServiceWorkerContainer.startMessages();`

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

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

× close