ServiceWorkerRegistration

The ServiceWorkerRegistration interface of the Service Worker API represents the service worker registration. Available only in secure contexts.

MDN Reference

Properties

Link copied to clipboard

The active read-only property of the This property is initially set to null.

Link copied to clipboard

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.

Link copied to clipboard

The installing read-only property of the initially set to null.

Link copied to clipboard

The navigationPreload read-only property of the ServiceWorkerRegistration interface returns the NavigationPreloadManager associated with the current service worker registration.

Link copied to clipboard

The pushManager read-only property of the support for subscribing, getting an active subscription, and accessing push permission status.

Link copied to clipboard

The scope read-only property of the ServiceWorkerRegistration interface returns a string representing a URL that defines a service worker's registration scope; that is, the range of URLs a service worker can control.

Link copied to clipboard

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.

Link copied to clipboard

The waiting read-only property of the set to null.

Functions

Link copied to clipboard
Link copied to clipboard

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.

Link copied to clipboard

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.

Link copied to clipboard

The showNotification() method of the service worker.

Link copied to clipboard
fun showNotificationAsync(title: String, options: NotificationOptions = definedExternally): Promise<Void>

The showNotification() method of the service worker.

Link copied to clipboard

The unregister() method of the registration and returns a Promise.

Link copied to clipboard

The unregister() method of the registration and returns a Promise.

Link copied to clipboard

The update() method of the worker.

Link copied to clipboard

The update() method of the worker.

Link copied to clipboard