Liking cljdoc? Tell your friends :D

web.workers.ServiceWorkerGlobalScope

The ServiceWorkerGlobalScope interface of the ServiceWorker API the global execution context of a service worker.

The ServiceWorkerGlobalScope interface of the ServiceWorker API
the global execution context of a service worker.
raw docstring

cachescljs

(caches this)

Property.

[Read Only]

The ServiceWorkerGlobalScope.caches read-only property returns web.service-workers.CacheStorage object associated with the worker.

var myCacheStorage = self.caches;

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

Property.

[Read Only]

The `ServiceWorkerGlobalScope.caches` read-only property returns
`web.service-workers.CacheStorage` object associated with the
worker.

`var myCacheStorage = self.caches;`

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

clientscljs

(clients this)

Property.

[Read Only]

The clients read-only property of the web.workers.ServiceWorkerGlobalScope returns the Clients object associated with the service worker.

swClients = self.clients

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

Property.

[Read Only]

The clients read-only property of the `web.workers.ServiceWorkerGlobalScope`
returns the Clients object associated with the service worker.

`swClients = self.clients`

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

fetchcljs

(fetch this & args)

Method.

Starts the process of fetching a resource. This returns a promise resolves to the Response object representing the response to request. This algorithm is the entry point for the fetch handling to the service worker context.

Method.

Starts the process of fetching a resource. This returns a promise
resolves to the Response object representing the response to
request. This algorithm is the entry point for the fetch handling
to the service worker context.
sourceraw docstring

onactivatecljs

(onactivate this)

Property.

The onactivate property of the web.workers.ServiceWorkerGlobalScope is an event handler fired whenever an activate event occurs (when service worker activates). This happens after installation, when page to be controlled by the service worker refreshes.

ServiceWorkerGlobalScope.onactivate = function(event) { ... };

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

Property.

The onactivate property of the `web.workers.ServiceWorkerGlobalScope`
is an event handler fired whenever an activate event occurs (when
service worker activates). This happens after installation, when
page to be controlled by the service worker refreshes.

`ServiceWorkerGlobalScope.onactivate = function(event) { ... };`

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

onfetchcljs

(onfetch this)

Property.

The onfetch property of the web.workers.ServiceWorkerGlobalScope is an event handler fired whenever a fetch event occurs (usually the ServiceWorkerGlobalScope.fetch method is called.)

ServiceWorkerGlobalScope.onfetch = function(FetchEvent) { ... }

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

Property.

The onfetch property of the `web.workers.ServiceWorkerGlobalScope`
is an event handler fired whenever a fetch event occurs (usually
the `ServiceWorkerGlobalScope.fetch` method is called.)

`ServiceWorkerGlobalScope.onfetch = function(FetchEvent) { ... }`

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

oninstallcljs

(oninstall this)

Property.

The oninstall property of the web.workers.ServiceWorkerGlobalScope is an event handler fired whenever an install event occurs (when service worker installs). This happens before activation.

ServiceWorkerGlobalScope.oninstall = function(event) { ... };

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

Property.

The oninstall property of the `web.workers.ServiceWorkerGlobalScope`
is an event handler fired whenever an install event occurs (when
service worker installs). This happens before activation.

`ServiceWorkerGlobalScope.oninstall = function(event) { ... };`

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

onmessagecljs

(onmessage this)

Property.

The ServiceWorkerGlobalScope.onmessage event of the web.workers.ServiceWorkerGlobalScope is called whenever incoming messages are received.

ServiceWorkerGlobalScope.onmessage = function(MessageEvent) { ... }

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

Property.

The ServiceWorkerGlobalScope.onmessage event of the `web.workers.ServiceWorkerGlobalScope`
is called whenever incoming messages are received.

`ServiceWorkerGlobalScope.onmessage = function(MessageEvent) { ... }`

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

onnotificationclickcljs

(onnotificationclick this)

Property.

The ServiceWorkerGlobalScope.onnotificationclick property is event handler called whenever the notificationclick event is on the web.workers.ServiceWorkerGlobalScope object, that is a user clicks on a displayed notification spawned by ServiceWorkerRegistration.showNotification().

ServiceWorkerGlobalScope.onnotificationclick = function(NotificationEvent) { ... };

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

Property.

The ServiceWorkerGlobalScope.onnotificationclick property is
event handler called whenever the notificationclick event is
on the `web.workers.ServiceWorkerGlobalScope` object, that is
a user clicks on a displayed notification spawned by `ServiceWorkerRegistration.showNotification()`.

`ServiceWorkerGlobalScope.onnotificationclick = function(NotificationEvent) { ... };`

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

onnotificationclosecljs

(onnotificationclose this)

Property.

The ServiceWorkerGlobalScope.onnotificationclose property is event handler called whenever the notificationclose event is on the web.workers.ServiceWorkerGlobalScope object, that is a user closes a displayed notification spawned by ServiceWorkerRegistration.showNotification().

ServiceWorkerGlobalScope.onnotificationclose = function(NotificationEvent) { ... }; ServiceWorkerGlobalScope.addEventListener('notificationclose', function(NotificationEvent) { ... });

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

Property.

The ServiceWorkerGlobalScope.onnotificationclose property is
event handler called whenever the notificationclose event is
on the `web.workers.ServiceWorkerGlobalScope` object, that is
a user closes a displayed notification spawned by `ServiceWorkerRegistration.showNotification()`.

`ServiceWorkerGlobalScope.onnotificationclose = function(NotificationEvent) { ... };
ServiceWorkerGlobalScope.addEventListener('notificationclose', function(NotificationEvent) { ... });`

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

onpushcljs

(onpush this)

Property.

The ServiceWorkerGlobalScope.onpush event of the web.workers.ServiceWorkerGlobalScope is fired whenever a push message is received by a service worker a push server.

ServiceWorkerGlobalScope.onpush = function(PushEvent) { ... } self.addEventListener('push', function(PushEvent) { ... })

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

Property.

The ServiceWorkerGlobalScope.onpush event of the `web.workers.ServiceWorkerGlobalScope`
is fired whenever a push message is received by a service worker
a push server.

`ServiceWorkerGlobalScope.onpush = function(PushEvent) { ... }
self.addEventListener('push', function(PushEvent) { ... })`

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

onpushsubscriptionchangecljs

(onpushsubscriptionchange this)

Property.

The ServiceWorkerGlobalScope.onpushsubscriptionchange event of web.workers.ServiceWorkerGlobalScope interface is fired to a change in push subscription that was triggered outside the control, e.g. when browser refresh the push subscription.

ServiceWorkerGlobalScope.onpushsubscriptionchange = function() { ... } self.addEventListener('pushsubscriptionchange', function() { ... })

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

Property.

The ServiceWorkerGlobalScope.onpushsubscriptionchange event of
`web.workers.ServiceWorkerGlobalScope` interface is fired to
a change in push subscription that was triggered outside the
control, e.g. when browser refresh the push subscription.

`ServiceWorkerGlobalScope.onpushsubscriptionchange = function() { ... }
self.addEventListener('pushsubscriptionchange', function() { ... })`

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

registrationcljs

(registration this)

Property.

[Read Only]

The registration read-only property of the web.workers.ServiceWorkerGlobalScope returns a reference to the web.workers.ServiceWorkerRegistration which represents the service worker's registration.

serviceWorkerRegistration = self.registration

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

Property.

[Read Only]

The registration read-only property of the `web.workers.ServiceWorkerGlobalScope`
returns a reference to the `web.workers.ServiceWorkerRegistration`
which represents the service worker's registration.

`serviceWorkerRegistration = self.registration`

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

set-onactivate!cljs

(set-onactivate! this val)

Property.

The onactivate property of the web.workers.ServiceWorkerGlobalScope is an event handler fired whenever an activate event occurs (when service worker activates). This happens after installation, when page to be controlled by the service worker refreshes.

ServiceWorkerGlobalScope.onactivate = function(event) { ... };

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

Property.

The onactivate property of the `web.workers.ServiceWorkerGlobalScope`
is an event handler fired whenever an activate event occurs (when
service worker activates). This happens after installation, when
page to be controlled by the service worker refreshes.

`ServiceWorkerGlobalScope.onactivate = function(event) { ... };`

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

set-onfetch!cljs

(set-onfetch! this val)

Property.

The onfetch property of the web.workers.ServiceWorkerGlobalScope is an event handler fired whenever a fetch event occurs (usually the ServiceWorkerGlobalScope.fetch method is called.)

ServiceWorkerGlobalScope.onfetch = function(FetchEvent) { ... }

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

Property.

The onfetch property of the `web.workers.ServiceWorkerGlobalScope`
is an event handler fired whenever a fetch event occurs (usually
the `ServiceWorkerGlobalScope.fetch` method is called.)

`ServiceWorkerGlobalScope.onfetch = function(FetchEvent) { ... }`

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

set-oninstall!cljs

(set-oninstall! this val)

Property.

The oninstall property of the web.workers.ServiceWorkerGlobalScope is an event handler fired whenever an install event occurs (when service worker installs). This happens before activation.

ServiceWorkerGlobalScope.oninstall = function(event) { ... };

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

Property.

The oninstall property of the `web.workers.ServiceWorkerGlobalScope`
is an event handler fired whenever an install event occurs (when
service worker installs). This happens before activation.

`ServiceWorkerGlobalScope.oninstall = function(event) { ... };`

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

set-onmessage!cljs

(set-onmessage! this val)

Property.

The ServiceWorkerGlobalScope.onmessage event of the web.workers.ServiceWorkerGlobalScope is called whenever incoming messages are received.

ServiceWorkerGlobalScope.onmessage = function(MessageEvent) { ... }

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

Property.

The ServiceWorkerGlobalScope.onmessage event of the `web.workers.ServiceWorkerGlobalScope`
is called whenever incoming messages are received.

`ServiceWorkerGlobalScope.onmessage = function(MessageEvent) { ... }`

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

set-onnotificationclick!cljs

(set-onnotificationclick! this val)

Property.

The ServiceWorkerGlobalScope.onnotificationclick property is event handler called whenever the notificationclick event is on the web.workers.ServiceWorkerGlobalScope object, that is a user clicks on a displayed notification spawned by ServiceWorkerRegistration.showNotification().

ServiceWorkerGlobalScope.onnotificationclick = function(NotificationEvent) { ... };

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

Property.

The ServiceWorkerGlobalScope.onnotificationclick property is
event handler called whenever the notificationclick event is
on the `web.workers.ServiceWorkerGlobalScope` object, that is
a user clicks on a displayed notification spawned by `ServiceWorkerRegistration.showNotification()`.

`ServiceWorkerGlobalScope.onnotificationclick = function(NotificationEvent) { ... };`

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

set-onnotificationclose!cljs

(set-onnotificationclose! this val)

Property.

The ServiceWorkerGlobalScope.onnotificationclose property is event handler called whenever the notificationclose event is on the web.workers.ServiceWorkerGlobalScope object, that is a user closes a displayed notification spawned by ServiceWorkerRegistration.showNotification().

ServiceWorkerGlobalScope.onnotificationclose = function(NotificationEvent) { ... }; ServiceWorkerGlobalScope.addEventListener('notificationclose', function(NotificationEvent) { ... });

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

Property.

The ServiceWorkerGlobalScope.onnotificationclose property is
event handler called whenever the notificationclose event is
on the `web.workers.ServiceWorkerGlobalScope` object, that is
a user closes a displayed notification spawned by `ServiceWorkerRegistration.showNotification()`.

`ServiceWorkerGlobalScope.onnotificationclose = function(NotificationEvent) { ... };
ServiceWorkerGlobalScope.addEventListener('notificationclose', function(NotificationEvent) { ... });`

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

set-onpush!cljs

(set-onpush! this val)

Property.

The ServiceWorkerGlobalScope.onpush event of the web.workers.ServiceWorkerGlobalScope is fired whenever a push message is received by a service worker a push server.

ServiceWorkerGlobalScope.onpush = function(PushEvent) { ... } self.addEventListener('push', function(PushEvent) { ... })

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

Property.

The ServiceWorkerGlobalScope.onpush event of the `web.workers.ServiceWorkerGlobalScope`
is fired whenever a push message is received by a service worker
a push server.

`ServiceWorkerGlobalScope.onpush = function(PushEvent) { ... }
self.addEventListener('push', function(PushEvent) { ... })`

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

set-onpushsubscriptionchange!cljs

(set-onpushsubscriptionchange! this val)

Property.

The ServiceWorkerGlobalScope.onpushsubscriptionchange event of web.workers.ServiceWorkerGlobalScope interface is fired to a change in push subscription that was triggered outside the control, e.g. when browser refresh the push subscription.

ServiceWorkerGlobalScope.onpushsubscriptionchange = function() { ... } self.addEventListener('pushsubscriptionchange', function() { ... })

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

Property.

The ServiceWorkerGlobalScope.onpushsubscriptionchange event of
`web.workers.ServiceWorkerGlobalScope` interface is fired to
a change in push subscription that was triggered outside the
control, e.g. when browser refresh the push subscription.

`ServiceWorkerGlobalScope.onpushsubscriptionchange = function() { ... }
self.addEventListener('pushsubscriptionchange', function() { ... })`

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

skip-waitingcljs

(skip-waiting this & args)

Method.

The ServiceWorkerGlobalScope.skipWaiting() method of the web.workers.ServiceWorkerGlobalScope the waiting service worker to become the active service worker.

ServiceWorkerGlobalScope.skipWaiting().then(function() { //Do something });

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

Method.

The ServiceWorkerGlobalScope.skipWaiting() method of the `web.workers.ServiceWorkerGlobalScope`
the waiting service worker to become the active service worker.

`ServiceWorkerGlobalScope.skipWaiting().then(function() {
//Do something
});`

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

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

× close