This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
The ServiceWorkerState
is associated with its ServiceWorker
's state.
installing
ExtendableEvent.waitUntil()
can be called inside the install
event handler to extend the life of the installing worker until the passed promise resolves successfully. This is primarily used to ensure that the service worker is not active until all of the core caches are populated.installed
activating
ExtendableEvent.waitUntil()
can be called inside the onactivate
event handler to extend the life of the active worker until the passed promise resolves successfully. No functional events are dispatched until the state becomes activated.activated
redundant
Specification | Status | Comment |
---|---|---|
Service Workers The definition of 'ServiceWorkerState' in that specification. | Editor's Draft | Initial definition |
© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerState