How to make app interact with service worker?

I need to retrieve some information from the service worker, like connectivity state.

But service worker script is defined just in the index.html and separated from the app.

How to make app interact with service worker?

1 Like