Skip to content

Commit ad41527

Browse files
committed
Fixes #8203. Remove some misguided nulling of elements done in the name of IE memory cleanup. Based on a patch by davidmurdoch in pull 226.
1 parent 8cdafe7 commit ad41527

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

src/offset.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,6 @@ jQuery.offset = {
151151
this.doesNotIncludeMarginInBodyOffset = (body.offsetTop !== bodyMarginTop);
152152

153153
body.removeChild( container );
154-
body = container = innerDiv = checkDiv = table = td = null;
155154
jQuery.offset.initialize = jQuery.noop;
156155
},
157156

src/support.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,15 @@
8686
script = document.createElement("script"),
8787
id = "script" + jQuery.now();
8888

89+
// Make sure that the execution of code works by injecting a script
90+
// tag with appendChild/createTextNode
91+
// (IE doesn't support this, fails, and uses .text instead)
8992
try {
9093
script.appendChild( document.createTextNode( "window." + id + "=1;" ) );
9194
} catch(e) {}
9295

9396
root.insertBefore( script, root.firstChild );
9497

95-
// Make sure that the execution of code works by injecting a script
96-
// tag with appendChild/createTextNode
97-
// (IE doesn't support this, fails, and uses .text instead)
9898
if ( window[ id ] ) {
9999
_scriptEval = true;
100100
delete window[ id ];
@@ -103,8 +103,6 @@
103103
}
104104

105105
root.removeChild( script );
106-
// release memory in IE
107-
root = script = id = null;
108106
}
109107

110108
return _scriptEval;
@@ -223,8 +221,6 @@
223221
el.setAttribute(eventName, "return;");
224222
isSupported = typeof el[eventName] === "function";
225223
}
226-
el = null;
227-
228224
return isSupported;
229225
};
230226

0 commit comments

Comments
 (0)