From: Brandon Aaron Date: Fri, 27 Mar 2009 18:20:57 +0000 (+0000) Subject: fix for #4378, base tag causes javascript error in IE when loading cross-domain JS... X-Git-Url: http://git.asbjorn.biz/?p=jquery.git;a=commitdiff_plain;h=611d24086c3837da21e0816fa3cb7b826f28da87 fix for #4378, base tag causes javascript error in IE when loading cross-domain JS via ajax --- diff --git a/src/ajax.js b/src/ajax.js index 18d0f96..d22f152 100644 --- a/src/ajax.js +++ b/src/ajax.js @@ -275,7 +275,9 @@ jQuery.extend({ }; } - head.appendChild(script); + // Use insertBefore instead of appendChild to circumvent an IE6 bug. + // This arises when a base node is used (#2709 and #4378). + head.insertBefore( script, head.firstChild ); // We handle everything using the script element injection return undefined;