title: Moving a DOM element containing a dynamically created script tag
body: <p>I'm using the Fish Gadget (<a href="http://abowman.com/google-modules/fish/" rel="noreferrer">http://abowman.com/google-modules/fish/</a>) within a wiki based CMS, and need to reposition the gadget from one HTML element to another. (Note: the fish gadget is an example -- the problem occurs with other gadgets as well.)</p>
  
  <p>If I directly reposition the gadget using the gadgets base class "ig_reset", then everything works. If I try to reposition using a surrounding wrapper, then the iframe used by the gadget seems to take over. Unfortunately I need the flexibility of repositioning using the surrounding wrapper. </p>
  
  <p>This seems to have something to do with moving a SCRIPT tag around in the DOM. The gadget dynamically creates a script and a style tag. If I <em>remove</em> the dynamically created script tag from the DOM, and then reposition the wrapper to another location in the DOM, all works well. If I try to <em>move</em> the script tag to another DOM element then the original problem occurs. So <em>moving</em> a script tag around the DOM seems to be the cause -- regardless of when the move occurs (even post-load).</p>
  
  <p>I'd like to understand what is happening here to cause the frame to take over the page, and also find a better solution than removing the dynamically created script tag.</p>
  
  <p>I put a test up here: <a href="http://solidgone.com/jquery/google-gadget.html" rel="noreferrer">http://solidgone.com/jquery/google-gadget.html</a> -- the demo uses jQuery, but I don't think this is related to jQuery...</p>