Open a window and write to that window
<p>I work on a Firebug extension which is Firefox extension. From my extension I have to create a report. I am trying to open a new window and write code into it. I am able to open a window with the below code but not able to write anything to that window. I get an error "<code>newWindow.document.write()</code> is not secure"</p>

<p>If I use <code>document.body.innerHTML()</code> I am able to write the content to the window but I want to do it in other way as the text generated from my tool has the script and css in it. </p>

<p>Here is my code snippet:</p>

<pre><code>var newWindow = window.open ("","Test","width=335,height=330,resizable=1,toolbar=1,scrollbars=1,status=0")


newWindow .document.open()
// html is the data to be shown on the window. It has script and 
// the content in it.
newWindow .document.write(html)
newWindow .document.close()
</code></pre>
