O'Reilly logo

Learning JavaScript by Shelley Powers

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 10. DOM: The Document Object Model

One of the most significant changes associated with JavaScript was the W3C’s work in conjunction with all browser vendors (including Netscape and Microsoft) to create a consistent underlying object model. All major browsers agreed to support this model, eliminating most, if not all, cross-browser compatibility issues. Though the default Browser Object Model discussed in the last chapter provided a great deal of functionality, much of the implementation of the model was based on influence of one browser, or browser company, over another. Over time, this led to a great deal of cross-browser incompatibility, hampering advanced uses of JavaScript until the last few years.

This changed with the release of the W3C’s recommended Document Object Model (DOM). From the W3C comes this description:

The Document Object Model is a platform- and language-neutral interface that will allow programs and scripts to dynamically access and update the content, structure, and style of documents. The document can be further processed, and the results of that processing can be incorporated back into the presented page.

The first release of the DOM was DOM Level 1, issued as a recommendation in 1998. This release helped define the infrastructure for the DOM—the schema and Application Programming Interface (API) that future versions of the DOM could use as a base of functionality. It also helped establish a core component of each recommendation that is required for ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required