Slashdot Mirror


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.)"

22 of 111 comments (clear)

  1. Beta browser, draft spec... by BlueScreenO'Life · · Score: 5, Insightful

    So, a browser in beta phase does not conform to a specification in draft stage!
    Who would have thought!

    1. Re:Beta browser, draft spec... by BlueScreenO'Life · · Score: 2

      Not arguing that. I avoid IE whenever possible but I just find it funny how we don't miss a chance to take a dig at MS.
      Amusingly enough, the link to the specification points to a page with a big warning reading "This version of the specification has been superceded!". How wise is it to spend time making a browser to implement a spec that changes so often? And complex apps that rely on it, for that matter?

  2. HTML5 by captain_dope_pants · · Score: 2

    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. Re:HTML5 by bunratty · · Score: 2

      It's not black or white. CSS doesn't work everywhere, in the sense that if you write CSS the way web design books explain, much CSS won't work in IE6 and IE7. If you wait until all HTML5 features work on all browsers, you'll be waiting a very, very long time.

      --
      What a fool believes, he sees, no wise man has the power to reason away.
    2. Re:HTML5 by bunratty · · Score: 2

      Or you can stick to features that work in all browsers. Just because all browsers don't support all of HTML5 doesn't mean you should avoid HTML5 completely. It's simply not black or white.

      --
      What a fool believes, he sees, no wise man has the power to reason away.
  3. Test Cases by Anonymous Coward · · Score: 5, Insightful

    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.

  4. Re:Gotta say it by bunratty · · Score: 3, Interesting

    Acid tests are not useless, but they are certainly not the best measure for how standards compliant a browser is. The company who makes the browser can choose to implement the features on the Acid test and not the features that are not tested by the test.

    In this case, IE9 gets 95/100 on Acid3. But Acid3 tests only standards what were written in 2004 and doesn't cover HTML5. So although IE9 gets a good score on Acid3, it says nothing about how well IE9 implements HTML5, which Acid3 doesn't test.

    Acid tests are not useless, but you have to understand what they're testing before you can interpret the results of a test. If you see a high score on an Acid test and conclude the browser has good support for standards all around, you're misinterpreting the results.

    --
    What a fool believes, he sees, no wise man has the power to reason away.
  5. Re:Not sure why this is here by Bert64 · · Score: 4, Informative

    Do Apple systems not qualify as *nix anymore?

    --
    http://spamdecoy.net - free throwaway anonymous email - avoid spam!
  6. Re:Gotta say it by MemoryDragon · · Score: 4, Insightful

    Yes I find it quite amusing how Microsoft plays the we are html5 ready game currently marketingwise while they literally are three years behind the competition in many areas of html5. IE9 will be html5s IE6 all over again, as it seems to me.

  7. Re:Gotta say it by bunratty · · Score: 2

    IE always seems to have more problems than other browsers. We've seen it recently with IE7's and IE8's low scores on Acid3, which Microsoft is finally fixing in IE9. Right now, the most current stable release of nearly every browser scores 90/100 or above on Acid3, but IE8 still scores 20/100, lagging far behind everyone else. Similarly, IE9 is lagging behind on HTML5 features compared to other browsers. So, yes, every browser has problems with HTML5, but we can expect IE to have more problems than other browsers do for years to come.

    --
    What a fool believes, he sees, no wise man has the power to reason away.
  8. Please! No workarounds! by garry_g · · Score: 2, Insightful

    The web is still suffering from all the workarounds implemented for IE6 ... don't do workarounds, make M$ FIX the problems instead!

  9. IE8 is NOT the most pleasant/compatible/fast by pyalot · · Score: 4, Interesting

    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

    1. Re:IE8 is NOT the most pleasant/compatible/fast by Jezral · · Score: 3, Informative

      - 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)

      Or, you could use POST requests like you're supposed to. Any number of intermediary caches and load balancing tricks can play foul with GET requests, but POST is not allowed to be cached.

      With jQuery this is as simple as using $.post() instead of $.get().

  10. Re:Gotta say it by TaoPhoenix · · Score: 2

    They can't let go of their Incompatibility Paradigm that gave them lock-in for 7 years.

    --
    My first Journal Entry ever, in 8 years! http://slashdot.org/journal/365947/aphelion-scifi-fantasy-horror-poetry-webzine
  11. Re:submit a bug report by symbolset · · Score: 2

    Actually, I think getting a slashdot article on the issue is a whole lot more likely to get it fixed. They do come here you know.

    --
    Help stamp out iliturcy.
  12. Re:Here's an idea by shish · · Score: 2

    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
  13. Re:Gotta say it by bunratty · · Score: 3, Informative

    All browsers are non-compliant, in the sense that no browser supports all published web standards 100% accurately. The fail score in IE9 certainly is meaningful -- IE9 does not support SVG fonts or SMIL animation. Again, if you know what the Acid test is testing, you can interpret the results of the test accurately. IE9 scoring 95/100 is great news for web developers -- they can use the JavaScript and DOM features that will become more important as browsers support complicated user interfaces in HTML. Or, that is, they can when IE9 becomes popular. The next step is for browsers to support HTML5 well.

    --
    What a fool believes, he sees, no wise man has the power to reason away.
  14. Re:Here's an idea by imakemusic · · Score: 2

    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!
  15. Re:Gotta say it by I8TheWorm · · Score: 3, Informative

    You get that it's beta, right?

    --
    Saying Android is a family of phones is akin to saying Linux is a family of PCs.
  16. Don't try to "get around" it by harmonise · · Score: 3, Insightful

    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.
    1. Re:Don't try to "get around" it by Benbrizzi · · Score: 2

      Try telling that to your clients."I'm not making it compatible with half of the browsers out there because it's too complicated".

  17. Microsoft Responds by TimSneath · · Score: 5, Informative

    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.