Skip to Main Content
Professional, JavaScript® for Web Developers, Second Edition
book

Professional, JavaScript® for Web Developers, Second Edition

by Nicholas C. Zakas
January 2009
Intermediate to advanced content levelIntermediate to advanced
836 pages
21h 30m
English
Wrox
Content preview from Professional, JavaScript® for Web Developers, Second Edition

Chapter 11. DOM Levels 2 and 3

The first level of the DOM focuses on defining the underlying structure of HTML and XML documents. DOM Levels 2 and 3 build upon this structure to introduce more interactivity and support for more advanced XML features. As a result, DOM Levels 2 and 3 actually consist of several modules that, although related, describe very specific subsets of the DOM. These modules are as follows:

  • DOM Core — Builds upon the Level 1 core, adding methods and properties to nodes

  • DOM Views — Defines different views for a document based on stylistic information

  • DOM Events — Explains how to tie interactivity to DOM documents using events

  • DOM Style — Defines how to programmatically access and change CSS styling information

  • DOM Traversal and Range — Introduces new interfaces for traversing a DOM document and selecting specific parts of it

  • DOM HTML — Builds upon the Level 1 HTML, adding properties, methods, and new interfaces

This chapter explores each of these modules except for DOM Events, which are covered fully in Chapter 12.

Note

DOM Level 3 also contains the XPath module and the Load and Save module. These are discussed in Chapter 15.

DOM Changes

The purpose of the DOM Levels 2 and 3 Core is to expand the DOM API to encompass all of the requirements of XML and to provide for better error handling and feature detection. For the most part, this means supporting the concept of XML namespaces. DOM Level 2 Core doesn't introduce any new types; it simply augments the types defined in ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Professional: JavaScript® for Web Developers, Third Edition

Professional: JavaScript® for Web Developers, Third Edition

Nicholas C. Zakas
JavaScript: Best Practice

JavaScript: Best Practice

James Kolce, Moritz Kroger, Ivan Curic, Samier Saeed, Jeff Mott, M. David Green, Craig Buckler

Publisher Resources

ISBN: 9780470227800Purchase book