When creating a script tag to load code for runAsync,
create the tag in the same DOM element that the tag
will be attached to.
Suggested by: Cameron Braid
Review by: jlabanca, knorton
git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@4016 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/dev/core/src/com/google/gwt/core/linker/IFrameLinker.java b/dev/core/src/com/google/gwt/core/linker/IFrameLinker.java
index ab19c33..c165152 100644
--- a/dev/core/src/com/google/gwt/core/linker/IFrameLinker.java
+++ b/dev/core/src/com/google/gwt/core/linker/IFrameLinker.java
@@ -85,7 +85,7 @@
out.print("function __gwtStartLoadingFragment(frag) {");
out.newlineOpt();
out.indentIn();
- out.print(" var script = $doc.createElement('script');");
+ out.print(" var script = document.createElement('script');");
out.newlineOpt();
out.print(" script.src = '" + strongName + "-' + frag + '" + FRAGMENT_EXTENSION + "';");
out.print(" document.getElementsByTagName('head').item(0).appendChild(script);");