an ajax library for everyone and domains
JavaScript
Latest commit ce2076b Dec 22, 2016 @tmcw tmcw Move package to @mapbox namespace.
Permalink
Failed to load latest commit information.
.travis.yml sudo: false Feb 27, 2015
.zuul.yml Use support server Jun 18, 2014
LICENSE First Apr 4, 2013
README.md Zuul it up Jun 12, 2014
corslite.js use location.hostname instead of location.domain May 12, 2015
package.json Move package to @mapbox namespace. Dec 22, 2016
server.js Use support server Jun 18, 2014
test.js Tidy up Jun 12, 2014

README.md

a floating can of corslite

corslite

Build Status

corslite('http://b.tiles.mapbox.com/v3/tmcw.dem.json', function(err, resp) {
    // resp is the XMLHttpRequest object
}, true); // cross origin?

an AJAX library focused on simplicity and supporting IE8-10 with cross domain requests.

We're making a deal with the devil and using XDomainRequest in hopes that it is less a hack than JSONP. This comes with caveats:

  • No headers are permitted on requests
  • Only 'GET'
  • No access error diagnostics (status code, response body) on IE