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

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 Safari 2
Interface EventTarget
(General) ?
addEventListener() ?
dispatchEvent() ?
removeEventListener() ?
Interface EventListener
(General) ?
handleEvent() ?
Interface Event
(General) ?
bubbles ?
cancelable ?
currentTarget ?
eventPhase ?
target ?
timeStamp ?
type ?
initEvent() ?
preventDefault() ?
stopPropagation() ?
Interface DocumentEvent
(General) ?
createEvent ?
Interface UIEvent
(General) ?
detail ?
view ?
initUIEvent() ?
Interface MouseEvent
(General) ?
altKey ?
button ?
clientX I
clientY I
ctrlKey ?
metaKey ?
relatedTarget ?
screenX Y
screenY Y
shiftKey ?
initMouseEvent() ?
Type click ?
Type mousedown ?
Type mouseup ?
Type mouseover ?
Type mousemove ?
Type mouseout ?
Interface MutationEvent
(General) ?
attrChange ?
attrName ?
newValue ?
prevValue ?
relatedNode ?
initMutationEvent() ?
HTML event types
Type load ?
Type unload ?
Type abort ?
Type error ?
Type select ?
Type change ?
Type submit ?
Type reset ?
Type focus ?
Type blur ?
Type resize ?
Type scroll ?

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 Safari 2
Interface HTMLCollection
(General) ?
length ?
item() ?
namedItem() ?
Interface HTMLOptionsCollection
(General) ?
length ?
item() ?
namedItem() ?
Interface HTMLDocument
(General) ?
URL ?
anchors ?
applets ?
body ?
cookie ?
domain ?
forms ?
images ?
links ?
referrer ?
title ?
close() ?
getElementsByName() ?
open() ?
write() ?
writeln() ?
Interface HTMLElement
(General) ?
className ?
dir ?
id ?
lang ?
title ?
Interface HTMLHtmlElement
(General) ?
version ?
Interface HTMLHeadElement
(General) ?
profile ?
Interface HTMLLinkElement
(General) ?
charset ?
disabled ?
href ?
hreflang ?
media ?
rel ?
rev ?
target ?
type ?
Interface HTMLTitleElement
(General) ?
text ?
Interface HTMLMetaElement
(General) ?
content ?
httpEquiv ?
name ?
scheme ?
Interface HTMLBaseElement
(General) ?
href ?
target ?
Interface HTMLIsIndexElement
(General) ?
form ?
prompt ?
Interface HTMLStyleElement
(General) ?
disabled ?
media ?
type ?
Interface HTMLBodyElement
(General) ?
aLink ?
background ?
bgColor ?
link ?
text ?
vLink ?
Interface HTMLFormElement
(General) ?
acceptCharset ?
action ?
elements ?
enctype ?
length ?
method ?
name ?
target ?
reset() ?
submit() ?
Interface HTMLSelectElement
(General) ?
disabled ?
form ?
length ?
multiple ?
name ?
options ?
selectedIndex ?
size ?
tabIndex ?
type ?
value ?
add() ?
blur() ?
focus() ?
remove() ?
Interface HTMLOptGroupElement
(General) ?
disabled ?
label ?
Interface HTMLOptionElement
(General) ?
defaultSelected ?
disabled ?
form ?
index ?
label ?
selected ?
text ?
value ?
Interface HTMLInputElement
(General) ?
accept ?
accessKey ?
align ?
alt ?
checked ?
defaultChecked ?
defaultValue ?
disabled ?
form ?
maxLength ?
name ?
readOnly ?
size ?
src ?
tabIndex ?
type ?
useMap ?
value ?
blur() ?
click() ?
focus() ?
select() ?
Interface HTMLTextAreaElement
(General) ?
accessKey ?
cols ?
defaultValue ?
disabled ?
form ?
name ?
readOnly ?
rows ?
tabIndex ?
type ?
value ?
blur() ?
focus() ?
select() ?
Interface HTMLButtonElement
(General) ?
accessKey ?
disabled ?
form ?
name ?
tabIndex ?
type ?
value ?
Interface HTMLLabelElement
(General) ?
accessKey ?
form ?
htmlFor ?
Interface HTMLFieldSetElement
(General) ?
form ?
Interface HTMLLegendElement
(General) ?
accessKey ?
align ?
form ?
Interface HTMLUListElement
(General) ?
compact ?
type ?
Interface HTMLOListElement
(General) ?
compact ?
start ?
type ?
Interface HTMLDListElement
(General) ?
compact ?
Interface HTMLDirectoryElement
(General) ?
compact ?
Interface HTMLMenuElement
(General) ?
compact ?
Interface HTMLLIElement
(General) ?
type ?
value ?
Interface HTMLDivElement
(General) ?
align ?
Interface HTMLParagraphElement
(General) ?
align ?
Interface HTMLHeadingElement
(General) ?
align ?
Interface HTMLQuoteElement
(General) ?
cite ?
Interface HTMLPreElement
(General) ?
width ?
Interface HTMLBRElement
(General) ?
clear ?
Interface HTMLBaseFontElement
(General) ?
color ?
face ?
size ?
Interface HTMLFontElement
(General) ?
color ?
face ?
size ?
Interface HTMLHRElement
(General) ?
align ?
noShade ?
size ?
width ?
Interface HTMLModElement
(General) ?
cite ?
dateTime ?
Interface HTMLAnchorElement
(General) ?
accessKey ?
charset ?
coords ?
href ?
hreflang ?
name ?
rel ?
rev ?
shape ?
tabIndex ?
target ?
type ?
blur() ?
focus() ?
Interface HTMLImageElement
(General) ?
align ?
alt ?
border ?
height ?
hspace ?
isMap ?
longDesc ?
name ?
src ?
useMap ?
vspace ?
width ?
Interface HTMLObjectElement
(General) ?
align ?
archive ?
border ?
code ?
codeBase ?
codeType ?
contentDocument ?
data ?
declare ?
form ?
height ?
hspace ?
name ?
standby ?
tabIndex ?
type ?
useMap ?
vspace ?
width ?
Interface HTMLParamElement
(General) ?
name ?
type ?
value ?
valueType ?
Interface HTMLAppletElement
(General) ?
align ?
alt ?
archive ?
code ?
codeBase ?
height ?
hspace ?
name ?
object ?
vspace ?
width ?
Interface HTMLMapElement
(General) ?
areas ?
name ?
Interface HTMLAreaElement
(General) ?
accessKey ?
alt ?
coords ?
href ?
noHref ?
shape ?
tabIndex ?
target ?
Interface HTMLScriptElement
(General) ?
charset ?
defer ?
event ?
htmlFor ?
src ?
text ?
type ?
Interface HTMLTableElement
(General) ?
align ?
bgColor ?
border ?
caption ?
cellPadding ?
cellSpacing ?
frame ?
rows Y
rules N
summary ?
tBodies ?
tFoot ?
tHead ?
width ?
createCaption() ?
createTFoot() ?
createTHead() ?
deleteCaption() ?
deleteRow() ?
deleteTFoot() ?
deleteTHead() ?
insertRow() ?
Interface HTMLTableCaptionElement
(General) ?
align ?
Interface HTMLTableColElement
(General) ?
align ?
ch ?
chOff ?
span ?
vAlign ?
width ?
Interface HTMLTableSectionElement
(General) ?
align ?
ch ?
chOff ?
rows ?
vAlign ?
deleteRow() ?
insertRow() ?
Interface HTMLTableRowElement
(General) ?
align ?
bgColor ?
cells ?
ch ?
chOff ?
rowIndex ?
sectionRowIndex ?
vAlign ?
deleteCell() ?
insertCell() ?
Interface HTMLTableCellElement
(General) ?
abbr ?
align ?
axis ?
bgColor ?
cellIndex ?
ch ?
chOff ?
colSpan ?
headers ?
height ?
noWrap ?
rowSpan ?
scope ?
vAlign ?
width ?
Interface HTMLFrameSetElement
(General) ?
cols ?
rows ?
Interface HTMLFrameElement
(General) ?
contentDocument ?
frameBorder ?
longDesc ?
marginHeight ?
marginWidth ?
name ?
noResize ?
scrolling ?
src ?
Interface HTMLIFrameElement
(General) ?
align ?
contentDocument ?
frameBorder ?
height ?
longDesc ?
marginHeight ?
marginWidth ?
name ?
scrolling ?
src ?
width ?

DOM Level 3 Load and Save

Up

DOM Level 3 Load and Save defines a model for scripts to transfer information back and forth between XML documents and DOM structures.

DOM Level 3 Load and Save
Feature Safari 2
Interface DOMImplementationLS
(General) ?
createLSInput() ?
createLSOutput() ?
createLSParser() ?
createLSSerializer() ?
Interface LSParser
(General) ?
async ?
busy ?
domConfig ?
filter ?
abort() ?
parse() ?
parseURI() ?
parseWithContext() ?
Interface LSInput
(General) ?
baseURI ?
byteStream ?
certifiedText ?
characterStream ?
encoding ?
publicId ?
stringData ?
systemId ?
Interface LSResourceResolver
(General) ?
resolveResource() ?
Interface LSParserFilter
(General) ?
whatToShow ?
acceptNode() ?
startElement() ?
Interface LSProgressEvent
(General) ?
input ?
position ?
totalsize ?
Interface LSLoadEvent
(General) ?
input ?
newDocument ?
Interface LSSerializer
(General) ?
domConfig ?
filter ?
newLine ?
write() ?
writeToString() ?
writeToURI() ?
Interface LSOutput
(General) ?
byteStream ?
characterStream ?
systemId ?
Interface LSSerializerFilter
(General) ?
whatToShow ?

DOM Level 2 Style

Up

DOM Level 2 Style defines the model for interacting with stylesheets and element style information.

DOM Level 2 Style
Feature Safari 2
Interface StyleSheet
(General) ?
disabled ?
href ?
media ?
ownerNode ?
parentStyleSheet ?
title ?
type ?
Interface StyleSheetList
(General) ?
length ?
item() ?
Interface MediaList
(General) ?
length ?
mediaText ?
appendMedium() ?
deleteMedium() ?
item() ?
Interface LinkStyle
(General) ?
sheet ?
Interface DocumentStyle
(General) ?
styleSheets ?
Interface CSSStyleSheet
(General) ?
cssRules ?
ownerRule ?
deleteRule() ?
insertRule() ?
Interface CSSRuleList
(General) ?
length ?
item() ?
Interface CSSRule
(General) ?
cssText ?
parentRule ?
parentStyleSheet ?
type ?
Interface CSSStyleRule
(General) ?
selectorText ?
style ?
Interface CSSMediaRule
(General) ?
cssRules ?
media ?
deleteRule() ?
insertRule() ?
Interface CSSFontFaceRule
(General) ?
style ?
Interface CSSPageRule
(General) ?
selectorText ?
style ?
Interface CSSImportRule
(General) ?
href ?
media ?
styleSheet ?
Interface CSSCharsetRule
(General) ?
encoding ?
Interface CSSUnknownRule
(General) ?
Interface CSSStyleDeclaration
(General) ?
cssText ?
length ?
parentRule ?
getPropertyCSSValue() ?
getPropertyPriority() ?
getPropertyValue() ?
item() ?
removeProperty() ?
setProperty() ?
Interface CSSValue
(General) ?
cssText ?
cssValueType ?
Interface CSSPrimitiveValue
(General) ?
primitiveType ?
getCounterValue() ?
getFloatValue() ?
getRGBColorValue() ?
getRectValue() ?
getStringValue() ?
setFloatValue() ?
setStringValue() ?
Interface CSSValueList
(General) ?
length ?
item() ?
Interface RGBColor
(General) ?
blue ?
green ?
red ?
Interface Rect
(General) ?
bottom ?
left ?
right ?
top ?
Interface Counter
(General) ?
identifier ?
listStyle ?
separator ?
Interface ViewCSS
(General) ?
getComputedStyle() ?
Interface DocumentCSS
(General) ?
getOverrideStyle() ?
Interface DOMImplementationCSS
(General) ?
createCSSStyleSheet() ?
Interface ElementCSSInlineStyle
(General) ?
style ?
Interface CSS2Properties
(General) ?
azimuth ?
background ?
backgroundAttachment ?
backgroundColor ?
backgroundImage ?
backgroundPosition ?
backgroundRepeat ?
border ?
borderBottom ?
borderBottomColor ?
borderBottomStyle ?
borderBottomWidth ?
borderCollapse ?
borderColor ?
borderLeft ?
borderLeftColor ?
borderLeftStyle ?
borderLeftWidth ?
borderRight ?
borderRightColor ?
borderRightStyle ?
borderRightWidth ?
borderSpacing ?
borderStyle ?
borderTop ?
borderTopColor ?
borderTopStyle ?
borderTopWidth ?
borderWidth ?
bottom ?
captionSide ?
clear ?
clip ?
color ?
content ?
counterIncrement ?
counterReset ?
cssFloat ?
cue ?
cueAfter ?
cueBefore ?
cursor ?
direction ?
display ?
elevation ?
emptyCells ?
font ?
fontFamily ?
fontSize ?
fontSizeAdjust ?
fontStretch ?
fontStyle ?
fontVariant ?
fontWeight ?
height ?
left ?
letterSpacing ?
lineHeight ?
listStyle ?
listStyleImage ?
listStylePosition ?
listStyleType ?
margin ?
marginBottom ?
marginLeft ?
marginRight ?
marginTop ?
markerOffset ?
marks ?
maxHeight ?
maxWidth ?
minHeight ?
minWidth ?
orphans ?
outline ?
outlineColor ?
outlineStyle ?
outlineWidth ?
overflow ?
padding ?
paddingBottom ?
paddingLeft ?
paddingRight ?
paddingTop ?
page ?
pageBreakAfter ?
pageBreakBefore ?
pageBreakInside ?
pause ?
pauseAfter ?
pauseBefore ?
pitch ?
pitchRange ?
playDuring ?
position ?
quotes ?
richness ?
right ?
size ?
speakHeader ?
speakNumeral ?
speakPunctuation ?
speechRate ?
stress ?
tableLayout ?
textAlign ?
textDecoration ?
textIndent ?
textShadow ?
textTransform ?
top ?
unicodeBidi ?
verticalAlign ?
visibility ?
voiceFamily ?
volume ?
whiteSpace ?
widows ?
width ?
wordSpacing ?
zIndex ?

DOM Level 2 Traversal and Range

Up

DOM Level 2 Traversal and Range defines a model for scripts to navigate through document contents and work with data positions.

DOM Level 2 Traversal and Range
Feature Safari 2
Interface NodeIterator
(General) ?
expandEntityReferences ?
filter ?
root ?
whatToShow ?
detach() ?
nextNode() ?
previousNode() ?
Interface NodeFilter
(General) ?
acceptNode() ?
Interface TreeWalker
(General) ?
currentNode ?
expandEntityReference ?
filter ?
root ?
whatToShow ?
firstChild() ?
lastChild() ?
nextNode() ?
nextSibling() ?
parentNode() ?
previousNode() ?
previousSibling() ?
Interface DocumentTraversal
(General) ?
createNodeIterator() ?
createTreeWalker() ?
Interface Range
(General) ?
collapsed ?
commonAncestorContainer ?
endContainer ?
endOffset ?
startContainer ?
startOffset ?
cloneContents() ?
cloneRange() ?
collapse() ?
compareBoundaryPoints() ?
deleteContents() ?
detach() ?
extractContents() ?
insertNode() ?
selectNode() ?
selectNodeContents() ?
setEnd() ?
setEndAfter() ?
setEndBefore() ?
setStart() ?
setStartAfter() ?
startStartBefore() ?
surroundContents() ?
toString() ?
Interface DocumentRange
(General) ?
createRange() ?

DOM Level 3 Validation

Up

DOM Level 3 Validation defines a model that aids scripts in maintaining valid documents while modifying their content.

DOM Level 3 Validation
Feature Safari 2
Interface DocumentEditVAL
(General) ?
continuousValidityChecking ?
domConfig ?
getDefinedElements() ?
validateDocument() ?
Interface NodeEditVAL
(General) ?
defaultValue ?
enumeratedValues ?
canAppendChild() ?
canInsertBefore() ?
canRemoveChild() ?
canReplaceChild() ?
nodeValidity() ?
Interface ElementEditVAL
(General) ?
allowedAttributes ?
allowedChildren ?
allowedFirstChildren ?
allowedNextSiblings ?
allowedParents ?
allowedPreviousSiblings ?
contentType ?
requiredAttributes ?
canRemoveAttribute() ?
canRemoveAttributeNS() ?
canRemoveAttributeNode() ?
canSetAttribute() ?
canSetAttributeNS() ?
canSetAttributeNode() ?
canSetTextContent() ?
isElementDefined() ?
isElementDefinedNS() ?
Interface CharacterDataEditVAL
(General) ?
canAppendData() ?
canDeleteData() ?
canInsertData() ?
canReplaceData() ?
canSetData() ?
isWhitespaceOnly() ?

DOM Level 2 Views

Up

DOM Level 2 Views defines a model for scripts to handle different views of a document.

DOM Level 2 Views
Feature Safari 2
Interface AbstractView
(General) ?
document ?
Interface DocumentView
(General) ?
defaultView ?