Chapter 15. The Essential Cross-Browser HTML DOM

Whether or not the average web developer is aware of it, it is out there, unseen and unnoticed, but nevertheless out there. Allow me to explain before you decide that I've popped a gasket and need to be taken to a nice soft room, the kind with padded walls. I am referring to the HTML Document Object Modelyes, that often ignored application programming interface that can be both a blessing and a curse.

Yes, the average web developer uses the HTML DOM only to the extent that is absolutely necessary to perform the job, and no further. The reasons for this are many, ranging from the fact that in the early days of web browsers, everybody did their own thing, to the fact that client-side code is often considered unreliable because some people are using web browsers that belong more fittingly in a museum than in a computer that was manufactured in the twenty-first century.

I suppose that this could be considered a major issue, the idea that web applications need to work on every browser released since the beginning of time. You might consider me something of a snob for saying this, but why should everyone who is willing to advance beyond the mid-1990s be penalized? You don't see electrical power being looked down upon because some groups don't approve of it. Regardless of the reason for ignoring the HTML DOM, unless they're fond of web applications that behave like mainframe applications from the 1970s, people will have to either get with the program or be left behind.