The Nightmare of Cross-Browser Object Support


The common framework of the Document object shared by Internet Explorer and Netscape dates back to 1996. It might be hard to believe, but in the intervening years there has been only modest improvement to the parts of the Document Object Model the major browsers have in common. As a result, when faced with a non-trivial JavaScript task, Web developers have become accustomed to writing separate scripts, one for Internet Explorer 4+ and one for other browsers like Netscape. Now with the rise of the W3C DOM standard, you will often see three different code forks for full compatibility. It should be clear that the situation with competing object models is less than optimal. For those unconvinced, take a look at Chapter 15 and see what it takes to perform simple visual effects across browsers. The Web development community is ripe for change and the W3C Document Object Model provides the platform- and language-neutral interface that will allow programs and scripts to dynamically access and update the content, structure, and style of documents, both HTML and XML. If browser vendors continue to improve their support for the W3C DOM, there might be a point in the future where Web developers have access to a powerful, robust, and standardized interface for the manipulation of structured documents, but for now the platform lessons of this chapter are ignored at the reader s peril.




JavaScript 2.0
JavaScript: The Complete Reference, Second Edition
ISBN: 0072253576
EAN: 2147483647
Year: 2004
Pages: 209

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net