Permalink
Browse files
Use XHR on IE 10 rather than XDR
- Loading branch information...
Showing
with
3 additions
and
10 deletions.
-
+3
−10
corslite.js
|
@@ -11,19 +11,14 @@ function corslite(url, callback, cors) { |
|
|
(location.port ? ':' + location.port : ''));
|
|
|
}
|
|
|
|
|
|
- var x;
|
|
|
+ var x = new window.XMLHttpRequest();
|
|
|
|
|
|
function isSuccessful(status) {
|
|
|
return status >= 200 && status < 300 || status === 304;
|
|
|
}
|
|
|
|
|
|
- if (cors && (
|
|
|
- // IE7-9 Quirks & Compatibility
|
|
|
- typeof window.XDomainRequest === 'object' ||
|
|
|
- // IE9 Standards mode
|
|
|
- typeof window.XDomainRequest === 'function'
|
|
|
- )) {
|
|
|
- // IE8-10
|
|
|
+ if (cors && !('withCredentials' in x)) {
|
|
|
+ // IE8-9
|
|
|
x = new window.XDomainRequest();
|
|
|
|
|
|
// Ensure callback is never called synchronously, i.e., before
|
|
@@ -40,8 +35,6 @@ function corslite(url, callback, cors) { |
|
|
}, 0);
|
|
|
}
|
|
|
}
|
|
|
- } else {
|
|
|
- x = new window.XMLHttpRequest();
|
|
|
}
|
|
|
|
|
|
function loaded() {
|
|
|
0 comments on commit
501d35a