-
-
Save dwiash/1431802 to your computer and use it in GitHub Desktop.
XHR2 detects for testling
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
trying out some XHR2 detects for https://github.com/Modernizr/Modernizr/issues/385 | |
testling is awwwesome. | |
curl -u xxx@xxx \ | |
-sSNT XHR2.js 'testling.com/?browsers=iexplore/6.0,iexplore/7.0,iexplore/8.0,iexplore/9.0,chrome/4.0,chrome/5.0,chrome/6.0,chrome/7.0,chrome/8.0,chrome/9.0,chrome/10.0,chrome/11.0,chrome/12.0,chrome/13.0,chrome/14.0,chrome/15.0,firefox/4.0,firefox/5.0,firefox/6.0,firefox/7.0,firefox/8.0,opera/10.0,opera/10.5,opera/11.0,opera/11.5,safari/5.0.5,safari/5.1,firefox/nightly,opera/next,chrome/canary' | |
*/ | |
var test = require('testling'); | |
test('XHR2', function (t) { | |
var progEv = !!(window.ProgressEvent); | |
var fdata = !!(window.FormData); | |
var wCreds = window.XMLHttpRequest && "withCredentials" in new XMLHttpRequest; | |
t.log(['window.ProgressEvent:', progEv]) | |
t.log(['window.FormData:', fdata]) | |
t.log(['WithCredentials:', wCreds]); | |
progEv && fdata && wCreds && t.log('XHR2 ALL THE things') | |
t.end(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment