Our webapp registers a service worker. We also have a Chrome extension. What we need is to send messages from service worker to the extension without having the webapp open. What is the right approach to do that?
Our current solution is requesting some URL in the service worker and capturing it in the extension's background script using webRequest
- chrome.webRequest.onBeforeRequest.addListener
. It works but it looks pretty much nonstandardly.
(from wOxxOm's comment, since he hates answering anywhere but in comments)
Your solution is as good as any - before more straightforward support is added, as per this feature request.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With