Created
February 20, 2011 20:02
-
-
Save fabiomcosta/836246 to your computer and use it in GitHub Desktop.
msMatchesSelector errors on unattached nodes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// live demo: http://jsbin.com/oxuri5/9 | |
var div = document.createElement('div'); | |
div.setAttribute('attr', 'test'); | |
console.log(div.msMatchesSelector('[attr="test"]'), ' should be true'); | |
console.log(div.msMatchesSelector('[attr^="test"]'), ' should be true'); | |
console.log(div.msMatchesSelector('[attr$="test"]'), ' should be true'); | |
document.body.appendChild(div); | |
console.log(div.msMatchesSelector('[attr="test"]'), ' should be true'); | |
console.log(div.msMatchesSelector('[attr^="test"]'), ' should be true'); | |
console.log(div.msMatchesSelector('[attr$="test"]'), ' should be true'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment