Skip to content

WorkboxLifecycleEventMap ​

Interface workbox-window

Properties ​

PropertyTypeDefaultDescription
activatedWorkboxLifecycleEventThe activated event is dispatched if the state of a workbox-window.Workbox instance's service worker changes to activated.

workbox-window.Workbox#activated
activatingWorkboxLifecycleEvent
controllingWorkboxLifecycleEventThe controlling event is dispatched if a [controllerchange]https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/oncontrollerchange fires on the service worker [container]https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer and the [scriptURL]https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/scriptURL of the new [controller]https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/controller matches the scriptURL of the Workbox instance's [registered service worker]https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw.

workbox-window.Workbox#controlling
installedWorkboxLifecycleEventThe installed event is dispatched if the state of a workbox-window.Workbox instance's service worker changes to installed.

Then can happen either the very first time a service worker is installed, or after an update to the current service worker is found. In the case of an update being found, the event's isUpdate property will be true.

workbox-window.Workbox#installed
installingWorkboxLifecycleEventThe installing event is dispatched if the service-worker find the new version and start installing.

workbox-window.Workbox#installing
redundantWorkboxLifecycleEventThe redundant event is dispatched if the state of a workbox-window.Workbox instance's [registered service worker]https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw changes to redundant.

workbox-window.Workbox#redundant
waitingWorkboxLifecycleWaitingEventThe waiting event is dispatched if the state of a workbox-window.Workbox instance's [registered service worker]https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw changes to installed and then doesn't immediately change to activating. It may also be dispatched if a service worker with the same [scriptURL]https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/scriptURL was already waiting when the workbox-window.Workbox#register method was called.

workbox-window.Workbox#waiting

Released under the MIT License.