I'm trying to call ForceActivate like this :
this.serviceWorker.on('waiting', (registration) => { if (window.confirm('New version available! Refresh?')) { this.serviceWorker.forceActivate(registration); } }); but it fails with error :
service-worker.js:19 Uncaught (in promise) TypeError: this.serviceWorker.forceActivate is not a function
at ServiceWorker. (service-worker.js:19:1)
at sendEvent (index.js:219:1)
at ServiceWorker.trigger (evented.js:113:1)
at ServiceWorker._waiting (service-worker.js:145:1)
at ServiceWorker._onRegistration (service-worker.js:96:1)
at ServiceWorker.register (service-worker.js:53:1)
Maybe i lost smth?
I'm trying to call ForceActivate like this : (service-worker.js:19:1)
at sendEvent (index.js:219:1)
at ServiceWorker.trigger (evented.js:113:1)
at ServiceWorker._waiting (service-worker.js:145:1)
at ServiceWorker._onRegistration (service-worker.js:96:1)
at ServiceWorker.register (service-worker.js:53:1)
Maybe i lost smth?
this.serviceWorker.on('waiting', (registration) => { if (window.confirm('New version available! Refresh?')) { this.serviceWorker.forceActivate(registration); } });
but it fails with error : service-worker.js:19 Uncaught (in promise) TypeError: this.serviceWorker.forceActivate is not a function at ServiceWorker.