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.
(caches this)
Property.
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. 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`
(clients this)
Property.
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. 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`
(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.
(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`
(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`
(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`
(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`
(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`
(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`
(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`
(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`
(registration this)
Property.
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. 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`
(set-caches! this val)
Property.
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. 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`
(set-clients! this val)
Property.
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. 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`
(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`
(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`
(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`
(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`
(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`
(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`
(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`
(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`
(set-registration! this val)
Property.
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. 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`
(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`
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close