Web browser DOM support

This document is a section of the web browser standards support document. It includes detailed information about DOM support in major web browsers.

Pick browsers to display

Table of Contents

  1. About
  2. Specifications
  3. DOM standards and maturing drafts
    1. DOM Level 3 Core
    2. DOM Level 2 Events
    3. DOM Level 2 HTML
    4. DOM Level 3 Load and Save
    5. DOM Level 2 Style
    6. DOM Level 2 Traversal and Range
    7. DOM Level 3 Validation
    8. DOM Level 2 Views

About

Up

DOM is a model that allows scripting languages to handle browser input and output and manipulate information on webpages. This is essential for high-end web applications.

Specifications

Up

DOM standards and maturing drafts

Up

DOM Level 3 Core

Up

DOM Level 3 Core defines the standard methods and attributes across all DOM implementations Levels 3 and below. The DOM Core is the most fundamental part of the DOM specification.

DOM Level 3 Core
Feature IE 6 IE 7 Firefox 2 Firefox 3 Opera 9
Interface DOMStringList
(General) N N N ? Y
length N N N ? Y
contains() N N N ? Y
item() N N N ? Y
Interface NameList
(General) N N N ? N
length N N N ? N
contains() N N N ? N
containsNS() N N N ? N
getName() N N N ? N
getNamespaceURI() N N N ? N
Interface DOMImplementationList
(General) N N N ? N
length N N N ? N
item() N N N ? N
Interface DOMImplementationSource
(General) N N N ? N
getDOMImplementation() N N N ? N
getDOMImplementationList() N N N ? N
Interface DOMImplementation
(General) I I Y Y Y
createDocument() N N Y Y Y
createDocumentType() N N Y Y Y
getFeature() N N N ? Y
hasFeature() Y Y Y Y Y
Interface DocumentFragment
(General) I I Y Y Y
Interface Document
(General) I I Y Y Y
doctype I I Y Y Y
documentElement Y Y Y Y Y
documentURI N N Y Y Y
domConfig N N N ? N
implementation Y Y Y Y Y
inputEncoding N N Y Y N
strictErrorChecking N N Y Y N
xmlEncoding N N I ? N
xmlStandalone N N Y Y N
xmlVersion N N Y Y N
adoptNode() N N Y Y Y
createAttribute() Y Y Y Y Y
createAttributeNS() N N Y Y Y
createCDATASection() N N Y Y Y
createComment() Y Y Y Y Y
createDocumentFragment() Y Y Y Y Y
createElement() Y Y Y Y Y
createElementNS() N N Y Y Y
createEntityReference() N N I ? N
createProcessingInstruction() N N Y Y Y
createTextNode() Y Y Y Y Y
getElementById() I I Y Y Y
getElementsByTagName() Y Y Y Y Y
getElementsByTagNameNS() N N Y Y Y
importNode() N N Y Y Y
normalizeDocument() N N Y Y N
renameNode() N N Y Y N
Interface Node
(General) I I Y Y Y
attributes Y Y Y Y Y
baseURI N N Y Y N
childNodes Y Y Y Y Y
firstChild Y Y Y Y Y
lastChild Y Y Y Y Y
localName N N Y Y Y
namespaceURI N N Y Y I
nextSibling Y Y Y Y Y
nodeName Y Y Y Y Y
nodeType Y Y Y Y Y
nodeValue Y Y Y Y Y
ownerDocument Y Y Y Y Y
parentNode Y Y Y Y Y
prefix N N Y Y Y
previousSibling Y Y Y Y Y
textContent N N Y Y Y
appendChild() Y Y Y Y Y
cloneNode() Y Y Y Y Y
compareDocumentPosition() N N Y Y N
getFeature() N N Y Y Y
getUserData() N N N ? N
hasAttributes() N N Y Y Y
hasChildNodes() Y Y Y Y Y
insertBefore() Y Y Y Y Y
isDefaultNamespace() N N Y Y I
isEqualNode() N N N ? N
isSameNode() N N Y Y N
isSupported() N N Y Y Y
lookupNamespaceURI() N N Y Y Y
lookupPrefix() N N Y Y Y
normalize() I I I ? Y
removeChild() Y Y Y Y Y
replaceChild() Y Y Y Y Y
setUserData() N N N ? N
Interface NodeList
(General) I I Y Y Y
length Y Y Y Y Y
item() Y Y Y Y Y
Interface NamedNodeMap
(General) I I Y Y Y
length Y Y Y Y Y
getNamedItem() Y Y Y Y Y
getNamedItemNS() N N Y Y Y
item() Y Y Y Y Y
removeNamedItem() Y Y Y Y Y
removeNamedItemNS() N N Y Y Y
setNamedItem() Y Y Y Y Y
setNamedItemNS() N N Y Y Y
Interface CharacterData
(General) I I Y Y Y
data Y Y Y Y Y
length Y Y Y Y Y
appendData() Y Y Y Y Y
deleteData() Y Y Y Y Y
insertData() Y Y Y Y Y
replaceData() Y Y Y Y Y
substringData() Y Y Y Y Y
Interface Attr
(General) I I Y Y Y
isId N N N ? N
name Y Y Y Y Y
ownerElement N N Y Y Y
schemaTypeInfo N N N ? N
specified Y Y Y Y Y
value Y Y Y Y Y
Interface Element
(General) I I Y Y Y
schemaTypeInfo N N N ? N
tagName Y Y Y Y Y
getAttribute() I I Y Y Y
getAttributeNS() N N I ? Y
getAttributeNode() Y Y Y Y Y
getAttributeNodeNS() N N I ? Y
getElementsByTagName() Y Y Y Y Y
getElementsByTagNameNS() N N Y Y Y
hasAttribute() N N Y Y Y
hasAttributeNS() N N Y Y Y
removeAttribute() I I Y Y Y
removeAttributeNS() N N Y Y Y
removeAttributeNode() Y Y Y Y Y
setAttribute() I I Y Y Y
setAttributeNS() N N Y Y Y
setAttributeNode() Y Y Y Y Y
setAttributeNodeNS() N N Y Y Y
setIdAttribute() N N N ? N
setIdAttributeNS() N N N ? N
setIdAttributeNode() N N N ? N
Interface Text
(General) I I Y Y Y
isElementContentWhitespace N N N ? N
wholeText N N N ? N
replaceWholeText() N N N ? N
splitText() Y Y Y Y Y
Interface Comment
(General) I I Y Y Y
Interface TypeInfo
(General) N N N ? N
typeName N N N ? N
typeNamespace N N N ? N
isDerivedFrom() N N N ? N
Interface UserDataHandler
(General) N N N ? N
handle() N N N ? N
Interface DOMError
(General) N N N ? N
location N N N ? N
message N N N ? N
relatedData N N N ? N
relatedException N N N ? N
severity N N N ? N
type N N N ? N
Interface DOMErrorHandler
(General) N N N ? N
handleError() N N N ? N
Interface DOMLocator
(General) N N N ? N
byteOffset N N N ? N
columnNumber N N N ? N
lineNumber N N N ? N
relatedNode N N N ? N
uri N N N ? N
utf16Offset N N N ? N
Interface DOMConfiguration
(General) N N N ? Y
parameterNames N N N ? Y
canSetParameter() N N N ? I
getParameter() N N N ? Y
setParameter() N N N ? Y
Interface CDATASection
(General) N N Y Y Y
Interface DocumentType
(General) N N Y Y Y
entities N N I ? Y
internalSubset N N Y Y Y
name N N Y Y Y
notations N N I ? Y
publicId N N Y Y Y
systemId N N Y Y Y
Interface Notation
(General) N N N ? Y
publicId N N N ? Y
systemId N N N ? Y
Interface Entity
(General) N N N ? Y
inputEncoding N N N ? N
notationName N N N ? Y
publicId N N N ? Y
systemId N N N ? Y
xmlEncoding N N N ? N
xmlVersion N N N ? N
Interface EntityReference
(General) N N N ? N
Interface ProcessingInstruction
(General) N N Y Y Y
data N N Y Y Y
target N N Y Y Y

DOM Level 2 Events

Up

DOM Level 2 Events defines the event model for DOM implementations. It allows the user to actively interact with the contents of the document.

DOM Level 2 Events
Feature IE 6 IE 7 Firefox 2 Firefox 3 Opera 9
Interface EventTarget
(General) N N Y Y Y
addEventListener() N N Y Y Y
dispatchEvent() N N Y Y Y
removeEventListener() N N Y Y Y
Interface EventListener
(General) I I Y Y Y
handleEvent() Y Y Y Y Y
Interface Event
(General) I I Y Y Y
bubbles N N Y Y Y
cancelable N N Y Y Y
currentTarget N N Y Y Y
eventPhase N N Y Y Y
target N N Y Y Y
timeStamp N N Y Y Y
type Y Y Y Y Y
initEvent() N N Y Y Y
preventDefault() N N Y Y Y
stopPropagation() N N Y Y Y
Interface DocumentEvent
(General) N N Y Y Y
createEvent N N Y Y Y
Interface UIEvent
(General) N N Y Y Y
detail N N Y Y Y
view N N Y Y Y
initUIEvent() N N Y Y Y
Interface MouseEvent
(General) I I Y Y Y
altKey Y Y Y Y Y
button I I Y Y Y
clientX Y Y Y Y Y
clientY Y Y Y Y Y
ctrlKey Y Y Y Y Y
metaKey N N Y Y Y
relatedTarget N N Y Y Y
screenX Y Y Y Y Y
screenY Y Y Y Y Y
shiftKey Y Y Y Y Y
initMouseEvent() N N Y Y Y
Type click Y Y Y Y Y
Type mousedown Y Y Y Y Y
Type mouseup Y Y Y Y Y
Type mouseover Y Y Y Y Y
Type mousemove Y Y Y Y Y
Type mouseout Y Y Y Y Y
Interface MutationEvent
(General) N N Y Y Y
attrChange N N Y Y Y
attrName N N Y Y Y
newValue N N Y Y Y
prevValue N N Y Y Y
relatedNode N N Y Y Y
initMutationEvent() N N Y Y Y
HTML event types
Type load Y Y Y Y Y
Type unload Y Y I ? Y
Type abort N N Y Y Y
Type error Y Y Y Y Y
Type select Y Y Y Y Y
Type change Y Y Y Y Y
Type submit Y Y Y Y Y
Type reset Y Y Y Y Y
Type focus Y Y Y Y Y
Type blur Y Y Y Y Y
Type resize Y Y Y Y Y
Type scroll Y Y Y Y Y

DOM Level 2 HTML

Up

DOM Level 2 HTML defines methods and attributes that are specific to HTML implementations of the DOM. This makes common tasks for HTML elements easier and more straight-forward.

DOM Level 2 HTML
Feature IE 6 IE 7 Firefox 2 Firefox 3 Opera 9
Interface HTMLCollection
(General) I I Y Y Y
length Y Y Y Y Y
item() Y Y Y Y Y
namedItem() Y Y Y Y Y
Interface HTMLOptionsCollection
(General) I I Y Y Y
length Y Y Y Y Y
item() Y Y Y Y Y
namedItem() Y Y Y Y Y
Interface HTMLDocument
(General) I I Y Y Y
URL Y Y Y Y Y
anchors Y Y Y Y Y
applets Y Y Y Y Y
body Y Y Y Y Y
cookie Y Y Y Y Y
domain Y Y Y Y Y
forms Y Y Y Y Y
images Y Y Y Y Y
links Y Y Y Y Y
referrer Y Y Y Y Y
title Y Y Y Y Y
close() Y Y Y Y Y
getElementsByName() I I Y Y I
open() Y Y Y Y Y
write() Y Y Y Y Y
writeln() Y Y Y Y Y
Interface HTMLElement
(General) I I Y Y Y
className Y Y Y Y Y
dir Y Y Y Y Y