The level 1 version of the DOM standard defines the complete content structure of the document.
This is implemented in the standard in two parts:
DOM core functionality
HTML functionality
The core functionality should apply to documents of a variety of types while the HTML functionality should only be supported in implementations that use HTML marked up documents.
In a fully compliant browser, you can expect to access all of the attributes, names and values of each and every tag. There should be a high degree of consistency between HTML tag attribute sets and object properties and methods.
The document should then be represented as a tree of objects starting at the outermost <HTML> tag and all subsequent items being contained in a logical tree structured parent and child arrangement.
With the consistent compliance between HTML attributes and JavaScript object properties, there may still be a few catch-outs. For example, the namespaces may collide. An HTML attribute may correspond to a JavaScript reserved word and therefore it should not be used as a property or method name since they exist in the identifier namespace. Identifiers and JavaScript reserved words must not collide.
To work around this, some prefix will be added to the property names.
The Level 1 DOM support should also include some API support to locate objects by name without necessarily walking the document tree.
The level 1 DOM specification is similar to but may be somewhat incompatible with the MSIE version 4 DOM implementation. Netscape 6.0 provides the most accurate and compliant implementation of DOM level 1 at the time of writing.
See also: | NamedNodeMap object |
Prev | Home | Next |
DOM - Level 0 | Up | DOM - Level 2 |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |