Workbox v4.0.0-rc.3
Pre-releaseThe latest RC release of Workbox v4 includes the following developer-visible changes, in addition to all the changes from the previous pre-releases.
🎉 What's New?
workbox-window
-
Lifecycle events dispatched by the
Workbox
class now include anisUpdate
property. This property can be used to distinguish lifecycle events in the follow scenarios: 1) the very first service worker installation (isUpdate === undefined
), 2) an update from a previous service worker version (isUpdate === true
). -
The
waiting
event dispatched by theWorkbox
class will now include awasWaitingBeforeRegistration
flag in the event that there was already a service worker waiting when the current service worker was registered. When this is true, it typically means there are other open tabs preventing the service worker from activating (or the user is reloading the current tab). See The Service Worker Lifecycle: skip the waiting phase for more details on why this can happen. [#1905]
🐛 What's Fixed?
workbox-routing
- The
message
event listener added viaaddCacheListener()
now no longer requiresevent.data.metadata
to equalworkbox-window
. This allows developers not usingworkbox-window
to still be able to send cache messages to their service worker. [#1906]