CROSS-CONTEXT MESSAGING
Cross-document messaging, sometimes abbreviated as XDM, is the capability to pass information between different execution contexts, such as web workers or pages from different origins. For example, a page on www.wrox.com
wants to communicate with a page from p2p.wrox.com
that is contained in an iframe. Prior to XDM, achieving this communication in a secure manner took a lot of work. XDM formalizes this functionality in a way that is both secure and easy to use.
At the heart of XDM is the postMessage()
method. This method name is used in many parts of HTML5 in addition to XDM and is always used for the same purpose: to pass data into another...