Skip to content

Instantly share code, notes, and snippets.

@ohryan
Created September 20, 2011 17:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ohryan/1229665 to your computer and use it in GitHub Desktop.
Save ohryan/1229665 to your computer and use it in GitHub Desktop.
jQuery.extend(jQuery.support, {
DOMElement: function(element, attribute) {
var test = document.createElement(element); // turns out native function is fastest (http://stackoverflow.com/questions/268490/jquery-document-createelement-equivalent)
if (test) {
if ( attribute != null )
return (attribute in test)
else
return true
}
return false;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment