Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
[extension API] messaging flow #143
https://developer.chrome.com/extensions/devtools has great overview of communicating between the various pieces, but it's still a little incomplete.
One tricky area is passing messages from a contentscript back into a devtools panel.
There's no direct connectivity between the page being inspected and DevTools extension panels -- we usually recommend this flow: DOM messaging from the injected inspected page code to the content script, then extension messaging to send that to the background page and the front-end iframe.
Example: polymer extension message passing via CustomEvent on the window
another option is: buffering events in inspected page and polling them