title: previousSibling and nextSibling returns text?
body: <p>Could someone clarify why the code below returns #text instead of 'li'
   ?</p>
  
  <p>Shouldn't the next sibling of first li be li ?
  Similarly previous sibling of last li be li ?</p>
  
  <pre><code>&lt;body&gt;
    &lt;ul&gt;
      &lt;!-- comment --&gt;
      &lt;li id="A"&gt;&lt;/li&gt;
      &lt;li id="B"&gt;&lt;/li&gt;
      &lt;!-- comment --&gt;
    &lt;/ul&gt;
  
    &lt;script&gt;
      //cache selection of the ul
      var ul = document.querySelector('ul');
  
       //What is the nextSibling of the first li?
      console.log(ul.querySelector('#A').nextSibling.nodeName); //logs text
  
       //What is the previousSibling of the last li?
      console.log(ul.querySelector('#B').previousSibling.nodeName); //logs text
    &lt;/script&gt;
  &lt;/body&gt;
  </code></pre>