BBVAEngineering / ember-cli-workbox

Offline caching as a progressive enhancement using service workers
MIT License
20 stars 11 forks source link

forceActivate method is not working #109

Open KateDorofieieva opened 2 years ago

KateDorofieieva commented 2 years ago

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?