What does it mean to be compliant with the DOM specification?
A DOM-compliant document model is one that responds to all the DOM API calls with the results documented in a specific Level of the DOM Recommendation. You are not required to implement the optional modules (XML, HTML, Stylesheet, CSS, Traversal, Ranges, Events or the specific event sets) in order to claim compliance, but if your DOM does not completely implement these it should respond “false” to the relevant hasFeature queries. For example, a DOM which implements just the Level 1 APIs plus the importNode method would be compliant only with Level 1, since it does not have complete support for Level 2. In many situations, it is possible and desirable to add features to a DOM without breaking compliance. The simplest and safest way to do so is to define a new set of APIs which the objects in your customized DOM could support, so the behavior of the standard DOM API can be left unchanged.
A DOM-compliant document model is one that responds to all the DOM API calls with the results documented in a specific Level of the DOM Recommendation. You are not required to implement the optional modules (XML, HTML, Stylesheet, CSS, Traversal, Ranges, Events or the specific event sets) in order to claim compliance, but if your DOM does not completely implement these it should respond “false” to the relevant hasFeature queries. For example, a DOM which implements just the Level 1 APIs plus the importNode method would be compliant only with Level 1, since it does not have complete support for Level 2. In many situations, it is possible and desirable to add features to a DOM without breaking compliance. The simplest and safest way to do so is to define a new set of APIs which the objects in your customized DOM could support, so the behavior of the standard DOM API can be left unchanged. The HTML DOM is a good example of this approach; it defined a set of custom subclasses of standard D