title: "Invalid argument" in IE 8 on jQuery.prepend() on flash objects
body: <p><a href="http://jsbin.com/eyuzoz/3" rel="nofollow">Demo page</a>.</p>
  
  <p>When run in IE 8, this code yields an exception with "Invalid argument." as description and message, and this number: <code>-2147024809</code></p>
  
  <p>I'm using latest (1.7.1) jQuery. Is this a known bug? How to resolve?</p>
  
  <pre><code>var objs=$('object').not('object param[name="wmode"][value="transparent"]');
  var appended = $('&lt;param name="wmode" value="transparent"&gt;&lt;/param&gt;');
  objs.prepend(appended);
  </code></pre>
  
  <p>Html snippet:</p>
  
  <pre><code>&lt;object width="Width in Pixels" height="Height in Pixels" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0"&gt;
    &lt;param name="salign" value="lt"&gt;
    &lt;param name="quality" value="high"&gt;
    &lt;param name="scale" value="noscale"&gt;
  
    &lt;param name="movie" value="http://geekfile.googlepages.com/flvplay.swf"&gt;
    &lt;param name="FlashVars" value="&amp;streamName=FLV_Video_URL&amp;skinName=http://geekfile.googlepages.com/flvskin&amp;autoPlay=true&amp;autoRewind=true"&gt;
    &lt;embed width="Width in Pixels" height="Height in Pixels" flashvars="&amp;streamName=FLV_Video_URL&amp;autoPlay=true&amp;autoRewind=true&amp;skinName=http://geekfile.googlepages.com/flvskin" quality="high" scale="noscale" salign="LT" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" src="http://geekfile.googlepages.com/flvplay.swf" wmode="transparent"&gt;
    &lt;/embed&gt;
  &lt;/object&gt;
  </code></pre>
  
  <p>The error occurs on jquery.js line 5771:</p>
  
  <pre><code>this.insertBefore( elem, this.firstChild );
  </code></pre>
  
  <p><strong>Update</strong>: This is not "a jQuery issue" - it happens with raw javascript.</p>
  
  <p><a href="http://jsbin.com/eyuzoz/11" rel="nofollow">This code throws</a>:</p>
  
  <pre><code>function handle(object) {
    var html = object.innerHTML;
  
    // The following line throws an exception:
    // Also, 'html' is not empty or undefined at this point.
    object.innerHTML = '&lt;param name="wmode" value="transparent"&gt;&lt;/param&gt;' + html;  
  }
  </code></pre>