]> source.dussan.org Git - jquery.git/commitdiff
Fixes #8203. Remove some misguided nulling of elements done in the name of IE memory...
authorDave Methvin <dave.methvin@gmail.com>
Thu, 31 Mar 2011 01:21:49 +0000 (21:21 -0400)
committerDave Methvin <dave.methvin@gmail.com>
Thu, 31 Mar 2011 01:21:49 +0000 (21:21 -0400)
src/offset.js
src/support.js

index 18261bb570c70bbc43c584dac7c7926ca799d2cf..972278c8da6f6e0cc0e8acc1b581ddcaa60817dd 100644 (file)
@@ -151,7 +151,6 @@ jQuery.offset = {
                this.doesNotIncludeMarginInBodyOffset = (body.offsetTop !== bodyMarginTop);
 
                body.removeChild( container );
-               body = container = innerDiv = checkDiv = table = td = null;
                jQuery.offset.initialize = jQuery.noop;
        },
 
index 095866b9c12022903f2ca73ad65432f8a4eaceef..4c309562f7c17c6a7d17ebfd1c2a5a24af514c5b 100644 (file)
                                script = document.createElement("script"),
                                id = "script" + jQuery.now();
 
+                       // Make sure that the execution of code works by injecting a script
+                       // tag with appendChild/createTextNode
+                       // (IE doesn't support this, fails, and uses .text instead)
                        try {
                                script.appendChild( document.createTextNode( "window." + id + "=1;" ) );
                        } catch(e) {}
 
                        root.insertBefore( script, root.firstChild );
 
-                       // Make sure that the execution of code works by injecting a script
-                       // tag with appendChild/createTextNode
-                       // (IE doesn't support this, fails, and uses .text instead)
                        if ( window[ id ] ) {
                                _scriptEval = true;
                                delete window[ id ];
                        }
 
                        root.removeChild( script );
-                       // release memory in IE
-                       root = script = id  = null;
                }
 
                return _scriptEval;
                        el.setAttribute(eventName, "return;");
                        isSupported = typeof el[eventName] === "function";
                }
-               el = null;
-
                return isSupported;
        };