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.
(controller this)
Property.
The controller read-only property of the web.ServiceWorkerContainer
returns a web.ServiceWorker
object if its state is activated
same object returned by web.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. The controller read-only property of the `web.ServiceWorkerContainer` returns a `web.ServiceWorker` object if its state is activated same object returned by `web.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`
(get-registration this scope)
Method.
The getRegistration() method of the web.ServiceWorkerContainer
gets a web.ServiceWorkerRegistration
object whose scope URL
the provided document URL. The method returns a Promise that
to a web.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.ServiceWorkerContainer` gets a `web.ServiceWorkerRegistration` object whose scope URL the provided document URL. The method returns a Promise that to a `web.ServiceWorkerRegistration` or undefined. `ServiceWorkerContainer.getRegistration(scope).then(function(ServiceWorkerRegistration) { ... });` See also: `https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/getRegistration`
(get-registrations this & args)
Method.
The getRegistrations() method of the web.ServiceWorkerContainer
returns all web.ServiceWorkerRegistration
s associated with
ServiceWorkerContainer in an array. If the method can't return
it returns a web.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.ServiceWorkerContainer` returns all `web.ServiceWorkerRegistration`s associated with ServiceWorkerContainer in an array. If the method can't return it returns a `web.Promise`. `ServiceWorkerContainer.getRegistrations().then(function(ServiceWorkerRegistrations) { ... });` See also: `https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/getRegistrations`
(oncontrollerchange this)
Property.
The oncontrollerchange property of the web.ServiceWorkerContainer
is an event handler fired whenever a controllerchange event occurs
when the document's associated web.ServiceWorkerRegistration
a new web.ServiceWorkerRegistration.active
worker.
ServiceWorkerContainer.oncontrollerchange = function(controllerchangeevent) { ... }
See also: https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/oncontrollerchange
Property. The oncontrollerchange property of the `web.ServiceWorkerContainer` is an event handler fired whenever a controllerchange event occurs when the document's associated `web.ServiceWorkerRegistration` a new `web.ServiceWorkerRegistration.active` worker. `ServiceWorkerContainer.oncontrollerchange = function(controllerchangeevent) { ... }` See also: `https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/oncontrollerchange`
(onerror this)
Property.
The onerror property of the web.ServiceWorkerContainer
interface
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. The onerror property of the `web.ServiceWorkerContainer` interface 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`
(onmessage this)
Property.
The onmessage property of the web.ServiceWorkerContainer
interface
an event handler fired whenever a message event occurs — when
messages are received to the web.ServiceWorkerContainer
object
via a web.MessagePort.postMessage()
call).
ServiceWorkerContainer.onmessage = function(messageevent) { ... }
See also: https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/onmessage
Property. The onmessage property of the `web.ServiceWorkerContainer` interface an event handler fired whenever a message event occurs — when messages are received to the `web.ServiceWorkerContainer` object via a `web.MessagePort.postMessage()` call). `ServiceWorkerContainer.onmessage = function(messageevent) { ... }` See also: `https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/onmessage`
(ready this)
Property.
The ready read-only property of the web.ServiceWorkerContainer
provides a way of delaying code execution until a service worker
active. It returns a web.Promise
that will never reject, and
waits indefinitely until the web.ServiceWorkerRegistration
with the current page has an web.active
worker. Once that condition
met, it resolves with the web.ServiceWorkerRegistration
.
navigator.serviceWorker.ready.then(function(serviceWorkerRegistration) { ... });
See also: https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/ready
Property. The ready read-only property of the `web.ServiceWorkerContainer` provides a way of delaying code execution until a service worker active. It returns a `web.Promise` that will never reject, and waits indefinitely until the `web.ServiceWorkerRegistration` with the current page has an `web.active` worker. Once that condition met, it resolves with the `web.ServiceWorkerRegistration`. `navigator.serviceWorker.ready.then(function(serviceWorkerRegistration) { ... });` See also: `https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/ready`
(register this & args)
Method.
The register() method of the web.ServiceWorkerContainer
interface
or updates a web.ServiceWorkerRegistration
for 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.ServiceWorkerContainer` interface or updates a `web.ServiceWorkerRegistration` for the given scriptURL. `ServiceWorkerContainer.register(scriptURL, options) .then(function(ServiceWorkerRegistration) { ... });` See also: `https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/register`
(set-controller! this val)
Property.
The controller read-only property of the web.ServiceWorkerContainer
returns a web.ServiceWorker
object if its state is activated
same object returned by web.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. The controller read-only property of the `web.ServiceWorkerContainer` returns a `web.ServiceWorker` object if its state is activated same object returned by `web.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`
(set-oncontrollerchange! this val)
Property.
The oncontrollerchange property of the web.ServiceWorkerContainer
is an event handler fired whenever a controllerchange event occurs
when the document's associated web.ServiceWorkerRegistration
a new web.ServiceWorkerRegistration.active
worker.
ServiceWorkerContainer.oncontrollerchange = function(controllerchangeevent) { ... }
See also: https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/oncontrollerchange
Property. The oncontrollerchange property of the `web.ServiceWorkerContainer` is an event handler fired whenever a controllerchange event occurs when the document's associated `web.ServiceWorkerRegistration` a new `web.ServiceWorkerRegistration.active` worker. `ServiceWorkerContainer.oncontrollerchange = function(controllerchangeevent) { ... }` See also: `https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/oncontrollerchange`
(set-onerror! this val)
Property.
The onerror property of the web.ServiceWorkerContainer
interface
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. The onerror property of the `web.ServiceWorkerContainer` interface 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`
(set-onmessage! this val)
Property.
The onmessage property of the web.ServiceWorkerContainer
interface
an event handler fired whenever a message event occurs — when
messages are received to the web.ServiceWorkerContainer
object
via a web.MessagePort.postMessage()
call).
ServiceWorkerContainer.onmessage = function(messageevent) { ... }
See also: https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/onmessage
Property. The onmessage property of the `web.ServiceWorkerContainer` interface an event handler fired whenever a message event occurs — when messages are received to the `web.ServiceWorkerContainer` object via a `web.MessagePort.postMessage()` call). `ServiceWorkerContainer.onmessage = function(messageevent) { ... }` See also: `https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/onmessage`
(set-ready! this val)
Property.
The ready read-only property of the web.ServiceWorkerContainer
provides a way of delaying code execution until a service worker
active. It returns a web.Promise
that will never reject, and
waits indefinitely until the web.ServiceWorkerRegistration
with the current page has an web.active
worker. Once that condition
met, it resolves with the web.ServiceWorkerRegistration
.
navigator.serviceWorker.ready.then(function(serviceWorkerRegistration) { ... });
See also: https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/ready
Property. The ready read-only property of the `web.ServiceWorkerContainer` provides a way of delaying code execution until a service worker active. It returns a `web.Promise` that will never reject, and waits indefinitely until the `web.ServiceWorkerRegistration` with the current page has an `web.active` worker. Once that condition met, it resolves with the `web.ServiceWorkerRegistration`. `navigator.serviceWorker.ready.then(function(serviceWorkerRegistration) { ... });` See also: `https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/ready`
(start-messages this)
Method.
The startMessages() method of the web.ServiceWorkerContainer
explicitly starts the flow of messages being dispatched from
service worker to pages under its control (e.g. sent via web.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.ServiceWorkerContainer` explicitly starts the flow of messages being dispatched from service worker to pages under its control (e.g. sent via `web.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`
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close