O'Reilly logo

Sams Teach Yourself HTML5 in 10 Minutes by Steven Holzner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Lesson 7. Getting the Point Across with Messaging

HTML5 lets you send messages in a cross-window or cross-domain way; we’ll see how that works in this lesson.

Say, for example, that in page A, page B—which comes from the same directory on the server—appears in an <iframe> element. Now you can send text messages from page A to page B and make use of those messages in page B. That’s cross-window messaging.

In fact, page B can come from an entirely different domain and still appear in the <iframe> in page A, and you can still send messages to page A. That’s called cross-domain messaging, and it used to be prohibited, but now you can do it. So even if page B comes from an entirely different server than page A, you can still send page B messages. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required