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