title: How to get full source code with JavaScript including all comments?
body: <p>How to get the full source code (including comments) with JavaScript but without traversing the DOM tree of the following page?</p>
  
  <p>I am looking for something like <code>document.innerHTML</code> because <code>document.documentElement.outerHTML</code> does not include the surrounding comments.</p>
  
  <pre><code>&lt;!-- begin: desktop.html.tpl --&gt;
  &lt;!DOCTYPE html&gt;
  &lt;html&gt;
    &lt;head&gt;
      &lt;title&gt;FooBar&lt;/title&gt;
    &lt;/head&gt;
    &lt;body&gt;
      &lt;p&gt;This is FooBar&lt;/p&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  &lt;!-- end: desktop.html.tpl --&gt;
  &lt;!-- generation time: 32.446ms --&gt;
  </code></pre>
  
  <p>The expected result should be <strong>exactly</strong> this source.</p>