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.attachEvent

window.postMessage("Test 3", "http://stevesouders.com")

This should work, but fails in IE8.

 
document.attachEvent

window.postMessage("Test 4", "http://stevesouders.com")

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.