Created
December 20, 2012 12:59
-
-
Save Macagare/4345160 to your computer and use it in GitHub Desktop.
Javascript: check for html5 via jquery
This file contains hidden or 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 isHtml5(){ | |
var test_canvas = document.createElement("canvas") //try and create sample canvas element | |
return (test_canvas.getContext)? true : false //check if object supports getContext() method, a method of the canvas element | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment