Created
August 24, 2011 17:50
-
-
Save edvakf/1168672 to your computer and use it in GitHub Desktop.
Opera's bug, xpath "text()" returns non-text elements
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
javascript:(function(){ | |
var x=document.evaluate('//body//text()',document,null,7,null); | |
for(var i=0,l=x.snapshotLength,e;e=x.snapshotItem(i++);i<l) | |
if(e.nodeType!==3) | |
console.log(e) | |
})() | |
// => [object HTMLDivElement] | |
//http://www.montrealgazette.com/Canadian+wireless+startup+takes+maverick+approach/5300364/story.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment