Remove jasmine.XmlHttpRequest
- Cruft left over from when jasmine offered an "include" function
This commit is contained in:
committed by
Davis W. Frank & Rajan Agaskar
parent
e2af08e0a6
commit
3e5da57cf9
@@ -461,34 +461,6 @@ jasmine.log = function() {
|
|||||||
var spec = jasmine.getEnv().currentSpec;
|
var spec = jasmine.getEnv().currentSpec;
|
||||||
spec.log.apply(spec, arguments);
|
spec.log.apply(spec, arguments);
|
||||||
};
|
};
|
||||||
|
|
||||||
// Provide the XMLHttpRequest class for IE 5.x-6.x:
|
|
||||||
jasmine.XmlHttpRequest = (typeof XMLHttpRequest == "undefined") ? function() {
|
|
||||||
function tryIt(f) {
|
|
||||||
try {
|
|
||||||
return f();
|
|
||||||
} catch(e) {
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
var xhr = tryIt(function() {
|
|
||||||
return new ActiveXObject("Msxml2.XMLHTTP.6.0");
|
|
||||||
}) ||
|
|
||||||
tryIt(function() {
|
|
||||||
return new ActiveXObject("Msxml2.XMLHTTP.3.0");
|
|
||||||
}) ||
|
|
||||||
tryIt(function() {
|
|
||||||
return new ActiveXObject("Msxml2.XMLHTTP");
|
|
||||||
}) ||
|
|
||||||
tryIt(function() {
|
|
||||||
return new ActiveXObject("Microsoft.XMLHTTP");
|
|
||||||
});
|
|
||||||
|
|
||||||
if (!xhr) throw new Error("This browser does not support XMLHttpRequest.");
|
|
||||||
|
|
||||||
return xhr;
|
|
||||||
} : XMLHttpRequest;
|
|
||||||
/**
|
/**
|
||||||
* @namespace
|
* @namespace
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -461,31 +461,3 @@ jasmine.log = function() {
|
|||||||
var spec = jasmine.getEnv().currentSpec;
|
var spec = jasmine.getEnv().currentSpec;
|
||||||
spec.log.apply(spec, arguments);
|
spec.log.apply(spec, arguments);
|
||||||
};
|
};
|
||||||
|
|
||||||
// Provide the XMLHttpRequest class for IE 5.x-6.x:
|
|
||||||
jasmine.XmlHttpRequest = (typeof XMLHttpRequest == "undefined") ? function() {
|
|
||||||
function tryIt(f) {
|
|
||||||
try {
|
|
||||||
return f();
|
|
||||||
} catch(e) {
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
var xhr = tryIt(function() {
|
|
||||||
return new ActiveXObject("Msxml2.XMLHTTP.6.0");
|
|
||||||
}) ||
|
|
||||||
tryIt(function() {
|
|
||||||
return new ActiveXObject("Msxml2.XMLHTTP.3.0");
|
|
||||||
}) ||
|
|
||||||
tryIt(function() {
|
|
||||||
return new ActiveXObject("Msxml2.XMLHTTP");
|
|
||||||
}) ||
|
|
||||||
tryIt(function() {
|
|
||||||
return new ActiveXObject("Microsoft.XMLHTTP");
|
|
||||||
});
|
|
||||||
|
|
||||||
if (!xhr) throw new Error("This browser does not support XMLHttpRequest.");
|
|
||||||
|
|
||||||
return xhr;
|
|
||||||
} : XMLHttpRequest;
|
|
||||||
|
|||||||
Reference in New Issue
Block a user