tmpvar/jsdom — Issue #400: Has attribute selector returns all elements in document
Author: ladariha
Created: 2012-02-11 23:35:30+00:00
State: open

If you have following code

```
jsdom.jQueryify(window, "../public/lib/jquery-1.7.min.js", function() {
window.jQuery('body').append(data.toString());
var $ = window.jQuery;
$('*[itemscope]').each(function(){
// if($(this).attr('itemscope').length && !$(this).attr('itemprop').length) // need to test for actual length of itemscope attribute
console.log("------------> "+$(this).prop('tagName'));
});
});
```

than the ```*[itemscope]``` selector returns ALL elements in given html document not only those with itemscope attr. Removing the ```*``` doesn't help. I've tried it with the same version of jquery in common html file in browser (Chrome) and it works as supposed, only elements that have itemscope attr are iterated. Am I missing something or it's a bug?

jsdom v. 2.10.0