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 first release of the DOM was DOM Level 1, issued as a recommendation in 1998. This release helped define the infrastructure for the DOMthe 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 a DOM-compliant user agent (such as a browser); all other specifications are issued as separate, but related, optional modules. This approach helped encourage early adoption, and maintain consistency with critical elements. DOM Level 2 followed in 2000 and expanded on the earlier Level 1 release, while still maintaining consistency with the earlier release. You've already been exposed to one aspect of this release with the Level 2 event handling in Chapter 3. The DOM Level 2 added increased support for Cascading Style Sheets, improved access for document elements, and namespace support in the XML recommendation. The DOM Level 3 was released in 2004 and at the time this book was written, had very little support in most major browsers. In addition to extensions and improvements to the previous releases, this version adds modules to extend support for web services, as well as increased support for XML. The DOM Level 3 is the last of the W3C levelsat least, the last planned W3C level release. This chapter doesn't provide a complete reference for all of the objects in the DOM APIs. These are listed quite nicely at the W3C web site in a URL which should persist as long as the specification. Instead, I've focused on representative objects, how they interact with one another, and their impact within the browser page.
|