Created
July 29, 2012 19:50
-
-
Save madrobby/3201472 to your computer and use it in GitHub Desktop.
Check if the browsers supports SVG
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
// comments welcome, there may be better ways to do this! | |
function supportsSVG(){ | |
return !!('createElementNS' in document && | |
document.createElementNS('http://www.w3.org/2000/svg','svg').createSVGRect) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can crunch this down a bit to be
Which saves 9 bytes - if that's what you want.