How can I listen for messages from the extension popup in ALL (there could be many) active contents?
I have the following configuration for a UI content-script (although I don't actually need the UI -- the content script is only used to add listeners for UI interactions and instrument HTTP requests from the injected page automatically, it just seemed like the messaging hooks might be more ergonomic):
I'd like to be able to receive updates in the content script when the popup makes changes to a configuration variable, so I added in test code to the content-script to listen to a port: