document.insertBefore throws error for unknown reason
<p>I have this piece of code:</p>

<pre><code>  &lt;textarea id="test" style="width: 400px; height: 100px"&gt;&lt;/textarea&gt;
  &lt;script&gt;
    var inserting = document.createElement("div");
    document.insertBefore(inserting,document.getElementById("test"));
  &lt;/script&gt;
</code></pre>

<p>Which should insert <code>DIV id=inserting</code> before <code>textarea id=test</code>, but this error occurs</p>

<pre><code>Node was not found" code: "8
</code></pre>

<p>I use FireFox 3.6 with Firebug on WinXP. Where is the problem?</p>
