modernizr
Version:
Modernizr is a JavaScript library that detects HTML5 and CSS3 features in the user’s browser.
20 lines (19 loc) • 403 B
JavaScript
/*!
{
"name": "Fetch API",
"property": "fetch",
"tags": ["network"],
"caniuse": "fetch",
"notes": [{
"name": "WHATWG Spec",
"href": "https://fetch.spec.whatwg.org/"
}],
"polyfills": ["fetch"]
}
!*/
/* DOC
Detects support for the fetch API, a modern replacement for XMLHttpRequest.
*/
define(['Modernizr'], function(Modernizr) {
Modernizr.addTest('fetch', 'fetch' in window);
});