Skip to content

Instantly share code, notes, and snippets.

@Macagare
Created December 20, 2012 12:59
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 Macagare/4345160 to your computer and use it in GitHub Desktop.
Save Macagare/4345160 to your computer and use it in GitHub Desktop.
Javascript: check for html5 via jquery
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