Is there any way to detect javascript postmessages using chrome extension?

309 views Asked by At

Does anybody sees a way to listen to cross iframe/window communication that is being done using the javascript postMessages ?

Best would be using the chrome.debugger in the background page of an extension. I see that I can listen to HTTP-Traffic using the "Network.requestWillBeSent" and "Network.responseReceived" events. But I would like also to listen to the internal communication on the page.

If my question isn't clear enough, please let me know, I'll try to clarify it more.

Thank you in advance !

1

There are 1 answers

0
Rob W On BEST ANSWER

Run a content script and bind a message event listener. This event listener will then be invoked postMessage is called.