innerHTML and DOM Methods
If you haven’t noticed, there’s been quite a few posts out there squandering about the web where we have been discussing the very matter of innerHTML versus W3 methods of doing the same thing with createElement, createTextNode, and appendChild. Just to make things simple for you, I’m linking to all of them incase you feel the need to contribute. Oh, and by the way, I’m disabling comments on this one (since this jabber is going on in so many other places already).
- What’s wrong with innerHTML? (Jonathan Snook)
- Keith on DOM Builder (Wasp)
- Changing the DOM (ParticleTree)
- The innerHTML Dillema (DOMScripting)
What do I think about all this?
Well, for what it’s worth. It’s about the user. innerHTML is plain and simply faster. Yes, it’s non-standard, but so is xmlHttpRequest. Sure, I know the W3 is developing a working draft on xmlHttpRequest… I say, let’s standardize innerHTML. Not to mention, it would be easy. Everyone already knows how it works, it’s simple to use. It’s fast. It’s already supported across major browsers. Hey, just so we feel better, why not call it innerXML. That way it’s future compatible when xml becomes more of a standard and better supported.
Anyway, I’m done with the matter. Hey Keith, when I get to London, let’s have a a few beers and forget this whole thing. There are more important things to talk about (not to mention that you’d be so proud of me for disabling comments).
Comments are closed.












