class ServiceWorkerGlobalScope
package js.html
extends WorkerGlobalScope › EventTarget
Available on HTML5
The ServiceWorkerGlobalScope interface of the ServiceWorker API represents the global execution context of a service worker.
Documentation ServiceWorkerGlobalScope by Mozilla Contributors, licensed under CC-BY-SA 2.5.
See:
Variables
An event handler fired whenever an activate event occurs — when a ServiceWorkerRegistration acquires a new ServiceWorkerRegistration.active worker.
An event handler fired whenever an install event occurs — when a ServiceWorkerRegistration acquires a new ServiceWorkerRegistration.installing worker.
An event handler fired whenever a message event occurs — when incoming messages are received. Controlled pages can use the MessagePort.postMessage() method to send messages to service workers. The service worker can optionally send a response back via the MessagePort exposed in event.data.port, corresponding to the controlled page.
An event handler fired whenever a notificationclick event occurs — when a user clicks on a displayed notification.
onpushsubscriptionchange:Function
An event handler fired whenever a pushsubscriptionchange event occurs — when a push subscription has been invalidated, or is about to be invalidated (e.g. when a push service sets an expiration time.)
read onlyregistration:ServiceWorkerRegistration
Contains the ServiceWorkerRegistration object that represents the service worker's registration.