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.
This commit is contained in:
parent
8cdafe7704
commit
ad4152709c
|
@ -151,7 +151,6 @@ jQuery.offset = {
|
||||||
this.doesNotIncludeMarginInBodyOffset = (body.offsetTop !== bodyMarginTop);
|
this.doesNotIncludeMarginInBodyOffset = (body.offsetTop !== bodyMarginTop);
|
||||||
|
|
||||||
body.removeChild( container );
|
body.removeChild( container );
|
||||||
body = container = innerDiv = checkDiv = table = td = null;
|
|
||||||
jQuery.offset.initialize = jQuery.noop;
|
jQuery.offset.initialize = jQuery.noop;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -86,15 +86,15 @@
|
||||||
script = document.createElement("script"),
|
script = document.createElement("script"),
|
||||||
id = "script" + jQuery.now();
|
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 {
|
try {
|
||||||
script.appendChild( document.createTextNode( "window." + id + "=1;" ) );
|
script.appendChild( document.createTextNode( "window." + id + "=1;" ) );
|
||||||
} catch(e) {}
|
} catch(e) {}
|
||||||
|
|
||||||
root.insertBefore( script, root.firstChild );
|
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 ] ) {
|
if ( window[ id ] ) {
|
||||||
_scriptEval = true;
|
_scriptEval = true;
|
||||||
delete window[ id ];
|
delete window[ id ];
|
||||||
|
@ -103,8 +103,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
root.removeChild( script );
|
root.removeChild( script );
|
||||||
// release memory in IE
|
|
||||||
root = script = id = null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return _scriptEval;
|
return _scriptEval;
|
||||||
|
@ -223,8 +221,6 @@
|
||||||
el.setAttribute(eventName, "return;");
|
el.setAttribute(eventName, "return;");
|
||||||
isSupported = typeof el[eventName] === "function";
|
isSupported = typeof el[eventName] === "function";
|
||||||
}
|
}
|
||||||
el = null;
|
|
||||||
|
|
||||||
return isSupported;
|
return isSupported;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue