window.postMessage Test

One Parameter

window.postMessage("Test 1")

This should throw an exception.

2nd Parameter: "*"

window.postMessage("Test 2", "*")

This should work, but fails in IE8.


window.postMessage("Test 3", "")

This should work, but fails in IE8.


window.postMessage("Test 4", "")

This is the only implementation that works in both IE8 and FF3.


This page provides a demonstration of window.postMessage. It's in the HTML 5 spec. It's implemented in Internet Explorer 8 and Firefox 3, but the implementation in IE8 deviates from the spec.