Get html source using javascript including style
<p>I am trying to get the html source of a website including all the styles of the elements set by the css.  So basically the rendered html of the page, such that if an element is hidden it has <code>style = display:none</code></p>

<p>When using the functions below style attributes added by the css are not included in the string.</p>

<pre><code>document.getElementsByTagName('html')[0].innerHTML;
</code></pre>

<p>or </p>

<pre><code>inDocument.documentElement.innerHTML;
</code></pre>

<p>Is there a way to include the css attributes?</p>

<p>Thanks,
James</p>
