Created
September 25, 2012 21:52
-
-
Save termi/3784699 to your computer and use it in GitHub Desktop.
:scope support test
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
function testForRealScopePreudoClassSupport() { | |
var scopeSupport = false | |
, tmp = document.createElement("b") | |
; | |
tmp.innerHTML = "<i>t</i>"; | |
try { | |
scopeSupport = tmp.querySelector(":scope>i"); | |
scopeSupport = scopeSupport && scopeSupport.innerHTML == "t"; | |
} | |
catch(e) { | |
scopeSupport = false | |
} | |
return scopeSupport; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment