Robert said:
Hi,
which DOM version (level) should I learn? I've seen that there is a DOM
level 3, but is there any support for it already?
DOM 1 attributes and methods in various interfaces are overall very well
supported in modern browsers: MSIE 6 for Windows, Mozilla 1.x, Netscape
7.x, Safari 1.x, Konqueror 3.x, Opera 7.x, K-meleon 0.7+, Galeon 1.2+, etc..
DOM 2 attributes and methods are also fairly well supported by modern
browsers. All major browser manufacturers (Mozilla, Microsoft, Apple,
Opera) claim to support 100% of DOM 2 HTML and to support DOM 2 Core
very well.
Several noticeable issues on DOM 2 interfaces:
- MSIE 6 does not support DOM 2 Events interface. Except maybe a few
attributes. Mostly because implementing it would have necessarly implied
important changes in the underlying os. Mozilla 1.x and Opera 7.x
support DOM 2 Events very well.
- Mozilla still has issues for DOM 2 Range interface. MSIE 6 does not
support DOM 2 Range at all but has its proprietary DOM.
- In my own testpage, DOM 2 CharacterData attributes and methods are
impeccably, perfectly supported by MSIE 6 for Windows, Mozilla 1.x,
Netscape 7.x, Safari 1.x, Konqueror 3.x, Opera 7.x, K-meleon 0.7+,
Galeon 1.2+, etc.. So, it's worth to use these instead of proprietary
attributes and methods.
- MSIE 6 does not support DOM 2 CSS; Mozilla 1.x and Gecko-based
browsers support very well most of the attributes and methods. Opera 7.x
does not support DOM 2 CSS very well.
This page:
Browser Feature Detection
http://devedge.netscape.com/toolbox/tools/2001/feature-detection/
shows a rough overview of the support for attributes and methods. When
going over each attribute and method, one can find partial support,
bugs, incomplete support, failures at tests, etc.. The measurement of
support for an attribute and method depends in most part on how strict,
exhaustive testing is done on each attribute and method.
The W3C also created pages where one can tests exhaustively the support
for attributes and properties:
DOM Conformance Test Suites
http://www.w3.org/DOM/Test/#releases
Finally Mozilla 1.6+ supports a few DOM 3 methods and attributes which
were introduced in DOM 3. Since most DOM 2 attributes and methods are
repeated in DOM 3, you could say Mozilla supports DOM 3 too.
What does each DOM Level bring?
http://www.mozilla.org/docs/dom/reference/levels.html
DU