I'd like to show some metrics that are captured in the service worker code in my chrome extension.
I'm wondering if it is possible for a chrome extension to communicate directly with a service worker that is registed on the web page you are currently debugging?
The only way I can think of right now, is have my injected script use postMessage
from the page and forward the messages to my devtools extension but that doesn't seem very efficient.
A promising path was using the API chrome.debugger
and use the Chrome Devtools Protocol but the experimental Service Worker part of the protocol is only available in the latest (tip-of-tree) and this version can't be seem to be usable in chrome extensions.
Any suggestions ?