1

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?

DenaliHardtail
  • 27,362
  • 56
  • 154
  • 233

1 Answers1

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