Fixes #8277. Sets data to undefined rather than null when it is not provided in ajax...
[jquery.git] / src / support.js
index 8b60abd..97b4a42 100644 (file)
@@ -61,7 +61,6 @@
                deleteExpando: true,
                optDisabled: false,
                checkClone: false,
-               _scriptEval: null,
                noCloneEvent: true,
                boxModel: null,
                inlineBlockNeedsLayout: false,
        select.disabled = true;
        jQuery.support.optDisabled = !opt.disabled;
 
+       var _scriptEval = null;
        jQuery.support.scriptEval = function() {
-               if ( jQuery.support._scriptEval === null ) {
+               if ( _scriptEval === null ) {
                        var root = document.documentElement,
                                script = document.createElement("script"),
                                id = "script" + jQuery.now();
 
-                       script.type = "text/javascript";
                        try {
                                script.appendChild( document.createTextNode( "window." + id + "=1;" ) );
                        } catch(e) {}
                        // tag with appendChild/createTextNode
                        // (IE doesn't support this, fails, and uses .text instead)
                        if ( window[ id ] ) {
-                               jQuery.support._scriptEval = true;
+                               _scriptEval = true;
                                delete window[ id ];
                        } else {
-                               jQuery.support._scriptEval = false;
+                               _scriptEval = false;
                        }
 
                        root.removeChild( script );
                        root = script = id  = null;
                }
 
-               return jQuery.support._scriptEval;
+               return _scriptEval;
        };
 
        // Test to see if it's possible to delete an expando from an element