Last active
February 2, 2016 20:49
-
-
Save tevko/7bd08110a85a9709c02d to your computer and use it in GitHub Desktop.
Elements on document supporting document.createElement
This file contains hidden or 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
Array.apply(null, document.querySelectorAll('*')).map(function(e, i, a) { | |
var message; | |
try { | |
document.createElement(e.nodeName); | |
message = e.nodeName + ' supports document.createElement'; | |
} catch (e) { | |
message = e.nodeName + ' does not support document.createelement'; | |
} | |
return message | |
}).filter(function(i, p, self) { | |
return self.indexOf(i) == p | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment