-
-
Save sandywu/3207479 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