Perfection kills

Exploring Javascript by example

Misbehaving IE8

January 29th, 2009 by kangax (Permalink)

When testing IE8 Beta 2 a couple of months ago, I noticed how one innocent line would bring poor pal to its knees:

  Element.prototype.cloneNode.call();

Go ahead, try it out. It crashes my browser. Does it crash yours? A few days ago, Release Candidate 1 came out. The “magic” expression still crashes my browser… This doesn’t apply to cloneNode only. Most if not all of the Element.prototype methods (as well as some others) fail in the very same way:

Element.prototype.appendChild.call();
Element.prototype.hasChildNodes.call();
document.querySelector.call();

I tried submitting a bug to IE team few times but only kept getting errors in bug tracker. Here’s hoping to a more stable RC2!

Categories: Uncategorized 6 Comments »

Comments (6)

  1. Gravatar

    Horia Dragomir said:

    This rocks!

    It also crashes IE7, but only the first time you try it.

  2. Gravatar

    Pete LePage [MSFT] said:

    Hi!

    Thanks for pointing this out! I’m one of the product managers on the IE team, and looked into this bug today after seeing it on your blog. We found this bug after we shipped RC, and have fixed it in our internal builds!

    Thanks,
    PEte

  3. Gravatar

    kangax (article author) said:

    Pete, thanks, that’s good to know. I’m still having problems creating tickets though. Do I need some kind of invitation?

Trackbacks

  1. Ajaxian » Push back: Digital TV? or IE 8? said:

    [...] we have kangax talking about misbehaving IE 8 and how you can still kill it with: PLAIN TEXT [...]

  2. Push back: Digital TV? or IE 8? | Guilda Blog said:

    [...] we have kangax talking about misbehaving IE 8 and how you can still kill it with: PLAIN TEXT [...]

  3. Sabino’s Blog » Blog Archive » if(navigator.userAgent.indexOf(’MSIE’)!=-1){window.close();} said:

    [...] A few days ago I said for you guys to update your browser to make web developers life easier, but it seems that IE8 is following his older brother steps, at least until now (RC1 version), and seems that web development is about to become more challenging. I was hoping that IE8 would significantly reduce the number of brave/stupid/I don’t know why someone still use this crap I6 users, however, I must confess that I am concerned with the idea that IE8 could cause even more headaches. Some issues are reported by Michael Dayah (from ptable.com), who described some problems while trying to render elements that Microsoft is marking as “won’t fix” and also kangax, that reported that a single JavaScript line can crash the browser. [...]

Leave a Comment

Allowed tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

Please, don't forget to escape your input (<, > and &). Wrap code sections with <pre>