Skip to content
daepark edited this page Sep 13, 2010 · 8 revisions
Modern browsers now support cross-window/cross-domain/cross-origin messaging through

window.postMessage.

postmessage is a simple wrapper for window.postMessage and the window message event,
for those who wish to use this feature in a more jQuery-like way.

postmessage falls back to window location hash polling for browsers that does not support window.postMessage (i.e., IE7).

postmessage allows messaging back and forth using
JSON where window.postMessage only allows simple string-based messages.

postmessage also allows for complete request/response roundtrips using success/error callbacks
modeled after jQuery.ajax.

postmessage is tested on Safari 4, WebKit (Nightlies), Chrome, Firefox 3, IE8 and IE7.

Clone this wiki locally