Canvas, IE, and the alternatives

Our flag example will work in IE9, but not in any previous version. If we run the previous example in IE8 or lower, we'll see the fallback content consisting of a paragraph of explanatory text:

Canvas, IE, and the alternatives

The fallback mechanism for the HTML5 <canvas> element is simple but effective. Any browser that doesn't understand the element simply displays any elements that are contained within it, while supporting browsers do not show any of its content except what we draw using the JavaScript API.

There is an easy way that we can allow our flag to work in older versions of IE thanks to the explorercanvas library created by Google. IE ...

Get jQuery 1.4 Animation Techniques Beginner's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.