How To Get Around the Holes In IE9 Beta's Implementation of Canvas
mudimba writes "Microsoft has made grand announcements about how great their implementation of the HTML5 canvas specification is. However, while I was porting a large HTML5 application to work with IE9 beta I found that there are some key features missing. Workarounds are provided where possible. (Disclaimer: I am the author of the submitted article.)"
Doesn't everyone on slashdot use a *nix system?
Its 2011 and (big surprise) there are still problems with IE's implementation of HTML. This has been going on since IE3 (and probably before). I think we can safely say at this point that the problem is the company and will probably never change. As they say, the day Microsoft makes a product that doesn't suck is the day they make a vacuum cleaner.
The only missing thing is IEx on any of the computers at home.
Slashdot, fix the reply notifications... You won't get away with it...
If you start writing workarounds instead of submitting these to Microsoft and wait for a fix, the way the web is written will never change!
DeviantArt is hosting dev blogs now? What how why?
So, a browser in beta phase does not conform to a specification in draft stage!
Who would have thought!
Isn't that more like... claimer?
Just the other day someone asked if I'd done any work with HTML5 and I said I was going to wait for a good while until it worked everywhere. They assured me it did, now I find the opposite.
:)
Glad I didn't bother starting now - procrastination has saved me yet again
while (true != false) process_more_stupid_code();
1. He's using IE9 Beta 1, which is fairly old and out of date. He should try the latest platform preview.
2. He should post functional test cases, like ACID does, instead of posting just the code and pictures.
3. He should contact MS. Instead he is relying on the nerd-rage from Slashdot to get big enough for them to notice. They have an appropriate channel for this where the issue can be discussed.
4. Despite what people think, canvas is not HTML. It's a proprietary and patented Apple technology that has been submitted to W3C for review as a potential addition to HTML. Yes, submission to W3C does require patent disclosure and royalty-free licensing when a submission becomes a part of a recommendation, but canvas has not reached that stage. Patent fears aside, as an early draft it is a standard subject to change either by W3C or by anyone who feels like interpreting the draft as they see fit, which could occur concurrently as in opposition to each other.
The web is still suffering from all the workarounds implemented for IE6 ... don't do workarounds, make M$ FIX the problems instead!
You can (and should) submit bug reports for IE9 directly to Microsoft. Complaining on your personal blog and hoping that the magic internet fairies will take care of it is less effective at getting the problem fixed.
I just got forced to adopt IE8 compatibility (outside constraints). After developing something that runs just fine in Safari/Firefox/Chrome for 4 weeks, it took me:
The downside
- 4 hours to get it to run in IE8
- Data intensive JS processing/DOM manipulation is about 10x slower then in either of the alternatives
- Since no support for CSS3 border-image is present, it makes it look ugly
- Since DOM/JS is so slow, animations (width, height, opacity etc.) are slow as hell.
- the HTML5 popstate event (document.location change) is not supported, hence a watchdog interval has to be installed checking the document.location.hash 20x/second
- since IE is the only browser to enforce XHR caching, every request needs a timestamp query parameter (something that no other browser does, and which is really stupid, altough easy to provide)
- the developer tools are difficult to use (as compared to chrome, webkit, firebug etc.)
The Upside
- console.log works (thank god, no more alert debugging)
- The layout just worked (though I think that's rather a side effect of using pixel width/height zealously rather then an IE8 virtue)
- developer tools, any, even if they work badly, but developer tools!
Recommendation for anyone: IE is still the worst browser, and there's at least 4 alternatives which are collectively 1) faster 2) easier to develop for 3) more compatible to each other 4) prettier 5) more standards conformant
Experiments and other stuff
The CFO is a luddite. If he can't reach our site because he uses IE, I might as well remove that 10 years reference from my resumé. I hear McDonald's is hiring...
Unfortunately for me one of the sites that I maintain gets the majority of its views from UK Government workers, most of which use IE. Roughly 2/3 of the visitors to this site are using IE of one form or another. (Admittedly IE9 is only a tiny proportion of these and a lot of them are using IE6 still so I'm unlikely to be using canvas any time soon)
Sure, I could block them completely and it might make a few of them take notice but the majority would just see it as us not wanting to make our site available to the people who need it.
It's a vicious circle and one that I would love to help break (I posted a comment on here a while back which included some code that does what you mention) but in the meantime we still need to get clients and they're still using IE6. We're not going to turn away business because of some browser idealism.
Brain surgery - it's not rocket science!
I won't bother spreading these news for now, since IE apologists (yes, they exist) will defend themselves by saying that IE hasn't gone RTM yet, and is expected to reach RC soon. So that features may be missing. I won't bother saying how ridiculous it is to think that MS will implement major HTML5 features to support HTML5 Canvas well in a *release candidate* since these are, again, IE apologists, of all kinds of apologists.
But I expect a crapstorm to be unleashed once this one goes final. MS shouldn't have been so bold and build up expectations so much. They've made it sound like they will support HTML5 in its entirety, except for disputed parts of the standard not yet finalized.
Beware: In C++, your friends can see your privates!
Well, from your description, apparently the solution you currently use is flash, correct?!
So I guess it would be better to maintain Flash in IE9 rather than 'neuter' Canvas code.
how long until
Why should you waste time and money supporting them?
Because the amount of money you make from supporting them is greater than the amount spent to do so?
If you're running a personal site for your own amusement, then sure, do whatever you think is fun; but when you're trying to make a living (in any industry), rudely telling half your customers to go away is rarely a wise decision
I mod down anyone who says "I will be modded down for this", regardless of the rest of their comment
Well at the moment I don't use anything that needs that kind of functionality. I do use some jQuery to give it a bit of interactivity but it is essentially a static page.
As for maintaining a Flash version in IE9, I doubt it is easier duplicate chunks of your code in a different language (plus the cost of buying the Flash authoring tool) than it is to alter a couple of lines in your Javascript. But then again, you said "better" which is a subjective term.
My favourite way would be every time that an IE-specific line of code is called, an email gets sent to the IE team at Microsoft...That would get their attention.
Brain surgery - it's not rocket science!
Maybe Microsoft IE team doesn't have the money or resources to develop their browser? After all, they don't get the google income of Firefox and they have to pay those horrible h264 fees. They must be borderlining on broke or something. The old guys were disbanded years ago to work on bigger projects and only college hang overs who beg for money from their parents get to touch the code nowadays. [end sarcasm]
I honestly would expect more from an ex-market leader in web browser development. Pure laziness on Microsoft's part.
Once you start despising the jerks, you become one.
It is probably the only way that IE will support modern features. Ever. I am serious. Google needs to start pushing this more. Maybe the embarassment will force MS to finish their HTML5 implimentation.
Once you start despising the jerks, you become one.
I doubt it is easier duplicate chunks of your code in a different language (plus the cost of buying the Flash authoring tool) than it is to alter a couple of lines in your Javascript. But then again, you said "better" which is a subjective term.
My favourite way would be every time that an IE-specific line of code is called, an email gets sent to the IE team at Microsoft...That would get their attention.
True, yeah, maybe it would be easier to do all the 'bells and whistles' on Flash, so you wouldn't have the duplication problem. (Even though flash costs money)
About the email idea, I LOVE IT.
how long until
Stop coddling this company. Don't try to get around it. Code to the standards and let IE9 fail to render if they can't implement the spec properly. Google, Apple, Mozilla, and Opera all have no problem following the spec.
Cory Doctorow talking about cloud computing makes as much sense as George W Bush talking about electrical engineering.
Not surprisingly, IE9 Beta is a work in progress.
The sad fact is that there is no answer that doesn't make somebody's life slightly worse either by taking developers time or money or denying the client access to the site.
Actually, I've got a better idea than the email but I'm not sure how to implement it: Every time an IE-specific line of code is called a small withdrawal from Microsoft's bank account...
Brain surgery - it's not rocket science!
Hi there, thank you for the post. I just wanted to add a few observations on behalf of the Internet Explorer team.
Firstly, no browser offers a perfect implementation of the Canvas 2D API specification to date - we've documented and shared a few examples from our test suites here: http://samples.msdn.microsoft.com/ietestcenter/#html5Canvas
As has been well noted, the IE9 build tested was our beta.
Secondly, in response to the specific issues raised, Giorgio Sardo has posted a response on his blog here:
http://blogs.msdn.com/b/giorgio/archive/2011/01/14/building-great-browsers-together.aspx
We'll update this entry over time.
Thanks for listening,
Tim Sneath | Microsoft Corp.
I wonder what would have happened if MS adopted the Tasman engine used in Mac IE 5 and ported it to Windows instead of spending years fixing the Trident engine?
Time to go all grammar (well, vocabulary) nazi on you....
The word you want is Disclosure, not Disclaimer.
A disclosure is, in this case, a statement of conflict of interest: "I wrote this thing, so I might be biased about how good it is."
A disclaimer would be: "I wrote this thing and even I don't believe it!"
I'm pretty sure you meant the former, not the latter,
Crumb's Corollary: Never bring a knife to a bun fight.
If the site is broken and a list of downloadable alternative browsers appears, the user may not have privileges to install the program or to run the portable version. Only an administrator can install software to Program Files, and the so-called portable version can be blocked using Windows software restriction policies.