UNPKG

modernizr

Version:

Modernizr is a JavaScript library that detects HTML5 and CSS3 features in the user’s browser.

25 lines (24 loc) 568 B
/*! { "name": "XHR responseType", "property": "xhrresponsetype", "tags": ["network"], "notes": [{ "name": "XMLHttpRequest Living Standard", "href": "https://xhr.spec.whatwg.org/#the-responsetype-attribute" }] } !*/ /* DOC Tests for XMLHttpRequest xhr.responseType. */ define(['Modernizr'], function(Modernizr) { Modernizr.addTest('xhrresponsetype', (function() { if (typeof XMLHttpRequest == 'undefined') { return false; } var xhr = new XMLHttpRequest(); xhr.open('get', '/', true); return 'response' in xhr; }())); });