(function (window, undefined) {
var document = window.document,
$ = jQuery = window.jQuery.noConflict(),
_ = window._.noConflict(),
Backbone = window.Backbone.noConflict();
var root = {};
// ...
window.root = root;
} (this));
(function (window, undefined) {
var previousVersion = window.myPlugin;
var myPlugin = {
// ...
noConflict: function() {
window.myPlugin = previousVersion;
return myPlugin;
}
};
window.myPlugin = myPlugin;
} (this));
Cross-origin resource sharing is a web browser technology specification, which defines ways for a web server to allow its resources to be accessed by a web page from a different domain. Such access would otherwise be forbidden by the same origin policy.
wikipedia.org
Implementing CORS on a server is as simple as sending additional HTTP headers, for example:
Access-Control-Allow-Origin: *
Access-Control-Allow-Origin: http://example.com:8080 http://foo.example.com
easyXDM is a Javascript library that enables you as a developer to easily work around the limitation set in place by the Same Origin Policy, in turn making it easy to communicate and expose javascript API's across domain boundaries.
easyXDM.net