HTML5 in the browser: Canvas, video, audio, and graphics
Where Chrome, Firefox, IE, Opera, and Safari stand on HTML5 Canvas, HTML5 video, SVG, and WebGLFollow @peterwayner
There may be no greater apostasy in HTML5 than the creation of the
Alas, artists don't think like computer programmers, and they don't grok the idea of separating the data layer from the presentation layer. When they want to put down a letter or a dab of color, they want it in one place and they want it to stay there -- or the harmony of the design will be forever destroyed.
The solution is the
<canvas> element, an idea that originated with Apple, which incorporated
<canvas> into the WebKit project. From there, it was copied by everyone but Microsoft. Eventually, Microsoft capitulated and added the option in IE9, but only after realizing everyone was using a free translation tool that mapped all of the methods from the
<canvas> element into their own version.
To test the Canvas tags, I built a set of flying links that are animated using a jQuery plug-in written by Graham Breach. The code looks for a set of links in your HTML, then starts drawing them in a cloud that rotates in response to the mouse. It illustrates a few of the actions that can be achieved with the Canvas element.
The code won't work in IE8 and earlier versions of Internet Explorer, which don't support Canvas directly, but it will work if you use a thin translation layer called ExplorerCanvas. This code will turn Canvas calls into code that is understood by the earlier browsers, a technology Microsoft called VML (Vector Markup Lanaguage). This translation layer will be necessary for anyone who needs to support the older but still very common versions of IE.
<canvas>support in current Web browsers
|Apple Safari 5.0||Yes|
|Google Chrome 8.0||Yes|
|Microsoft IE 8.0 / 9.0||No / Yes|
|Mozilla Firefox 3.6||Yes|