Skip to content
Permalink
Browse files

Fixes #8203. Remove some misguided nulling of elements done in the na…

…me of IE memory cleanup. Based on a patch by davidmurdoch in pull 226.
  • Loading branch information...
dmethvin committed Mar 31, 2011
1 parent 8cdafe7 commit ad4152709cd7c7b7fdafd2dc0b266fd273aff5d5
Showing with 3 additions and 8 deletions.
  1. +0 −1 src/offset.js
  2. +3 −7 src/support.js
@@ -151,7 +151,6 @@ jQuery.offset = {
this.doesNotIncludeMarginInBodyOffset = (body.offsetTop !== bodyMarginTop);

body.removeChild( container );
body = container = innerDiv = checkDiv = table = td = null;

This comment has been minimized.

Copy link
@jdalton

jdalton Mar 31, 2011

Member

woot! \o/

jQuery.offset.initialize = jQuery.noop;
},

@@ -86,15 +86,15 @@
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 ];
@@ -103,8 +103,6 @@
}

root.removeChild( script );
// release memory in IE
root = script = id = null;
}

return _scriptEval;
@@ -223,8 +221,6 @@
el.setAttribute(eventName, "return;");
isSupported = typeof el[eventName] === "function";
}
el = null;

return isSupported;
};

0 comments on commit ad41527

Please sign in to comment.
You can’t perform that action at this time.