Extends the lifetime of the install and activate events dispatched on the
ServiceWorkerGlobalScope as part of the service worker lifecycle. This
ensures that any functional events (like FetchEvent) are not dispatched to
the ServiceWorker until it upgrades database schemas, deletes outdated cache
entries, etc.
The parameter passed into the onnotificationclick handler,
the NotificationEvent interface represents
a notification click event that is dispatched on
the ServiceWorkerGlobalScope of a ServiceWorker.
The PushManager interface provides a way to receive notifications from
third-party servers as well as request URLs for push notifications.
This interface has replaced functionality offered by the obsolete
PushRegistrationManager.
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.
Returns a ServiceWorker object if its state is activated (the same object
returned by ServiceWorkerRegistration.active). This property returns null
if the request is a force refresh (Shift + refresh) or if there is no
active worker.
An event handler fired whenever a controllerchange event occurs — when
the document's associated ServiceWorkerRegistration acquires a new
ServiceWorkerRegistration.active worker.
An event handler fired whenever a message event occurs — when incoming
messages are received to the ServiceWorkerContainer object (e.g. via a
MessagePort.postMessage() call.)
Defines whether a service worker is ready to control a page or not.
It returns a Promise that will never reject, which resolves to a
ServiceWorkerRegistration with an ServiceWorkerRegistration.active worker.
Gets a ServiceWorkerRegistration object whose scope URL matches the
provided document URL. If the method can't return a
ServiceWorkerRegistration, it returns a Promise.
scope URL of the registration object you want to return. This is usually
a relative URL.
Returns all ServiceWorkerRegistrations associated with a
ServiceWorkerContainer in an array. If the method can't return
ServiceWorkerRegistrations, it returns a Promise.
Creates or updates a ServiceWorkerRegistration for the given scriptURL.
Currently available options are: scope: A USVString representing a URL
that defines a service worker's registration scope; what range of URLs a
service worker can control. This is usually a relative URL, and it
defaults to '/' when not specified.