What is it for?
easyXDM is a Javacript library designed to facilitate safe communication between HTML-documents that are residing on different domains, and therefor are restricted from communicating due to the
Same Origin Policy.
Usefull applications for this can be mashups, creating a client-side connection between different web applications or simply exposing some kind of API without requiring the consumer to trust your inherently unsafe
JSONP.
Who is it used by?
easyXDM has been found on the following pages
How does it work?
On its lowest level easyXDM provides a reliable
transport mechanism that is able to transport plain strings.
To do this as reliable and as efficiently as possible easyXDM uses different techniques to do this depending on whats available in the users browser.
All other functionality utilizises the available transport mechanism via the
BestAvailableTransport class, and is therefor agnostic towards the browsers capabilities.
Postmessage
In modern browser easyXDM uses the
PostMessageTransport class, which is part of the HTML5 specification.
window.name
If Postmessage is not available, and the correct parameters are set, then the
NameTransport class will be used. This uses an iframes name property to move data between the different domains. This is the preferred transport after postmessage due to its ability to handle large messages.
Hash/fragment
In browsers where the above transports are not available, easyXDM will fall back to using the
HashTransport class, which is a bit slower and has some limitations on the size of each message.