Web Messaging: Difference between revisions

Content deleted Content added
m fixed header names + general fixes using AWB (8863)
No edit summary
Line 2:
'''Cross-document messaging''', or '''web messaging''', is an [[API]] introduced in the [[WHATWG]] [[HTML5]] draft specification, allowing documents to communicate with one another across different origins, or source domains.<ref name="WHATWG"/> Prior to HTML5, web browsers disallowed [[cross-site scripting]], to protect against security attacks. This practice barred communication between non-hostile pages as well, making document interaction of any kind difficult.<ref name="WHATWG"/><ref name="WebKit"/> Cross-Document messaging allows scripts to interact across these boundaries, while providing a rudimentary level of security.
 
==Requirements and Attributesattributes==
Using the Messaging API's <code>postMessage</code> method, plain text messages can be sent from one domain to another.<ref name="INTRODUCING"/> This requires that the author first obtain the <code>Window</code> object of the receiving document. As a result, messages can be posted to the following:<ref name="WebKit"/>
* other frames or iframes within the sender document's window