getElementsByTagName does not return comment nodes in javascript
<p>I want to retrieve all the nodes present in particular DIV element.see the below test page
(firefox)</p>

<pre><code> &lt;HTML&gt;
 &lt;HEAD&gt;
  &lt;TITLE&gt; New Document &lt;/TITLE&gt;
  &lt;META NAME="Generator" CONTENT="EditPlus"&gt;
  &lt;META NAME="Author" CONTENT=""&gt;
  &lt;META NAME="Keywords" CONTENT=""&gt;
  &lt;META NAME="Description" CONTENT=""&gt;
 &lt;script&gt;
 function processTags()
 {
    var chNodes = document.getElementById('foo').childNodes ;
console.log(chNodes);   
console.log("------");  

  var chNodes = document.getElementById('foo').getElementsByTagName('*') ;
 console.log(chNodes); 
}
&lt;/script&gt;
 &lt;/HEAD&gt;

 &lt;BODY onload="processTags();"&gt;
  &lt;div id="foo"&gt;
  &lt;!-- this is a comment --&gt;this is some text ? &lt;span&gt;this is inside span&lt;/span&gt;
  &lt;div&gt;&lt;p&gt;test&lt;/p&gt;test&lt;div&gt;
  &lt;/div&gt;
 &lt;/BODY&gt;
&lt;/HTML&gt;
</code></pre>

<p>But it does not give me comments tag.. what is the best way to retrieve all tags ??</p>
