This document is a section of the web browser standards support document. It includes detailed information about DOM support in major web browsers.
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.
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 2 Events defines the event model for DOM implementations. It allows the user to actively interact with the contents of the document.
| Feature | IE 6 | IE 7 | Firefox 2 |
|---|---|---|---|
| Interface EventTarget | |||
| (General) | N | N | Y |
| addEventListener() | N | N | Y |
| dispatchEvent() | N | N | Y |
| removeEventListener() | N | N | Y |
| Interface EventListener | |||
| (General) | I | I | Y |
| handleEvent() | Y | Y | Y |
| Interface Event | |||
| (General) | I | I | Y |
| bubbles | N | N | Y |
| cancelable | N | N | Y |
| currentTarget | N | N | Y |
| eventPhase | N | N | Y |
| target | N | N | Y |
| timeStamp | N | N | Y |
| type | Y | Y | Y |
| initEvent() | N | N | Y |
| preventDefault() | N | N | Y |
| stopPropagation() | N | N | Y |
| Interface DocumentEvent | |||
| (General) | N | N | Y |
| createEvent | N | N | Y |
| Interface UIEvent | |||
| (General) | N | N | Y |
| detail | N | N | Y |
| view | N | N | Y |
| initUIEvent() | N | N | Y |
| Interface MouseEvent | |||
| (General) | I | I | Y |
| altKey | Y | Y | Y |
| button | I | I | Y |
| clientX | Y | Y | Y |
| clientY | Y | Y | Y |
| ctrlKey | Y | Y | Y |
| metaKey | N | N | Y |
| relatedTarget | N | N | Y |
| screenX | Y | Y | Y |
| screenY | Y | Y | Y |
| shiftKey | Y | Y | Y |
| initMouseEvent() | N | N | Y |
| Type click | Y | Y | Y |
| Type mousedown | Y | Y | Y |
| Type mouseup | Y | Y | Y |
| Type mouseover | Y | Y | Y |
| Type mousemove | Y | Y | Y |
| Type mouseout | Y | Y | Y |
| Interface MutationEvent | |||
| (General) | N | N | Y |
| attrChange | N | N | Y |
| attrName | N | N | Y |
| newValue | N | N | Y |
| prevValue | N | N | Y |
| relatedNode | N | N | Y |
| initMutationEvent() | N | N | Y |
| HTML event types | |||
| Type load | Y | Y | Y |
| Type unload | Y | Y | I |
| Type abort | N | N | Y |
| Type error | Y | Y | Y |
| Type select | Y | Y | Y |
| Type change | Y | Y | Y |
| Type submit | Y | Y | Y |
| Type reset | Y | Y | Y |
| Type focus | Y | Y | Y |
| Type blur | Y | Y | Y |
| Type resize | Y | Y | Y |
| Type scroll | Y | Y | Y |
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 3 Load and Save defines a model for scripts to transfer information back and forth between XML documents and DOM structures.
DOM Level 2 Style defines the model for interacting with stylesheets and element style information.
| Feature | IE 6 | IE 7 | Firefox 2 |
|---|---|---|---|
| Interface StyleSheet | |||
| (General) | I | I | Y |
| disabled | Y | Y | Y |
| href | Y | Y | Y |
| media | I | I | Y |
| ownerNode | N | N | Y |
| parentStyleSheet | Y | Y | Y |
| title | Y | Y | Y |
| type | Y | Y | Y |
| Interface StyleSheetList | |||
| (General) | I | I | Y |
| length | Y | Y | Y |
| item() | Y | Y | Y |
| Interface MediaList | |||
| (General) | N | N | Y |
| length | N | N | Y |
| mediaText | N | N | Y |
| appendMedium() | N | N | Y |
| deleteMedium() | N | N | Y |
| item() | N | N | Y |
| Interface LinkStyle | |||
| (General) | N | N | Y |
| sheet | N | N | Y |
| Interface DocumentStyle | |||
| (General) | I | I | Y |
| styleSheets | Y | Y | Y |
| Interface CSSStyleSheet | |||
| (General) | N | N | Y |
| cssRules | N | N | I |
| ownerRule | N | N | Y |
| deleteRule() | N | N | Y |
| insertRule() | N | N | Y |
| Interface CSSRuleList | |||
| (General) | N | N | Y |
| length | N | N | Y |
| item() | N | N | Y |
| Interface CSSRule | |||
| (General) | N | N | Y |
| cssText | N | N | Y |
| parentRule | N | N | Y |
| parentStyleSheet | N | N | Y |
| type | N | N | Y |
| Interface CSSStyleRule | |||
| (General) | N | N | Y |
| selectorText | N | N | Y |
| style | N | N | Y |
| Interface CSSMediaRule | |||
| (General) | N | N | Y |
| cssRules | N | N | Y |
| media | N | N | Y |
| deleteRule() | N | N | Y |
| insertRule() | N | N | Y |
| Interface CSSFontFaceRule | |||
| (General) | N | N | N |
| style | N | N | N |
| Interface CSSPageRule | |||
| (General) | N | N | N |
| selectorText | N | N | N |
| style | N | N | N |
| Interface CSSImportRule | |||
| (General) | N | N | Y |
| href | N | N | Y |
| media | N | N | Y |
| styleSheet | N | N | Y |
| Interface CSSCharsetRule | |||
| (General) | N | N | Y |
| encoding | N | N | Y |
| Interface CSSUnknownRule | |||
| (General) | N | N | N |
| Interface CSSStyleDeclaration | |||
| (General) | I | I | Y |
| cssText | Y | Y | Y |
| length | N | N | Y |
| parentRule | N | N | Y |
| getPropertyCSSValue() | N | N | Y |
| getPropertyPriority() | N | N | Y |
| getPropertyValue() | N | N | Y |
| item() | N | N | Y |
| removeProperty() | N | N | Y |
| setProperty() | N | N | Y |
| Interface CSSValue | |||
| (General) | N | N | N |
| cssText | N | N | N |
| cssValueType | N | N | N |
| Interface CSSPrimitiveValue | |||
| (General) | N | N | Y |
| primitiveType | N | N | Y |
| getCounterValue() | N | N | N |
| getFloatValue() | N | N | Y |
| getRGBColorValue() | N | N | Y |
| getRectValue() | N | N | Y |
| getStringValue() | N | N | N |
| setFloatValue() | N | N | N |
| setStringValue() | N | N | N |
| Interface CSSValueList | |||
| (General) | N | N | N |
| length | N | N | N |
| item() | N | N | N |
| Interface RGBColor | |||
| (General) | N | N | Y |
| blue | N | N | Y |
| green | N | N | Y |
| red | N | N | Y |
| Interface Rect | |||
| (General) | N | N | Y |
| bottom | N | N | Y |
| left | N | N | Y |
| right | N | N | Y |
| top | N | N | Y |
| Interface Counter | |||
| (General) | N | N | N |
| identifier | N | N | N |
| listStyle | N | N | N |
| separator | N | N | N |
| Interface ViewCSS | |||
| (General) | N | N | Y |
| getComputedStyle() | N | N | Y |
| Interface DocumentCSS | |||
| (General) | N | N | N |
| getOverrideStyle() | N | N | N |
| Interface DOMImplementationCSS | |||
| (General) | N | N | N |
| createCSSStyleSheet() | N | N | N |
| Interface ElementCSSInlineStyle | |||
| (General) | I | I | Y |
| style | Y | Y | Y |
| Interface CSS2Properties | |||
| (General) | I | I | Y |
| azimuth | N | N | Y |
| background | I | I | I |
| backgroundAttachment | Y | Y | Y |
| backgroundColor | I | I | Y |
| backgroundImage | Y | Y | Y |
| backgroundPosition | I | I | Y |
| backgroundRepeat | Y | Y | Y |
| border | I | I | I |
| borderBottom | I | I | Y |
| borderBottomColor | I | I | Y |
| borderBottomStyle | Y | Y | Y |
| borderBottomWidth | I | I | Y |
| borderCollapse | Y | Y | Y |
| borderColor | I | I | I |
| borderLeft | I | I | Y |
| borderLeftColor | I | I | Y |
| borderLeftStyle | Y | Y | Y |
| borderLeftWidth | I | I | Y |
| borderRight | I | I | Y |
| borderRightColor | I | I | Y |
| borderRightStyle | Y | Y | Y |
| borderRightWidth | I | I | Y |
| borderSpacing | N | N | Y |
| borderStyle | Y | Y | I |
| borderTop | I | I | Y |
| borderTopColor | I | I | Y |
| borderTopStyle | Y | Y | Y |
| borderTopWidth | I | I | Y |
| borderWidth | I | I | I |
| bottom | I | I | Y |
| captionSide | N | N | Y |
| clear | Y | Y | Y |
| clip | I | I | Y |
| color | I | I | Y |
| content | N | N | Y |
| counterIncrement | N | N | Y |
| counterReset | N | N | Y |
| cssFloat | N | N | Y |
| cue | N | N | Y |
| cueAfter | N | N | Y |
| cueBefore | N | N | Y |
| cursor | I | I | Y |
| direction | Y | Y | Y |
| display | Y | Y | Y |
| elevation | N | N | Y |
| emptyCells | N | N | Y |
| font | I | I | Y |
| fontFamily | Y | Y | Y |
| fontSize | I | I | Y |
| fontSizeAdjust | N | N | Y |
| fontStretch | N | N | Y |
| fontStyle | Y | Y | Y |
| fontVariant | Y | Y | Y |
| fontWeight | Y | Y | Y |
| height | I | I | Y |
| left | I | I | Y |
| letterSpacing | I | I | Y |
| lineHeight | Y | Y | Y |
| listStyle | I | I | I |
| listStyleImage | Y | Y | Y |
| listStylePosition | Y | Y | Y |
| listStyleType | Y | Y | Y |
| margin | I | I | I |
| marginBottom | I | I | Y |
| marginLeft | I | I | Y |
| marginRight | I | I | Y |
| marginTop | I | I | Y |
| markerOffset | N | N | Y |
| marks | N | N | Y |
| maxHeight | N | I | Y |
| maxWidth | N | I | Y |
| minHeight | I | I | Y |
| minWidth | N | I | Y |
| orphans | N | N | Y |
| outline | N | N | Y |
| outlineColor | N | N | Y |
| outlineStyle | N | N | Y |
| outlineWidth | N | N | Y |
| overflow | Y | Y | Y |
| padding | I | I | I |
| paddingBottom | I | I | Y |
| paddingLeft | I | I | Y |
| paddingRight | I | I | Y |
| paddingTop | I | I | Y |
| page | N | N | Y |
| pageBreakAfter | Y | Y | Y |
| pageBreakBefore | Y | Y | Y |
| pageBreakInside | N | N | Y |
| pause | N | N | Y |
| pauseAfter | N | N | Y |
| pauseBefore | N | N | Y |
| pitch | N | N | Y |
| pitchRange | N | N | Y |
| playDuring | N | N | Y |
| position | Y | Y | Y |
| quotes | N | N | Y |
| richness | N | N | Y |
| right | I | I | Y |
| size | N | N | Y |
| speakHeader | N | N | Y |
| speakNumeral | N | N | Y |
| speakPunctuation | N | N | Y |
| speechRate | N | N | Y |
| stress | N | N | Y |
| tableLayout | Y | Y | Y |
| textAlign | Y | Y | Y |
| textDecoration | Y | Y | Y |
| textIndent | I | I | Y |
| textShadow | N | N | Y |
| textTransform | Y | Y | Y |
| top | I | I | Y |
| unicodeBidi | Y | Y | Y |
| verticalAlign | I | I | Y |
| visibility | Y | Y | Y |
| voiceFamily | N | N | Y |
| volume | N | N | Y |
| whiteSpace | Y | Y | Y |
| widows | N | N | Y |
| width | I | I | Y |
| wordSpacing | I | I | Y |
| zIndex | Y | Y | Y |
DOM Level 2 Traversal and Range defines a model for scripts to navigate through document contents and work with data positions.
| Feature | IE 6 | IE 7 | Firefox 2 |
|---|---|---|---|
| Interface NodeIterator | |||
| (General) | N | N | N |
| expandEntityReferences | N | N | N |
| filter | N | N | N |
| root | N | N | N |
| whatToShow | N | N | N |
| detach() | N | N | N |
| nextNode() | N | N | N |
| previousNode() | N | N | N |
| Interface NodeFilter | |||
| (General) | N | N | Y |
| acceptNode() | N | N | Y |
| Interface TreeWalker | |||
| (General) | N | N | Y |
| currentNode | N | N | Y |
| expandEntityReference | N | N | Y |
| filter | N | N | I |
| root | N | N | Y |
| whatToShow | N | N | Y |
| firstChild() | N | N | I |
| lastChild() | N | N | I |
| nextNode() | N | N | I |
| nextSibling() | N | N | I |
| parentNode() | N | N | I |
| previousNode() | N | N | I |
| previousSibling() | N | N | I |
| Interface DocumentTraversal | |||
| (General) | N | N | Y |
| createNodeIterator() | N | N | N |
| createTreeWalker() | N | N | Y |
| Interface Range | |||
| (General) | N | N | Y |
| collapsed | N | N | Y |
| commonAncestorContainer | N | N | Y |
| endContainer | N | N | Y |
| endOffset | N | N | Y |
| startContainer | N | N | Y |
| startOffset | N | N | Y |
| cloneContents() | N | N | Y |
| cloneRange() | N | N | Y |
| collapse() | N | N | Y |
| compareBoundaryPoints() | N | N | Y |
| deleteContents() | N | N | Y |
| detach() | N | N | Y |
| extractContents() | N | N | Y |
| insertNode() | N | N | Y |
| selectNode() | N | N | Y |
| selectNodeContents() | N | N | Y |
| setEnd() | N | N | Y |
| setEndAfter() | N | N | Y |
| setEndBefore() | N | N | Y |
| setStart() | N | N | Y |
| setStartAfter() | N | N | Y |
| startStartBefore() | N | N | Y |
| surroundContents() | N | N | Y |
| toString() | N | N | Y |
| Interface DocumentRange | |||
| (General) | N | N | Y |
| createRange() | N | N | Y |
DOM Level 3 Validation defines a model that aids scripts in maintaining valid documents while modifying their content.
| Feature | IE 6 | IE 7 | Firefox 2 |
|---|---|---|---|
| Interface DocumentEditVAL | |||
| (General) | N | N | N |
| continuousValidityChecking | N | N | N |
| domConfig | N | N | N |
| getDefinedElements() | N | N | N |
| validateDocument() | N | N | N |
| Interface NodeEditVAL | |||
| (General) | N | N | N |
| defaultValue | N | N | N |
| enumeratedValues | N | N | N |
| canAppendChild() | N | N | N |
| canInsertBefore() | N | N | N |
| canRemoveChild() | N | N | N |
| canReplaceChild() | N | N | N |
| nodeValidity() | N | N | N |
| Interface ElementEditVAL | |||
| (General) | N | N | N |
| allowedAttributes | N | N | N |
| allowedChildren | N | N | N |
| allowedFirstChildren | N | N | N |
| allowedNextSiblings | N | N | N |
| allowedParents | N | N | N |
| allowedPreviousSiblings | N | N | N |
| contentType | N | N | N |
| requiredAttributes | N | N | N |
| canRemoveAttribute() | N | N | N |
| canRemoveAttributeNS() | N | N | N |
| canRemoveAttributeNode() | N | N | N |
| canSetAttribute() | N | N | N |
| canSetAttributeNS() | N | N | N |
| canSetAttributeNode() | N | N | N |
| canSetTextContent() | N | N | N |
| isElementDefined() | N | N | N |
| isElementDefinedNS() | N | N | N |
| Interface CharacterDataEditVAL | |||
| (General) | N | N | N |
| canAppendData() | N | N | N |
| canDeleteData() | N | N | N |
| canInsertData() | N | N | N |
| canReplaceData() | N | N | N |
| canSetData() | N | N | N |
| isWhitespaceOnly() | N | N | N |
DOM Level 2 Views defines a model for scripts to handle different views of a document.
| Feature | IE 6 | IE 7 | Firefox 2 |
|---|---|---|---|
| Interface AbstractView | |||
| (General) | I | I | Y |
| document | Y | Y | Y |
| Interface DocumentView | |||
| (General) | N | N | Y |
| defaultView | N | N | Y |