The Canvas Element and me
August 12th, 2007
I became aware of the canvas element when it was introduced in Firefox version 1.5. With all the frustrations still not seeing SVG mainstream support in most browser, I was fascinated to see this other approach to renders vector graphics on web pages. Of course, Internet Explorer does not support it, so there’s not much to do with it in the real world until it becomes supported in the far future. Nevertheless, I gave it a try.
Here comes the result of my short experiment: the canvas clock.
If you happen to belong to the growing minority of people using either Safari, Firefox, or Opera browser, you’ll be able to read your local time in a fashioned manner here to the left. Should you still be an Internet Explorer user, you may download the Explorer Canvas project, or take this chance to upgrade to a modern browser.
Anyhow, the canvas element can only be populated by programing, through a simple JavaScript API, which makes it a little bit cumbersome compared to SVG, for which there are plenty of applications to author graphic with, and which does fit the line of markup languages defining the web. One project deserves to be mentioned here, CanvaSVG, a JavaScript code that renders an SVG document on the canvas element, thus connecting the two different approaches with a swoosh.
It will be interesting to see whether SVG support will curb the canvas element, or it will gain a momentum in the future.
