Web Messaging: Difference between revisions

Content deleted Content added
m Reverted edits by 61.174.53.137 (talk) to last revision by Voidvector (HG)
Line 2:
'''Web Messaging''' or '''cross-document 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.
 
#REDIRECT [[
# Target page name
]]
==Requirements and attributes==
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"/>