Simon Wicki
Aug 31, 2018 · 1 min read

window.isUpdateAvailable() is a function you have to write yourself. I did it myself in the index.html, but you can put it wherever. see here: https://github.com/zwacky/game-music-player/blob/master/src/index.html#L46-L69

That portion of code will then call the service worker APIs and check if there has been an update, if so, you then proceed with it in the .then() part of it. Hope this is a bit clearer. Good luck!

    Simon Wicki

    Written by

    🚀✨ at @JustWatchcom. Co-organizer of @IonicBerlin.