While debugging a web app that uses window.opener.postMessage()
I noticed Fiddler was not showing traffic for the PostMessage event. How does PostMessage()
work and how can I view the messages being sent between the two pages?
Asked
Active
Viewed 4,629 times
1

DenaliHardtail
- 27,362
- 56
- 154
- 233
-
`postMessage` doesn't send to the server, it's just internal within the browser. – Barmar Sep 06 '16 at 20:06
1 Answers
1
See the MDN docs for more info: https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage
Fiddler won't show traffic because it can only sniff what happens between your browser and the rest of the network. In postMessage
it all happens between frames and windows on the same machine, and no network traffic occurs.
One way to see what is happening would be to use console.log(e);
calls inside your postMessage
handlers so you can see the results in the dev tools console.

mherzig
- 1,528
- 14
- 26