@mapbox/corslite

    0.0.7 • Public • Published

    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

    Keywords

    none

    Install

    npm i @mapbox/corslite

    DownloadsWeekly Downloads

    8,672

    Version

    0.0.7

    License

    BSD

    Last publish

    Collaborators

    • mapbox-machine-user
    • mapbox-npm-ci
    • mapbox-npm-advanced-actions
    • mapbox-npm-09
    • mapbox-npm-08
    • mapbox-npm-07
    • mapbox-npm-06
    • mapbox-npm-05
    • mapbox-npm-04
    • mapbox-npm-03
    • mapbox-npm-02
    • mapbox-npm-01
    • mapbox-npm
    • mapbox-admin