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 | 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 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.
| 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 |