aboutsummaryrefslogtreecommitdiffstats
path: root/src/core.js
diff options
context:
space:
mode:
authorMathias Bynens <mathias@qiwi.be>2011-01-24 11:18:57 +0100
committerAnton M <obhvsbypqghgc@gmail.com>2011-02-02 00:59:00 +0100
commit462bb1f66abf239492ee33c60feee3402fe64f77 (patch)
treeb8f92940c69d4aa566bc1f4557521889006957de /src/core.js
parentfdd4101fe93321f33b916a92b5def1328ea331b3 (diff)
downloadjquery-462bb1f66abf239492ee33c60feee3402fe64f77.tar.gz
jquery-462bb1f66abf239492ee33c60feee3402fe64f77.zip
Fixes #8098. Use the fast document.head when available. Don't set unneeded "script.type = text/javascript".
Diffstat (limited to 'src/core.js')
-rw-r--r--src/core.js6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/core.js b/src/core.js
index 915ac6ba4..2e6347236 100644
--- a/src/core.js
+++ b/src/core.js
@@ -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 ) );