Canvas - Dive Into HTML5

Every canvas has a drawing context, which is where all the fun stuff happens. Once you've found a element in the DOM (by using document.getElementById() or any other method you like), you call its getContext() method. You must pass the string "2d" to the getContext() method.

Actions