Fixes #8098. Use the fast document.head when available. Don't set unneeded "script.type = text/javascript".
This commit is contained in:
parent
fdd4101fe9
commit
462bb1f66a
4 changed files with 6 additions and 10 deletions
|
@ -574,10 +574,8 @@ jQuery.extend({
|
|||
if ( data && rnotwhite.test(data) ) {
|
||||
// Inspired by code by Andrea Giammarchi
|
||||
// http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html
|
||||
var head = document.getElementsByTagName("head")[0] || document.documentElement,
|
||||
script = document.createElement("script");
|
||||
|
||||
script.type = "text/javascript";
|
||||
var head = document.head || document.getElementsByTagName( "head" )[0] || document.documentElement,
|
||||
script = document.createElement( "script" );
|
||||
|
||||
if ( jQuery.support.scriptEval() ) {
|
||||
script.appendChild( document.createTextNode( data ) );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue