package js.html
extends WorkerGlobalScope › EventTarget
Available on jsThe
ServiceWorkerGlobalScopeinterface 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:
read only clients:ClientsContains the Clients object associated with the service worker.
onactivate:FunctionAn event handler fired whenever an activate event occurs — when a ServiceWorkerRegistration acquires a new ServiceWorkerRegistration.active worker.
onfetch:FunctionAn event handler fired whenever a fetch event occurs — when a GlobalFetch.fetch is called.
oninstall:FunctionAn event handler fired whenever an install event occurs — when a ServiceWorkerRegistration acquires a new ServiceWorkerRegistration.installing worker.
onmessage:FunctionAn 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.
onnotificationclick:FunctionAn event handler fired whenever a notificationclick event occurs — when a user clicks on a displayed notification.
onpush:FunctionAn event handler fired whenever a push event occurs — when a server push notification is received.
onpushsubscriptionchange:FunctionAn 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 only registration:ServiceWorkerRegistrationContains the ServiceWorkerRegistration object that represents the service worker's registration.
skipWaiting ():Promise<Void>Throws:
null |
DOMError |
|---|
© 2005–2018 Haxe Foundation
Licensed under a MIT license.
https://api.haxe.org/js/html/ServiceWorkerGlobalScope.html