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 do
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 4, Firefox 3,
IE8, IE7 and Opera 10.10.
No comments:
Post a Comment