Created
March 26, 2012 04:13
-
-
Save hermpheus/2202892 to your computer and use it in GitHub Desktop.
JavaScript: Detect Browser Support for HTML5 Attribute
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 elementSupportsAttribute(element,attribute) { | |
var test = document.createElement(element); | |
if (attribute in test) { return true; } | |
else { return false; } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
From HTML5 for Web Designers