Skip to content

Instantly share code, notes, and snippets.

@rememberlenny
Created December 24, 2012 14:24
Show Gist options
  • Save rememberlenny/4369421 to your computer and use it in GitHub Desktop.
Save rememberlenny/4369421 to your computer and use it in GitHub Desktop.
var canvas = document.getElementById('tutorial');
if (canvas.getContext){
var ctx = canvas.getContext('2d');
// drawing code here
} else {
// canvas-unsupported code here
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment