The Worbox activated
event is one way but I'd like to know outside of this event.
Is there some kind of function/method I could call on-demand to check if the registered service worker is installed/active? Like isServiceWorkerActive()
or something like that?
I can only think of navigator.serviceWorker.controller.state == 'activated'
, is that the proper way of achieving this?