The Web Applications Working Group has published a W3C Recommendation of HTML5 Web Messaging. The Web Messaging specification defines two mechanisms for communicating between browsing contexts in HTML documents. The cross-document postMessage API allows documents to communicate with each other regardless of their source domain, in a way designed to not enable cross-site scripting attacks. To enable independent pieces of code (e.g. running in different browsing contexts) to communicate directly, authors can use the MessageChannel and MessagePort APIs. Communication channels in this mechanism are implemented as two-way pipes, with a port at each end. Messages sent in one port are delivered at the other port, and vice-versa. Messages are delivered as DOM events, without interrupting or blocking running tasks. Learn more about the Rich Web Client Activity.