]> source.dussan.org Git - jquery.git/commitdiff
Simplified check for XMLHttpRequest (saving a few bytes) and fixed load()-test
authorJörn Zaefferer <joern.zaefferer@gmail.com>
Wed, 17 Jan 2007 14:17:09 +0000 (14:17 +0000)
committerJörn Zaefferer <joern.zaefferer@gmail.com>
Wed, 17 Jan 2007 14:17:09 +0000 (14:17 +0000)
src/ajax/ajax.js
src/ajax/ajaxTest.js

index 87fe73b943dc232769173bd7afc13526f7e3228b..9c94e13d38f8c6e0f9c2c8da7aacd6e65100a248 100644 (file)
@@ -132,7 +132,7 @@ jQuery.fn.extend({
 });
 
 // If IE is used, create a wrapper for the XMLHttpRequest object
-if ( jQuery.browser.msie && typeof XMLHttpRequest == "undefined" )
+if ( !window.XMLHttpRequest )
        XMLHttpRequest = function(){
                return new ActiveXObject("Microsoft.XMLHTTP");
        };
index 5eea9b80aa9b1b60ac57a586d38492624f68ede2..23a76fd49c74297735d853654939866b5ac395f8 100644 (file)
@@ -70,8 +70,8 @@ test("load(String, Object, Function) - inject without callback", function() {
 test("load(String, Object, Function) - check scripts", function() {
        expect(7);
        stop();
-       var testFoo = undefined;
-       foobar = null;
+       window.testFoo = undefined;
+       window.foobar = null;
        var verifyEvaluation = function() {
          ok( foobar == "bar", 'Check if script src was evaluated after load' );
          ok( $('#ap').html() == 'bar', 'Check if script evaluation has modified DOM');