Java Reference
In-Depth Information
(HTML‐specific objects, properties, and methods). The first section deals with how to go about
navigating and manipulating the structure of the document. The objects, properties, and methods in
this section are very abstract. The second section deals with HTML only and offers a set of objects
corresponding to all the HTML elements. This chapter mainly deals with the second section—
level 1 of the standard.
In 2000, level 1 was revamped and corrected, though it only made it to a working draft and not to a
full W3C recommendation.
Level 2
Level 2 is complete and many of the properties, methods, and events have been implemented
by today's browsers. It has sections that add specifications for events and style sheets to the
specifications for core and HTML‐specific properties and events. (It also provides sections on
views and traversal ranges, neither of which is covered in this topic; you can ind more information
at www.w3.org/TR/2000/PR‐DOM‐Level‐2‐Views‐20000927/ an d www.w3.org/TR/2000/
PR‐DOM‐Level‐2‐Traversal‐Range‐20000927/ .)
Level 3
Level 3 achieved recommendation status in 2004. It is intended to resolve a lot of the complications
that still exist in the event model in level 2 of the standard, and adds support for XML features,
such as content models and being able to save the DOM as an XML document.
Level 4
In May 2014, DOM level 4 reached candidate recommendation status. It consolidates DOM level 3
with several independent components. At the time of this writing, no modern browser supports
DOM level 4, although that will change in the future.
Browser Compliance with the Standards
Almost no browser has 100 percent compliance with any standard. Therefore, there is no guarantee
that all the objects, properties, and methods of the DOM standard will be available in a given
version of a browser. However, all modern browsers do a very good job of supporting the standard
DOM. The only browsers you truly have to watch out for are IE8 and below.
Much of the material in the DOM standard has only recently been clarified, and a lot of DOM
features and support have been added to only the latest browser versions. For this reason, examples
in this chapter will be guaranteed to work on only the latest versions of IE, Chrome, Firefox, Opera,
and Safari. Although cross‐browser scripting is a realistic goal, backward‐compatible support isn't
at all.
Although the standards might still not be fully implemented, they do give you an idea as to how
a particular property or method should be implemented, and provide a guideline for all browser
manufacturers to agree to work toward in later versions of their browsers. The DOM doesn't
introduce any new HTML elements or style sheet properties to achieve its ends. The idea of the
DOM is to make use of the existing technologies, and quite often the existing properties and
methods of one or other of the browsers.
 
Search WWH ::




Custom Search