ServiceWorkerRegistration
The ServiceWorkerRegistration interface of the Service Worker API represents the service worker registration. Available only in secure contexts.
Properties
The active read-only property of the ServiceWorkerRegistration interface returns a service worker whose ServiceWorker.state is activating or activated.
The cookies read-only property of the ServiceWorkerRegistration interface returns a reference to the CookieStoreManager interface, which enables a web app to subscribe to and unsubscribe from cookie change events in a service worker.
The installing read-only property of the ServiceWorkerRegistration interface returns a service worker whose ServiceWorker.state is installing.
The navigationPreload read-only property of the ServiceWorkerRegistration interface returns the NavigationPreloadManager associated with the current service worker registration.
The updateViaCache read-only property of the ServiceWorkerRegistration interface returns the value of the setting used to determine the circumstances in which the browser will consult the HTTP cache when it tries to update the service worker or any scripts that are imported via WorkerGlobalScope.importScripts.
The waiting read-only property of the ServiceWorkerRegistration interface returns a service worker whose ServiceWorker.state is installed.
Functions
The getNotifications() method of the ServiceWorkerRegistration interface returns a list of the notifications in the order that they were created from the current origin via the current service worker registration.
The getNotifications() method of the ServiceWorkerRegistration interface returns a list of the notifications in the order that they were created from the current origin via the current service worker registration.
The showNotification() method of the ServiceWorkerRegistration interface creates a notification on an active service worker.
The showNotification() method of the ServiceWorkerRegistration interface creates a notification on an active service worker.
The unregister() method of the ServiceWorkerRegistration interface unregisters the service worker registration and returns a Promise.
The unregister() method of the ServiceWorkerRegistration interface unregisters the service worker registration and returns a Promise.
The update() method of the ServiceWorkerRegistration interface attempts to update the service worker.
The update() method of the ServiceWorkerRegistration interface attempts to update the service worker.