Package-level declarations
Types
The ExtendableEvent
interface extends the lifetime of the install
and activate
events dispatched on the global scope as part of the service worker lifecycle.
The ExtendableMessageEvent
interface of the Service Worker API represents the event object of a ServiceWorkerGlobalScope/message_event event fired on a service worker (when a message is received on the ServiceWorkerGlobalScope from another context) — extends the lifetime of such events.
This is the event type for fetch
events dispatched on the ServiceWorkerGlobalScope.
The NavigationPreloadManager
interface of the Service Worker API provides methods for managing the preloading of resources in parallel with service worker bootup. Available only in secure contexts.
The NotificationEvent
interface of the Notifications API represents a notification event dispatched on the ServiceWorkerGlobalScope of a ServiceWorker.
The ServiceWorker
interface of the Service Worker API provides a reference to a service worker. Available only in secure contexts.
The ServiceWorkerContainer
interface of the Service Worker API provides an object representing the service worker as an overall unit in the network ecosystem, including facilities to register, unregister and update service workers, and access the state of service workers and their registrations. Available only in secure contexts.
The ServiceWorkerGlobalScope
interface of the Service Worker API represents the global execution context of a service worker. Available only in secure contexts.
The ServiceWorkerRegistration
interface of the Service Worker API represents the service worker registration. Available only in secure contexts.
The WindowClient
interface of the ServiceWorker API represents the scope of a service worker client that is a document in a browsing context, controlled by an active worker.
Properties
Functions
The disable()
method of the NavigationPreloadManager interface halts the automatic preloading of service-worker-managed resources previously started using NavigationPreloadManager.enable() It returns a promise that resolves with undefined
.
The enable()
method of the NavigationPreloadManager interface is used to enable preloading of resources managed by the service worker.
The focus()
method of the WindowClient interface gives user input focus to the current client and returns a Promise that resolves to the existing WindowClient.
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 getRegistration()
method of the ServiceWorkerContainer interface gets a ServiceWorkerRegistration object whose scope URL matches the provided client URL.
The getRegistrations()
method of the ServiceWorkerContainer interface gets all ServiceWorkerRegistrations associated with a ServiceWorkerContainer
, in an array.
The getState()
method of the NavigationPreloadManager interface returns a Promise that resolves to an object with properties that indicate whether preload is enabled and what value will be sent in the Service-Worker-Navigation-Preload HTTP header.
The matchAll()
method of the Clients interface returns a Promise for a list of service worker Client objects.
The navigate()
method of the WindowClient interface loads a specified URL into a controlled client page then returns a Promise that resolves to the existing WindowClient.
The openWindow()
method of the Clients interface creates a new top level browsing context and loads a given URL.
The register()
method of the ServiceWorkerContainer interface creates or updates a ServiceWorkerRegistration for the given scope.
The setHeaderValue()
method of the NavigationPreloadManager interface sets the value of the Service-Worker-Navigation-Preload header that will be sent with requests resulting from a Window/fetch operation made during service worker navigation preloading.
The showNotification()
method of the ServiceWorkerRegistration interface creates a notification on an active service worker.
The skipWaiting()
method of the ServiceWorkerGlobalScope interface forces the waiting service worker to become the active service worker.
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.