Mozilla drags IE into the future with Canvas element plugin

Mozilla is developing a plugin for Internet Explorer that will add support for …

Most browser implementors are quick to adopt emerging Internet technologies, but Microsoft can't or won't make Internet Explorer a modern web browser. Despite some positive steps in the right direction, Internet Explorer still lacks many important features. Its mediocrity has arguably hampered the evolution of the web and forced many site designers to depend on suboptimal proprietary solutions.

IE's shortcomings won't hold back the Internet for much longer, however, because Mozilla plans to drag IE into the next generation of open web technologies without Microsoft's help. One of the first steps towards achieving this goal is a new experimental plugin that adapts Mozilla's implementation of the HTML5 Canvas element so that it can be used in Internet Explorer.

The Canvas element allows web developers to programmatically render interactive bitmap images in HTML content. It was invented by Apple to bring richer graphical capabilities to the company's WebKit renderer. The Canvas functionality eventually became part of the HTML5 standard and has been implemented in both Gecko and Presto. Canvas is used extensively in several popular web applications, including Google Maps, but it hasn't gained widespread acceptance because it isn't available in Internet Explorer.

Taking advantage of ActiveX

In order to make Google Maps work in IE, Google had to develop ExCanvas—a complex library that implements many of the Canvas element's features with VML, Microsoft's proprietary alternative to SVG. Unfortunately, scripted manipulation of VML is too slow to be used for highly interactive web applications. Mozilla's solution is to bake its own native Canvas implementation into an ActiveX plugin that can be integrated directly into Internet Explorer.

Mozilla's Vladimir Vuki?evi? has developed a working prototype which demonstrates the viability of the plugin approach. His Internet Explorer component is built with Firefox code and implements much of the HTML5 Canvas specification. There are still some missing pieces, however, including support for several drawing functions. It's still largely a work in progress, and development is still at a somewhat early stage.

Vuki?evi? is confident that a lot of the holes can be filled without substantial effort, but his primary concern is with the challenges posed by deployment. The plugin is designed to snap into IE as a binary rendering behavior, but the browser's defensive security mechanisms insist on prompting the user before every time it is used. This detracts from the seamlessness of the plugin and makes it difficult to use for conventional web applications.

"Currently, the experience is pretty crappy: you have to click through an infobar to allow installation of this component, then you have to click 'Yes' to say that you really want to run the native content, and then you have to click 'Yes' again to allow the component to interact with content on the page," he wrote in a blog entry. "In theory, with the right signatures, the right security class implementations, some eye of newt, and a pinch of garlic, it's possible to get things down to a one-time install which would make the component available everywhere."

This Canvas plugin is only the first step toward bringing standards-based web technologies to Internet Explorer. Mozilla is working on a much more ambitious initiative called Screaming Monkey that will make it possible to plug Mozilla's entire next-generation JavaScript engine directly into Microsoft's web browser. If these plugins gain widespread acceptance, it will empower web developers and give them the ability to target web standards and not have to compensate as much for Internet Explorer's broken behavior.

Unfortunately, achieving a sufficient level of adoption for web compatibility plugins is easier said than done. Firefox, Opera, and even Safari all deliver a vastly superior user experience than IE on Windows, and yet Microsoft's browser still has massive market share. If Mozilla can't convince diehard IE users to install Firefox, it seems unlikely that such users will be willing to install Internet Explorer plugins that provide Firefox features.

Getting Adobe on board

Getting this technology to end users will be a huge uphill battle, but there are some intriguing possibilities and a number of possible solutions. Adobe is collaborating closely with Mozilla on next-generation web scripting technologies. This is purely speculation, but If Adobe decided to ship Screaming Monkey and the Canvas functionality as part of the next major iteration of the Flash plugin, it would rapidly accelerate adoption and get it onto lots of computers.

Although Canvas arguably competes with Adobe's Flash plugin in a certain set of use cases, it's worth noting that Adobe doesn't generate revenue from the Flash plugin itself. Adobe cashes in on Flash by selling its powerful authoring tools, which the company could easily extend to support standards-based web technologies.

Adobe is clearly inching toward openness with its recent Open Screen initiative and its contribution of source code to the Tamarin project. If Adobe were to fully embrace open web standards, Microsoft's stranglehold on web innovation could finally be broken and Adobe would also have more competitive leverage against Silverlight.

This is ultimately going to be a protracted conflict, but the recent emergence of consensus within the ECMAScript community about the future of JavaScript has ended a long-standing impasse and created the opportunity for real progress in open web technology. This means that getting these features into every browser is now more important than ever before. Mozilla's plugin experiments offer a clear path for circumventing IE's shortcomings and bringing innovation to end users.