Appendix A: Changes
- Editors
- Arnaud Le Hors, W3C
A.1: Changes between DOM Level 1 and DOM Level 2
A.1.1: Changes to DOM Level 1 interfaces and exceptions
- Interface
Attr
- The
Attr interface has one new
attribute: ownerElement. - Interface
Document
- The
Document interface has five new methods:
importNode, createElementNS,
createAttributeNS, getElementsByTagNameNS
and getElementById. - Interface
NamedNodeMap
- The
NamedNodeMap interface has three new
methods: getNamedItemNS, setNamedItemNS,
removeNamedItemNS. - Interface
Node
- The
Node interface has two new
methods: supports and normalize.
The Node interface has three new attributes:
namespaceURI, prefix and
localName.
The ownerDocument attribute was specified to be
null when the node is a Document. It
now is also null when the node is a
DocumentType which is not used with any
Document yet. - Interface
DocumentType
- The
DocumentType interface has three attributes:
publicId, systemId and
internalSubset. - Interface
DOMImplementation
- The
DOMImplementation interface has two new
methods: createDocumentType and
createDocument. - Interface
Element
- The
Element interface has six new
methods: getAttributeNS,
setAttributeNS, removeAttributeNS,
getAttributeNodeNS, setAttributeNodeNS,
getElementsByTagNameNS.
The method normalize is now inherited from
the Node interface where it was moved. - Exception
DOMException
- The
DOMException has five new
exception codes: INVALID_STATE_ERR,
SYNTAX_ERR, INVALID_MODIFICATION_ERR,
NAMESPACE_ERR and INVALID_ACCESS_ERR.
A.1.2: New interfaces
- HTML
- The
HTMLDOMImplementation interface was
added to the HTML module.
In the HTMLDocument interface, The method
getElementById is now inherited from the
Document interface where it was moved. - Views
- This new module defines the interfaces
AbstractView and DocumentView. - StyleSheets
- This new module defines the following interfaces:
StyleSheet, StyleSheetList,
MediaList, DocumentStyle and
LinkStyle. - CSS
- This new module defines the following interfaces
CSS2Azimuth,
CSS2BackgroundPosition,
CSS2BorderSpacing,
CSS2CounterIncrement, CSS2CounterReset,
CSS2Cursor, CSS2FontFaceSrc,
CSS2FontFaceWidths, CSS2PageSize,
CSS2PlayDuring, CSS2Properties,
CSS2TextShadow, CSSCharsetRule,
CSSFontFaceRule, CSSImportRule,
CSSMediaRule, CSSPageRule,
CSSPrimitiveValue, CSSRule,
CSSRuleList, CSSStyleDeclaration,
CSSStyleRule, CSSStyleSheet,
CSSUnknownRule, CSSValue,
CSSValueList, Counter,
RGBColor, Rect, ViewCSS,
DocumentCSS, DOMImplementationCSS and
ElementCSSInlineStyle.
- Events
- This new module defines the following interfaces
Event, EventListener,
EventTarget, DocumentEvent,
MutationEvent,
UIEvent and MouseEvent, and the
exception EventException. - Traversal
- This new module defines the following interfaces
NodeFilter, NodeIterator,
TreeWalker, and DocumentTraversal. - Range
- This new module defines the interfaces
Range,
DocumentRange and the exception
RangeException.