Skip to content

Instantly share code, notes, and snippets.

@tevko
Last active February 2, 2016 20:49
Show Gist options
  • Save tevko/7bd08110a85a9709c02d to your computer and use it in GitHub Desktop.
Save tevko/7bd08110a85a9709c02d to your computer and use it in GitHub Desktop.
Elements on document supporting document.createElement
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