polyswarm / ppdns-chrome-extension

MIT License
1 stars 0 forks source link

fix: add listner to reactivate service worker #14

Closed mjbradford89 closed 2 years ago

mjbradford89 commented 2 years ago

While using the extension, I noticed that the service worker was becoming inactive after a period of no onResponseStarted events, (i.e. not browsing for a while). I added a listener for webNavigation to then reattach the listener for onResponseStarted . Found the solution in the links below.

https://stackoverflow.com/questions/66618136/persistent-service-worker-in-chrome-extension https://developer.chrome.com/docs/extensions/reference/webNavigation/