concept window.postmessage in category javascript

appears as: window.postMessage
Third-Party JavaScript

This is an excerpt from Manning's book Third-Party JavaScript.

Despite these limitations, window.postMessage on Internet Explorer 8 and 9 is very usable and powerful. But what about legacy browsers, like Internet Explorer versions 6 and 7, which still have a sizable user base, but have absolutely no support for the postMessage API? In this next section, we’ll look at a number of fallback techniques for sending messages between iframes. They’re not always pretty, but they get the job done, even in older browsers. Let’s take a look.

5.1.1. Sending messages using window.postMessage

Using window.postMessage is pretty straightforward. In order to send a message, you call the postMessage method on the target window you want to receive a message. The target window can be the global window object (the window context where your script is executing) or any of the following possible recipients: