HTML5 App | Setting Standards

CAT | postMessage()

Similar to the last example except that this example shows a post happening on another domain.

HTML5 postMessage (cross domain)

From John Resig,

“This particular API adds a new method to every window (including the current window, popups, iframes, and frames) that allows you to send textual messages from your current window to any other – regardless of any cross-domain policies that might exist.

Specifically, you’re given a new window.postMessage(“string”) method that generates a message DOM event on the document of the receiving document. This event object contains the message as a property: event.data which the receiving document can use however they see fit.”

HTML5 postMessage (same domain)

Theme Design by devolux.nh2.me