This section summarizes the changes between [DOM Level 2 Core] and this new version of the Core specification.
The following new sections have been added:
DOMConfiguration;
AttrAttr interface has one new attribute,
Attr.schemaTypeInfo, and one new method,
Attr.isId().DocumentDocument interface has seven new
attributes: Document.actualEncoding,
Document.xmlEncoding,
Document.xmlStandalone,
Document.xmlVersion,
Document.strictErrorChecking,
Document.documentURI, and
Document.config. It has three new methods:
Document.adoptNode(source),
Document.normalizeDocument(), and
Document.renameNode(n, namespaceURI,
qualifiedName). The attribute
Document.doctype has been modified.
DOMExceptionDOMException has two new exception codes:
VALIDATION_ERR and
TYPE_MISMATCH_ERR.
DOMImplementationDOMImplementation interface has one new
method, DOMImplementation.getFeature(feature,
version).EntityDocument interface has three new
attributes: Entity.actualEncoding,
Entity.xmlEncoding, and
Entity.xmlVersion.
ElementElement interface has one new attribute,
Element.schemaTypeInfo, and three new methods:
Element.setIdAttribute(name, isId),
Element.setIdAttributeNS(namespaceURI, localName,
isId), and Element.setIdAttributeNode(idAttr,
isId).
NodeNode interface has two new attributes,
Node.baseURI and Node.textContent.
It has nine new methods:
Node.compareDocumentPosition(other),
Node.isSameNode(other),
Node.lookupPrefix(namespaceURI),
Node.isDefaultNamespace(namespaceURI),
Node.lookupNamespaceURI(prefix),
Node.isEqualNode(arg),
Node.getFeature(feature, version),
Node.setUserData(key, data, handler),
Node.getUserData(key). It introduced 6 new
constants: Node.DOCUMENT_POSITION_DISCONNECTED,
Node.DOCUMENT_POSITION_PRECEDING,
Node.DOCUMENT_POSITION_FOLLOWING,
Node.DOCUMENT_POSITION_CONTAINS,
Node.DOCUMENT_POSITION_CONTAINED_BY, and
Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC. The
methods Node.insertBefore(newChild, refChild),
Node.replaceChild(newChild, oldChild) and
Node.removeChild(oldChild) have been modified.
TextText interface has one new attribute,
Text.wholeText, and one new method,
Text.replaceWholeText(content).
DOMUserDataDOMUserData type was added to the Core
module.DOMObjectDOMObject type was added to the Core
module.DOMStringListDOMStringList interface has one
attribute, DOMStringList.length, and one
method, DOMStringList.item(index).
NameListNameList interface has one attribute,
NameList.length, and two methods,
NameList.getName(index) and
NameList.getNamespaceURI(index).
DOMImplementationListDOMImplementationList interface has one
attribute, DOMImplementationList.length, and
one method,
DOMImplementationList.item(index).
DOMImplementationSourceDOMImplementationSource interface has two
methods,
DOMImplementationSource.getDOMImplementation(features),
and
DOMImplementationSource.getDOMImplementations(features).
TypeInfoTypeInfo interface has two attributes,
TypeInfo.typeName, and
TypeInfo.typeNamespace.
UserDataHandlerUserDataHandler interface has one method,
UserDataHandler.handle(operation, key, data, src,
dst), and four constants:
UserDataHandler.NODE_CLONED,
UserDataHandler.NODE_IMPORTED,
UserDataHandler.NODE_DELETED, and
UserDataHandler.NODE_RENAMED.
DOMErrorDOMError interface has six attributes:
DOMError.severity,
DOMError.message,
DOMError.type,
DOMError.relatedException,
DOMError.relatedData, and
DOMError.location. It has four constants:
DOMError.SEVERITY_WARNING,
DOMError.SEVERITY_ERROR, and
DOMError.SEVERITY_FATAL_ERROR.
DOMErrorHandlerDOMErrorHandler interface has one method:
DOMErrorHandler.handleError(error).
DOMLocatorDOMLocator interface has five attributes:
DOMLocator.lineNumber,
DOMLocator.columnNumber,
DOMLocator.offset,
DOMLocator.relatedNode,
DOMLocator.uri, and
DOMLocator.lineNumber.
DOMConfigurationDOMLocator interface has three methods:
DOMConfiguration.setParameter(name, value),
DOMConfiguration.getParameter(name), and
DOMConfiguration.canSetParameter(name,
value).
DOMImplementationRegistryDOMImplementationRegistry object, only
provided in the bindings, has two methods,
DOMImplementationRegistry.getDOMImplementation(features),
and
DOMImplementationRegistry.getDOMImplementations(features).