Also, being slow in IE is a good thing. Maybe people will switch to a better browser.
I also think it's a rare case where your bottle neck is speed of updating the dom. IMHO, having clean non-ugly js code is more important in most cases.
> Also, being slow in IE is a good thing. Maybe people will switch to a better browser.
I'm going to assume you're kidding.
> I also think it's a rare case where your bottle neck is speed of updating the dom.
Don't forget that your average user isn't on a brand new 2.4GHz Macbook Pro. The average computer is -slow-.
> IMHO, having clean non-ugly js code is more important in most cases.
Something that's fast, predictable, readable, and one line seems great to me. Being w3c compliant has nothing to do with how "clean" or "non-ugly" it is.
------------------------------------------------------
I'm not trying to debate you because I like getting into silly syntax wars. I'm trying to point out that no matter how ugly, noncompliant, un "future proof" something is, doing the simplest thing that works now and in the foreseeable future shouldn't be vilified. In this case, innerHTML is, and still will for a while, be a great way to insert elements into the dom.
I wasn't kidding in the least about IE. IE is a small minority on my webapp, thank goodness. If they get a degraded user experience, then that's MS's problem to fix.
"fast, predictable, readable, and one line" I guess you haven't got into all the issues with innerHTML. Tables, event handlers being borked, etc etc. html entities are ugly and have no place in code IMHO.
I guess some of it also comes down to the fact of mixing languages. I'd much rather write javascript in a single file. Having HTML fragments dotted around the place is, in my view, very very ugly.