title: GWT bookmarket or GWT as an external library
body: <p>I simply want to load a GWT(Google Web Toolkit) app by adding a script tag to the DOM, however because the GWT linker uses <code>document.write()</code> I'm unable to find any good way of doing so. I've found some hacks for doing so on various blog posts but they all seem to fail with the latest version of GWT. Any reasonably non-invasive approach for doing this come to mind?</p>
  
  <p><strong>Clarification:</strong></p>
  
  <p>Normal way to start up a GWT app, in your host html page:</p>
  
  <pre><code>&lt;script type="text/javascript" language="javascript" src="myapp.nocache.js"&gt;&lt;/script&gt; 
  </code></pre>
  
  <p>This, of course, starts up as soon as the page loads. I want to do it at a later time:</p>
  
  <pre><code>function startapp() {
      var head = document.getElementsByTagName('head');
      var s = document.createElement('script');
      s.setAttribute('type', 'text/javascript');
      s.setAttribute('src', 'myapp.nocache.js');
      head[0].appendChild(s);
  }
  </code></pre>