title: Trouble with Element.getElementsByTagName
body: <p>I'm having some trouble using the <code>Element.getElementsByTagName</code> method.</p>
  
  <p>With the following HTML: </p>
  
  <pre><code>&lt;p id="test"&gt;
      &lt;p&gt;&lt;/p&gt;
      &lt;p&gt;&lt;/p&gt;
  &lt;/p&gt;​
  </code></pre>
  
  <p>And the following Javascript:</p>
  
  <pre><code>var a = document.getElementById('test');
  var b = a.getElementsByTagName('p');
  console.log(a);
  console.log(b);​
  </code></pre>
  
  <p><code>a</code> is set to the wrapping paragraph, but <code>b</code> is set to an empty NodeList (example: <a href="http://jsfiddle.net/xGjMN/" rel="nofollow">http://jsfiddle.net/xGjMN/</a>).</p>
  
  <p>I excpected <code>b</code> contain the two inner paragraph elements. Am I completely misunderstanding something here?</p>