Can i use document.querySelectorAll() instead of document.getElementsByClassName() to work well in IE8?
<pre><code>&lt;html&gt;
&lt;head&gt;&lt;/head&gt;
&lt;body&gt;
&lt;div class="abcd"&gt;&lt;/div&gt;
&lt;script&gt;
var y = document.getElementsByClassName('abcd');
var x = document.querySelectorAll("abcd");
alert(y[0].hasChildNodes());
alert(x[0].hasChildNodes());
&lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>In above code first alert give false but not in alert two. how do i get same result with document.querySelectorAll ?
basically i want it to work in IE8.</p>
