04.11.2015 Views

javascript

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

DOM Levels 2 and 3<br />

The first level of the DOM focuses on defining the underlying structure of HTML and XML<br />

documents. DOM Levels 2 and 3 build upon this structure to introduce more interactivity and support<br />

for more advanced XML features. As a result, DOM Levels 2 and 3 actually consist of several modules<br />

that, although related, describe very specific subsets of the DOM. These modules are as follows:<br />

❑<br />

❑<br />

❑<br />

❑<br />

❑<br />

❑<br />

DOM Core — Builds upon the Level 1 core, adding methods and properties to nodes<br />

DOM Views — Defines different views for a document based on stylistic information<br />

DOM Events — Explains how to tie interactivity to DOM documents using events<br />

DOM Style — Defines how to programmatically access and change CSS styling<br />

information<br />

DOM Traversal and Range — Introduces new interfaces for traversing a DOM document<br />

and selecting specific parts of it<br />

DOM HTML — Builds upon the Level 1 HTML, adding properties, methods, and new<br />

interfaces<br />

This chapter explores each of these modules except for DOM Events, which are covered fully in<br />

Chapter 12 .<br />

DOM Level 3 also contains the XPath module and the Load and Save module. These<br />

are discussed in Chapter 15 .<br />

DOM Changes<br />

The purpose of the DOM Levels 2 and 3 Core is to expand the DOM API to encompass all of the<br />

requirements of XML and to provide for better error handling and feature detection. For the most<br />

part, this means supporting the concept of XML namespaces. DOM Level 2 Core doesn ’t introduce<br />

any new types; it simply augments the types defined in DOM Level 1 to include new methods and<br />

properties. DOM Level 3 Core further augments the existing types and introduces several new ones.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!