Thursday, July 31st, 2008

No Browser Left Behind… without Canvas

Category: Browsers, Canvas

>Vladimir Vuki?evi? normally hacks on Mozilla products, but spent a little time on an experiment with IE. An experiment that looks very exciting indeed.

I love canvas, and wish that it was ubiquitous. We have great wrappers out there such as dojo.gfx, but wouldn’t it be nice if canvas worked everywhere? (and the full API to boot).

Well, Vladimir has an experiment to get it to IE. The approach is very interesting indeed. It isn’t like excanvas which uses VML… and there is a Silverlight bridge being worked on that looks promising. Instead, we have this:

I’ve been working on a native Canvas implementation for IE based on the same rendering core that’s in Firefox.

The same implementation, shoe horned into IE:

With an object tag, a bit of CSS, and (to work around another IE bug) a single line of script, <canvas> elements in HTML just work. I’m excited that this experiment is working out, because lack of Canvas support in IE is one of the reasons people skip Canvas and instead turn to Flash and other plugin technologies.
</canvas>

Congrats on a great hack, and here’s to you making it much much more.

Related Content:

Posted by Dion Almaer at 2:00 am
6 Comments

++++-
4.4 rating from 38 votes

6 Comments »

Comments feed TrackBack URI

Awesome. Have you thought about mentioning it to the gears team? I don’t know if they’d bite, but it would be a great way to distribute it.

Comment by genericallyloud — July 31, 2008

It is really depressing to me that all it took was a third-party developer with a bit of passion, and the canvas tag is now available. If the Microsoft developers all use Firefox, why wasn’t this created long ago “in house”? Not to detract from Vladimir’s work because it’s nothing short of miraculous, but it’s something he should *never* have needed to write on his own.

Comment by starkraving — July 31, 2008

Microsoft’s feature list for IE8 should start with a list of everything that’s in all three of the other browsers.
.
What’s the problem with Microsoft, anyway?

Comment by Nosredna — July 31, 2008

This is absolutely amazing amazing amazing. Has anybody done performance analysis on how this implementation is against other native implementations or excanvas?

Maybe the IE team just wants to yell “surprise” at the final release miraculously including all standard features.

On the other hand, it seems unlikely. A product in ‘beta 2′ is [usually] pretty much API stable and just working on bug fixes and visual enhancements.

I really can’t see much of a difference between the IE8 and IE7 rendering engines… This is very disappointing Microsoft.

Comment by matanlurey — July 31, 2008

I would love canvas support everywhere. With excanvas, you can get really close, and I feel that it’s the best approach right now since it doesn’t require any active-x objects popping up nasty security messages to your web audience.

I really commend Vladimir on working to bring full support of Canvas to IE. Sadly, and even the author himself admits this, the user experience for someone using IE to take advantage of his hard work is far less than ideal: “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. This sucks. 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.”

One of the biggest reasons to have canvas built in is so anyone using browser XYZ can just go to the website and it will “just work”. Right now that can be done with excanvas, but anything based on custom IE will always have a more annoying user experience. :(

Comment by Sembiance — July 31, 2008

agree, it really needs to be in IE8, if only to stay in the same stream as the other browsers.

but i feel that they may opt to not include this in favour of their own technologies, silverlight, etc. in a way to force people to script for them instead of others.

please don’t let this be so and add it to IE8, if you do i promise to not be so grumpy when i have to work on all those ie6 compatible sites to make them work for ie8 ;-)

Comment by indiehead — August 1, 2008

Leave a comment

You must be logged in to post a comment.