I need to pass a message (raise an event) in a Chrome extension, and have JavaScript on a web page react to it.
In content_script.js of the extension, there should be a function like
raiseXYZevent(data);
JavaScript on the web page http://example.com/mypage.html should execute a handler
 function processXYZevent(data) { ... }
The problem is that content script within an extension cannot interact with JavaScript on the web page directly (it can only modify DOM). Is there a way to make DOM changes from the extension, somehow detect them from the web page and call processXYZevent?
 
     
     
     
    