]> source.dussan.org Git - jquery.git/commitdiff
jquery core: Closes #2709, avoiding a bug on IE 6 when using globalEval and a base...
authorAriel Flesler <aflesler@gmail.com>
Fri, 16 May 2008 18:37:11 +0000 (18:37 +0000)
committerAriel Flesler <aflesler@gmail.com>
Fri, 16 May 2008 18:37:11 +0000 (18:37 +0000)
src/core.js

index 56a2b1f1c5475f3996d4158ee3c8d601b5ae35f1..0b27f7428e8ab4e865c5ddfb47fd51e2fd0e4cc2 100644 (file)
@@ -637,7 +637,9 @@ jQuery.extend({
                        else
                                script.appendChild( document.createTextNode( data ) );
 
-                       head.appendChild( script );
+                       // Use insertBefore instead of appendChild  to circumvent an IE6 bug.
+                       // This arises when a base node is used (#2709).
+                       head.insertBefore( script, head.firstChild );
                        head.removeChild( script );
                }
        },