Comparison of JavaScript engines (DOM support)

Last updated

The following tables compare Document Object Model (DOM) compatibility and support for a number of JavaScript engines used in web browsers.

Contents

For features that are fully supported (based on DOM Level 2 or DOM Level 3 modules that are under W3C Recommendation), an exact version number is given if it is certain that the feature was added in such version. DOM Level 0 and DOM Level 3 modules that are still under development are not included.

Explanation of tables

See List of ECMAScript engines for a full list.

Values

These indicate the level of support for the given item in each engine. By default, the most recent version of the engine is implied. However, a specific version number can be listed; when this indicates full support, it's the initial version of the engine fully supporting the item.

Legend
ValueMeaning
YesFully supported
NoHas never been supported
PartialOnly some values are supported
IncorrectNot implemented correctly in all cases
ExperimentalMay be incomplete or buggy
Nightly build Currently in development; full support is expected
DependsOnly supported for the specified conditions
DroppedNo longer supported

General overview

MSHTML Tasman Gecko WebKit KHTML Presto
DOM16.0Yes1.085Yes1.0
DOM2MostlyPartialMostlyPartialMostlyMostly
DOM3NoNoPartialPartialPartialPartial

Core (Fundamental)

The interfaces within this section are considered fundamental, and must be fully implemented by all conforming implementations of the DOM, including all HTML DOM implementations.

MSHTML Tasman Gecko WebKit KHTML Presto
Exception DOMException
DOM1code5.0 [t 1]  ?1.0 ? ?1.0
Interface DOMStringList
DOM3length6.0 [t 2] No1.6No ?2.0
contains() ?
item() ?
Interface NameList
DOM3lengthNoNo1.6NoNoNo
getName()
getNamespaceURI()
contains()
containsNS()
Interface DOMImplementationList
DOM3lengthNoNoNoNoNoNo
item()
Interface DOMImplementationSource
DOM3getDOMImplementation()NoNoNoNoNoNo
getDOMImplementationList()
Interface DOMImplementation
DOM1hasFeature()6.0 ?1.0Yes ?1.0
DOM2createDocumentType()9.0 [t 3] No ?1.0
createDocument() ?
DOM3getFeature()NoNoNo ?1.0
Interface DocumentFragment
DOM1(no properties)6.0No1.0 ? ?1.0
Interface Document
DOM1doctype 9.0 YesPartialYes ?1.0
createElement()4.01.0 ?
createTextNode()5.0 ?
createAttribute()6.0 ?
documentElement5.0 ?
getElementsByTagName() ?
implementation6.0 ?
createDocumentFragment()No ?
createComment() ?
createCDATASection()9.0 [t 3]  ?
createProcessingInstruction() ?1.7 ?
createEntityReference()No ?No  ?No
DOM2importNode()9.0 [t 3] No1.0Yes ?1.0
createElementNS() ?
createAttributeNS() ?
getElementsByTagNameNS() ?
getElementById() 8.0 Yes ? 2.1
DOM3adoptNode()9.0 [t 3] No1.7Yes ?2.0
inputEncodingNo ?No
xmlEncoding ?
xmlStandalone ?
xmlVersion ?
domConfigNoNo ?
strictErrorChecking1.7 ?
documentURI ?
normalizeDocument() ?
renameNode() ?
Interface Node
DOM1nodeName5.0Yes1.0Yes ?1.0
nodeValue ?
nodeType ?
parentNode ?
childNodes ?
firstChild ?
lastChild ?
previousSibling ?
nextSibling ?
attributes ?
cloneNode() ?
insertBefore() Partial  ?
replaceChild() ?
removeChild() ?
appendChild() ?
ownerDocument6.01.9 ?
hasChildNodes()1.0 ?
DOM2namespaceURI5.0Yes1.0Yes ?1.0
prefix ?
localName ?
isSupported()9.0 [t 3]  ?
hasAttributes() ?
DOM3isSameNode() 9.0 No1.8Yes ?2.1
compareDocumentPosition()9.0 [t 3] 1.74.2.4
baseURINo ?Yes
textContent9.0 [t 3]  ?2.0
lookupPrefix() ?
isDefaultNamespace() ?
lookupNamespaceURI() ?
getFeature()No ?
setUserData() ?No
getUserData() ?
isEqualNode()9.0 [t 3] 1.9 ?2.7
Interface NodeList
DOM1length5.0Yes1.0Yes ?1.0
item() ?
Interface NamedNodeMap
DOM1length5.0Yes1.0Yes ?1.0
getNamedItem() ?
setNamedItem() ?
removeNamedItem() ?
item() ?
DOM2getNamedItemNS()9.0 [t 3] No1.0Yes ?1.0
setNamedItemNS() ?
removeNamedItemNS() ?
Interface CharacterData
DOM1data4.0Yes1.0Yes ?1.0
length ?
substringData() ?
appendData() ?
insertData() ?
deleteData() ?
replaceData() ?
Interface Attr
DOM1name6.0 ?1.0YesYes1.0
value ?
specified Incorrect Incorrect 1.9.1 Yes Yes
DOM2ownerElement9.0 [t 3]  ?1.0YesYes1.0
DOM3schemaTypeInfoNoNoNoNo ?No
isId1.9No
Interface Element
DOM1tagName4.0Yes1.0YesYes1.0
getElementsByTagName()
getAttribute() 8.0
setAttribute()
removeAttribute()
getAttributeNode()6.0
setAttributeNode()9.0 [t 3]
removeAttributeNode()
normalize()No ?
DOM2getAttributeNS()9.0 [t 3] Yes1.0Yes ?1.0
setAttributeNS() ?
removeAttributeNS() ?
getAttributeNodeNS() ?
setAttributeNodeNS() ?
getElementsByTagNameNS()No ?
hasAttribute()Yes ?
hasAttributeNS() ?
DOM3schemaTypeInfoNoNoNoNo ?No
setIdAttribute() ?
setIdAttributeNS() ?
setIdAttributeNode() ?
Interface Text
DOM1splitText()9.0 [t 3] Yes1.0Yes ?1.0
DOM3isElementContentWhitespaceNoNo1.9.1No ?Yes
wholeText9.0 [t 3]  ?2.1
replaceWholeText() ?
Interface Comment
DOM1(no properties)6.0No1.0Yes ?1.0
Interface TypeInfo
DOM3typeNameNoNoNoNoNoNo
typeNamespace
isDerivedFrom()
Interface UserDataHandler
DOM3handle()NoNoNoNoNoNo
Interface DOMError
DOM3severityNoNoNoNoNo2.0
message
type
location
relatedData
relatedExceptionNo
Interface DOMErrorHandler
DOM3handleError()NoNoNoNoNo2.0
Interface DOMLocator
DOM3lineNumberNoNoNoNoNo2.0
columnNumber
byteOffset
utf16Offset
relatedNode
uri
Interface DOMConfiguration
DOM3parameterNamesNoNoNoNo ?2.0
setParameter() ?
getParameter() ?
canSetParameter() ?

MSHTML Core (Fundamental) notes

  1. doctype Prior to version 9.0, returns true when checked but always contains null.
  2. getElementById() Prior to version 8.0 returned elements with name attribute set to value being found, not only id. [t 4]
  3. getAttribute(), setAttribute(), removeAttribute() prior to version 8.0 returned, set, or removed, respectively, the corresponding DOM property instead of the string value of the attribute.
  4. AttributeNode.specified Does not set specified to true if ownerElement is null.
  5. Node.isSameNode Prior to version 9.0, only supported for XML documents.

Tasman Core (Fundamental) notes

  1. AttributeNode.specified Does not set specified to true if ownerElement is null.

Gecko Core (Fundamental) notes

  1. insertBefore(), replaceChild(), removeChild(), appendChild() Fails on Attr nodes. [g 1] appendChild does not work as expected for DocumentFragment nodes prior to 1.8.
  2. AttributeNode.specified Prior to 1.9.1 does not set specified to true if ownerElement is null. Does not create Attribute Nodes for default values specified in the DTD.

Presto Core (Fundamental) notes

  1. getElementById() Versions prior to Opera 9.50 returns elements with name attribute set to value being found, not only id. [p 1]
  2. URI attribute value In versions prior to Opera 9, all URI attribute values are resolved to full URI. Hence the value from getAttribute() and getAttributeNode() could be wrong if relative URIs are used.
  3. Attributes that are not supported in the browser engine are still parsed and available through DOM. E.g. char and charoff are available under .ch and .chOff.
  4. In Opera 8.54 methods DOMImplementation.createDocument and DOMDocument.createElementNS both fail to accept any non-empty namespace URI. They work in Opera 9 Beta 2 and they may also have worked before (somebody with Opera 8, please check.) The symptom is that the namespaceURI property is null/empty and serialization gives wrong result.

WebKit Core (Fundamental) notes

  1. AttributeNode.specified Does not create Attribute Nodes for default values specified in the DTD.

KHTML Core (Fundamental) notes

  1. AttributeNode.specified Does not create Attribute Nodes for default values specified in the DTD.

Core (Extended)

The interfaces defined here form part of the DOM Core specification, but objects that expose these interfaces will never be encountered in a DOM implementation that deals only with HTML.

MSHTML Tasman Gecko WebKit KHTML Presto
Interface CDATASection
DOM1(no properties)NoNo1.0Yes ?2.0
Interface DocumentType
DOM1nameNoNo1.0Yes ?1.0
entitiesNo [g 2]  ?
notations ?
DOM2publicIdNoNo1.0Yes ?1.0
systemId ?
internalSubset ?
Interface Notation
DOM1publicIdNoNo1.0Yes ?2.0
systemId ?
Interface Entity
DOM1publicIdNoNo1.0Yes ?No
systemId ?
notationName ?
DOM3inputEncodingNoNoNoNo ?No
xmlEncoding ?
xmlVersion ?
Interface EntityReference
DOM1(no properties)NoNo1.0Yes ?No
Interface ProcessingInstruction
DOM1targetNoNo1.0Yes ?2.0
data ?

HTML

The interfaces found within this section are not mandatory. This section extends the DOM Core API to describe objects and methods specific to HTML documents, and XHTML documents. In general, the functionality needed to manipulate hierarchical document structures, elements, and attributes will be found in the core section; functionality that depends on the specific elements defined in HTML will be found in this section. Elements deprecated since HTML 4.01 are not listed. Some elements and attributes listed here are deprecated in XHTML 1.1. For example, presentation attributes, image maps, frames and targets.

MSHTML Tasman Gecko WebKit KHTML Presto
Interface HTMLCollection
DOM1length7.0 ?1.0 ? ?1.0
item() ? ? ?
namedItem() ? ? ?
Interface HTMLOptionsCollection
DOM2length ? ?1.0 ? ?2.0
item() ? ? ? ?
namedItem() ? ? ? ?
Interface HTMLDocument
DOM1domain4.0Yes1.0Yes ?1.0
URL ?
body ?
images ?
applets ?
title3.0 ?
referrer ?
links ?
forms ?
anchors ?
cookie ?
open() ?
close() ?
write() ?
writeln() ?
getElementsByName()Yes ? ?
Interface HTMLElement
DOM1id4.0Yes1.0 ? ?1.0
title ? ?
lang ? ?
className ? ?
dir5.0 ? ?
Interface HTMLHtmlElement
DOM1version6.0 ?1.0 ? ?2.0
Interface HTMLHeadElement
DOM1profile 8.0  ?1.0 ? ?1.0
Interface HTMLLinkElement
DOM1disabled4.0Yes1.0 ? ?1.0
charset ? ?
href 8.0  ? ?
hreflang4.0 ? ?
media ? ?
rel ? ?
rev ? ?
target ? ?
type ? ?
Interface HTMLTitleElement
DOM1text4.0Yes1.0 ? ?1.0
Interface HTMLMetaElement
DOM1content4.0Yes1.0 ? ?1.0
httpEquiv ? ?
name ? ?
scheme6.0 ? ? ?2.0
Interface HTMLBaseElement
DOM1href 8.0 Yes1.0 ? ?2.0
target4.0 ? ?
Interface HTMLStyleElement
DOM2disabled ? ?1.0 ? ?1.0
media4.0Yes ? ?
type ? ?
Interface HTMLBodyElement
DOM1aLink4.0Yes1.0 ? ?1.0
background 8.0  ? ?
bgColor4.0 ? ?
link ? ?
text ? ?
vLink ? ?
Interface HTMLFormElement
DOM1action 8.0 Yes1.9 ? ?1.0
acceptEncoding ? ?1.0 ? ?
elements3.0Yes ? ?
length ? ?
name ? ?
enctype4.0 ? ?
method3.0 ? ?
target ? ?
submit() ? ?
reset()4.0 ? ?
Interface HTMLSelectElement
DOM1selectedIndex3.0Yes1.0 ? ?1.0
length ? ?
options ? ?
name ? ?
size4.0 ? ?
type ? ?
value ? ?
disabled5.0 ? ?
multiple ? ?
form ? ? ? ?
tabIndex ? ? ? ?
add() ? ? ? ?
remove() ? ? ? ?
blur()3.0Yes ? ?
focus() ? ?
Interface HTMLOptGroupElement
DOM1disabled ? ?1.0 ? ?2.0
labelNoYes ? ?
Interface HTMLOptionElement
DOM1form4.0Yes1.0 ? ?1.0
defaultSelected ? ?
text ? ?
index ? ? ? ?
disabled ? ? ? ?
label6.0Yes ? ?2.0
selected4.0 ? ?1.0
value ? ?
Interface HTMLInputElement
DOM1defaultValue3.0Yes1.0 ? ?1.0
defaultChecked ? ?
form ? ?
accept ? ? ? ?
accesskey ? ? ? ?
align ? ? ? ?
alt ? ? ? ?
checked3.0Yes ? ?
disabled5.0 ? ?
maxLength4.0 ? ?2.0
name3.0 ? ?1.0
readOnly4.0 ? ?
size ? ?
src1.9 ? ?
tabIndex ? ?1.0 ? ?
type4.0Yes ? ?
useMap ? ? ? ?
value3.0Yes ? ?
blur() ? ?
focus() ? ?
select() ? ?
click() ? ?
Interface HTMLTextAreaElement
DOM1defaultValue3.0Yes1.0 ? ?1.0
form ? ?
accesskey ? ? ? ?
cols4.0Yes ? ?
disabled5.0 ? ?
name3.0 ? ?
readOnly4.0 ? ?
rows ? ?
tabIndex ? ? ? ?
type4.0Yes ? ?
value3.0 ? ?
blur() ? ?
focus() ? ?
select() ? ?
Interface HTMLButtonElement
DOM1form3.0Yes1.0 ? ?1.0
accesskey ? ? ? ?
disabled5.0Yes ? ?
name3.0 ? ?
tabIndex ? ? ? ?
type3.0Yes ? ?
value ? ?
Interface HTMLLabelElement
DOM1form6.0Yes1.0 ? ?1.0
accesskey5.0 ? ?
htmlFor4.0 ? ?
Interface HTMLFieldSetElement
DOM1form5.0Yes1.0 ? ?1.0
Interface HTMLLegendElement
DOM1form5.0Yes1.0 ? ?1.0
accesskey ? ? ? ?
align5.0Yes ? ?
Interface HTMLUListElement
DOM1compact4.0Yes1.0 ? ?1.0
type ? ?
Interface HTMLOListElement
DOM1compact4.0Yes1.0 ? ?1.0
start ? ?
type ? ?
Interface HTMLDListElement
DOM1compact4.0Yes1.0 ? ?1.0
Interface HTMLLIElement
DOM1type4.0Yes1.0 ? ?1.0
value ? ?
Interface HTMLDivElement
DOM1align ? ?1.0 ? ?1.0
Interface HTMLParagraphElement
DOM1align ? ?1.0 ? ?1.0
Interface HTMLHeadingElement
DOM1align4.0Yes1.0 ? ?1.0
Interface HTMLQuoteElement
DOM1cite 8.0 Yes1.0 ? ?1.0
Interface HTMLPreElement
DOM1width ? ?1.0 ? ?1.0
Interface HTMLBRElement
DOM1clear4.0Yes1.0 ? ?1.0
Interface HTMLHRElement
DOM1align4.0Yes1.0 ? ?1.0
noShade ? ?
size ? ?
width ? ?
Interface HTMLModElement
DOM1cite 8.0  ?1.9 ? ?1.0
dateTime ? ?1.0 ? ?
Interface HTMLAnchorElement
DOM1accesskey ? ?1.0 ? ?1.0
charset6.0Yes ? ?
coords ? ?
href3.0 ? ?
hreflang6.0 ? ?
name4.0 ? ?
rel ? ?
rev ? ?
shape6.0 ? ?
tabIndex ? ? ? ?
target3.0Yes ? ?
type6.0 ? ?
blur() ? ? ? ?
focus() ? ? ? ?
Interface HTMLImageElement
DOM1name4.0Yes1.0 ? ?1.0
align ? ?
alt ? ?
border ? ?
height ? ?
hspace ? ?
isMap ? ?
longDesc 8.0  ? ? ?2.0
src4.0Yes ? ?1.0
useMap ? ?
vspace ? ?
width ? ?
Interface HTMLObjectElement
DOM1form ? ?1.0 ? ?1.0
code4.0Yes ? ?
align ? ?
archive ? ? ? ?
border ? ? ? ?
codeBase 8.0 Yes ? ?
codeType4.0 ? ?
data 8.0  ? ?
declare ? ? ? ?2.0
height4.0Yes ? ?1.0
hspace ? ?
name ? ?
standby ? ? ? ?
tabIndex ? ? ? ?
type4.0Yes ? ?
useMap ? ? ? ?
vspace4.0Yes ? ?
width ? ?
DOM2contentDocumentNo ? ?2.0
Interface HTMLParamElement
DOM1name ? ?1.0 ? ?1.0
type ? ? ? ?
value ? ? ? ?
valueTypeNo ? ? ?
Interface HTMLMapElement
DOM1areas4.0Yes1.0 ? ?1.0
name ? ?
Interface HTMLAreaElement
DOM1accesskey ? ?1.0 ? ?1.0
alt4.0Yes ? ?
coords ? ?
hrefs ? ? ? ?
noHrefs ? ? ? ?
shape4.0Yes ? ?
tabIndex ? ? ? ?
target4.0Yes ? ?
Interface HTMLScriptElement
DOM1text4.001.0 ? ? 1.0
htmlFor (reserved for future use)Yes ? ?No
event (reserved for future use) ? ?2.0
charset ? ? ? ?1.0
defer4.0Yes ? ?
src 8.0  ? ?
type4.0 ? ?
target ? ? ? ?
Interface HTMLTableElement
DOM1caption4.0Yes1.0 ? ?1.0
tHead ? ?
tFoot ? ?
rows ? ?
tBodies ? ?
align ? ?
bgColor ? ?
border ? ?
cellPaddingNo ?
cellSpacing ? ?
frame ? ?
rulesNo ? ?
summary6.0 ? ?
width4.0Yes ? ?
createTHead() ? ?
deleteTHead() ? ?
createTFoot() ? ?
deleteTFoot() ? ?
createCaption() ? ?
deleteCaption() ? ?
insertRow() ? ?
deleteRow() ? ?
Interface HTMLTableCaptionElement
DOM1align5.0Yes1.0 ? ?1.0
Interface HTMLTableColElement
DOM1align4.0Yes1.0 ? ?1.0
ch6.0No ? ?2.0
chOff ? ?
span5.0Yes ? ?1.0
vAlign4.0 ? ?
width5.00 ? ?
Interface HTMLTableSectionElement
DOM1align4.0Yes1.0 ? ?1.0
ch6.0No ? ?2.0
chOff ? ?
vAlign4.0Yes ? ?1.0
rows ? ?
insertRow() ? ?
deleteRow() ? ?
Interface HTMLTableRowElement
DOM1rowIndex4.0Yes1.0 ? ?1.0
sectionRowIndex ? ?
cells ? ?
align ? ?
bgColor ? ?
ch6.0No ? ?2.0
chOff ? ?
vAlign4.0Yes ? ?1.0
insertCell() ? ?
deleteCell() ? ?
Interface HTMLTableCellElement
DOM1cellIndex4.0Yes1.0 Incorrect  ?1.0
abbr6.0 ? ?2.0
align4.0 ? ?1.0
axis6.0 ? ?
bgColor4.0 ? ?
ch6.0No ? ?2.0
chOff ? ?
colSpan4.0Yes ? ?1.0
headers6.0 ? ?
height4.0 ? ?
noWrap ? ?
rowSpan ? ?
scope ? ? ? ?
vAlign4.0Yes ? ?
width ? ?
Interface HTMLFrameSetElement
DOM1cols4.0Yes1.0 ? ?1.0
rows ? ?
Interface HTMLFrameElement
DOM1frameBorder4.0Yes1.0 ? ?1.0
longDesc 8.0  ? ?
marginHeight6.0 ? ?
marginWidth ? ?
name4.0 ? ?
noResize ? ?
scrolling ? ?
src 8.0  ? ?
DOM2contentDocumentNoYes1.0 ? ?1.0
Interface HTMLIFrameSetElement
DOM1align4.0Yes1.0 ? ?1.0
frameBorder ? ? ? ?
height4.0Yes ? ?
longDesc 8.0  ? ?
marginHeight4.0 ? ?
marginWidth ? ?
name ? ?
scrolling ? ?
src 8.0  ? ?
width4.0 ? ?
DOM2contentDocumentNo ? ?

MSHTML HTML notes

  1. profile, href, background, action, cite, longDesc, codebase, data, src Prior to version 8.0 relative URLs were not resolved to full URLs. [t 5]

WebKit HTML notes

  1. cellIndex Always return zero.[ citation needed ]

Presto HTML notes

  1. text Opera 8 and lower returned data at src, when it should return inline data instead.

Style (Style Sheets)

The interfaces found within this section are not mandatory. The interfaces in this section are base interfaces used to represent any type of style sheet.

MSHTML Tasman Gecko WebKit KHTML Presto
Interface StyleSheet
DOM2type6.0 ?1.0Yes ?2.0
disabled ? ?
ownerNodeNo ? ?
parentStyleSheet6.0 ? ?
href 8.0  ? ?
title6.0 ? ?
media Incorrect  ? ?
Interface StyleSheetList
DOM2length6.0 ?1.0Yes ?2.0
item() ? ?
Interface MediaList
DOM2mediaTextNo ?1.0Yes ?2.0
length ? ?
item() ? ?
deleteMedium() ? ?
appendMedium() ? ?
Interface LinkStyle
DOM2sheetNo ?1.0No ?2.0
Interface DocumentStyle
DOM2styleSheetsNo ?1.0No ?2.0

MSHTML Style (Style Sheets) notes

  1. href Prior to version 8.0 relative URLs were not resolved to full URLs. [t 5]
  2. media Returns string instead of MediaList.

Style (CSS Fundamental)

The interfaces within this section are considered fundamental CSS interfaces, and must be supported by all conforming implementations of the CSS module. These interfaces represent CSS style sheets specifically.

MSHTML Tasman Gecko WebKit KHTML Presto
Interface CSSStyleSheet
DOM2ownerRuleNo ?1.0 ? ?2.0
cssRulesYes1.3 ?
insertRule()NoNo ?
deleteRule() ?
Interface StyleSheetList
DOM2length6.0 ?1.0 ? ?2.0
item() ? ? ?
Interface CSSRuleList
DOM2lengthNo ?1.0 ? ?2.0
item() ? ? ?
Interface CSSRule
DOM2typeNo ?1.0 ? ?2.0
cssTextYes ? ?
parentStyleSheet1.3 ?
parentRule ? ? ?
Interface CSSStyleRule
DOM2selectorText6.0Yes1.01.3 ?2.0
styleNo ? ? ?
Interface CSSMediaRule
DOM2mediaNo ?1.0 ? ?2.0
cssRules ? ? ?
insertRule() ? ? ?
deleteRule() ? ? ?
Interface CSSFontFaceRule
DOM2styleNo ?1.9.1 [g 3]  ? ?2.0
Interface CSSPageRule
DOM2selectorTextNo ?No [g 4]  ? ?2.0
style ? ? ?
Interface CSSImportRule
DOM2hrefNoYes1.01.3 ?2.0
media ? ? ?
styleSheet ? ? ?
Interface CSSCharsetRule
DOM2encodingNo ?1.0 ? ?2.0
Interface CSSUnknownRule
DOM2(no properties)No ?No [g 5]  ? ?2.0
Interface CSSStyleDeclaration
DOM2cssTextNo ?1.0 ? ?2.0
length ? ? ?
parentRule ? ? ?
getPropertyValue()Yes1.3 ?1.0
getPropertyCSSValue() ?No [g 6]  ? ?2.0
removeProperty()No1.01.3 ?1.0
getPropertyPriority() Incorrect  ? ?2.0
setProperty()Yes1.3 ?1.0
item() ? ? ?2.0
Interface CSSValue
DOM2cssTextNo ?No [g 6]  ? ?No
cssValueType ? ? ?
Interface CSSPrimitiveValue
DOM2primitiveTypeNo ?No [g 7]  ? ?No
setFloatValue() ?No ? ?
getFloatValue() ? ? ?
setStringValue() ? ? ?
getStringValue() ? ? ?
getCounterValue() ? ? ?
getRectValue() ? ? ?
getRGBColorValue() ? ? ?
Interface CSSValueList
DOM2lengthNo ?No ? ?No
item() ? ? ?
Interface RGBColor
DOM2redNo ?No ? ?No
green ? ? ?
blue ? ? ?
Interface Rect
DOM2topNo ?No ? ?No
right ? ? ?
bottom ? ? ?
left ? ? ?
Interface Counter
DOM2identifierNo ?No ? ?No
listStyle ? ? ?
separator ? ? ?
Interface ViewCSS
DOM2getComputedStyle()NoNo1.0No ?1.0
Interface DocumentCSS
DOM2getOverrideStyle()No ?No [g 8]  ? ?No
Interface DOMImplementationCSS
DOM2createCSSStyleSheet()No ?No [g 9]  ? ?No
Interface ElementCSSInlineStyle
DOM2style6.0Yes1.01.3Yes1.0

Tasman Style (CSS Fundamental) notes

  1. getPropertyPriority() Returns !important instead of important.

Style (CSS Extended)

The interfaces found within this section are not mandatory.

MSHTML Tasman Gecko WebKit KHTML Presto
Interface CSS2Properties
DOM2Support this interface4.0Yes1.0 ? ?1.0
PropertiesPlease refer to Comparison of browser engines (CSS support) for the comparison of CSS properties.

Events

The interfaces found within this section are not mandatory. The first goal is the design of a generic event system which allows registration of event handlers, describes event flow through a tree structure, and provides basic contextual information for each event. The second goal of the event model is to provide a common subset of the current event systems used in DOM Level 0 browsers. See also DOM Events for details.

MSHTML Tasman Gecko WebKit KHTML Presto
Interface EventTarget
DOM2addEventListener()5.0 [t 6] No1.0YesYes1.0
removeEventListener()
dispatchEvent() ? ?
Interface EventListener
DOM2handleEvent() ? ? ? ? ?1.0
Interface Event
DOM2type4.0Yes1.0 ? ?1.0
targetNo 1.3 Incorrect  ?
currentTargetNo1.0 ? ?
eventPhase ? ?
bubbles ? ?
cancelable ? ?
timeStamp Yes  ? ?
stopPropagation()1.0 ? ?
preventDefault() ? ?
initEvent() ? ?
Exception EventException
DOM2codeNoNo1.0 ? ?1.0
Interface DocumentEvent
DOM2createEvent()NoNo1.0 ? ?1.0
Interface UIEvent
DOM2viewNoNoNo [g 10]  ? ?1.0
detail ? ?
initUIEvent() ? ?
Events for interface UIEvent
DOM2DOMFocusInNoNoNo [g 10]  ? ?1.0
DOMFocusOut ? ?
DOMActivate ? ?
Interface MouseEvent
DOM2screenX4.0Yes1.0Yes ?1.0
screenY ?
clientX Incorrect  ?
clientY Incorrect  ?
ctrlKeyYes ?
shiftKey ?
altKey ?
metaKeyNoNo ?
button Incorrect Incorrect Incorrect  ? 1.0
relatedTargetNoNoYes ?1.0
initMouseEvent() ? ? ? ?
Events for interface MouseEvent
DOM2click4.0Yes1.0 ? ?1.0
mousedown ? ?
mouseup ? ?
mouseover ? ?
mousemove ? ?
mouseout ? ?
Interface MutationEvent
DOM2relatedNodeNoNo1.0 ? ?1.0
prevValue ? ?
newValue ? ?
attrName ? ?
attrChange ? ?
initMutationEvent ? ?
Events for interface MutationEvent
DOM2DOMSubtreeModified5.0 [t 7] No1.9Yes Partial No
DOMNodeInserted1.0No1.0
DOMNodeRemoved
DOMNodeRemovedFromDocumentNo [g 11]
DOMNodeInsertedIntoDocumentYes
DOMAttrModified1.0NoNo
DOMCharacterDataModifiedYes
Events for HTML
DOM2load4.0Yes1.0 ? ?2.0
unload ? ?
abort ? ?No
error ? ?2.0
select ? ?
change ? ?
submit ? ?
reset ? ?
focus ? ?
blur ? ?
resize ? ?
scroll ? ?

MSHTML Events notes

  1. button Does not use W3C values.

Tasman Events notes

  1. button Does not use W3C values.

Gecko Events notes

  1. target Return text node, if any, of the target element node prior to 1.3.
  2. timeStamp Is relative to the system start instead of to 1 January 1970. [g 12]

WebKit Events notes

  1. target Return text node, if any, of the target element node (fixed in v73, but reverted in v85).
  2. clientX, clientY Treated as pageX and pageY.
  3. button Does not use W3C values.

KHTML Events notes

  1. DOMSubtreeModified Not triggered when an element is removed from the subtree.

Presto Events notes

  1. button Does not use W3C values prior to 8.0.

Views

The interfaces found within this section are not mandatory. A document may have one or more "views" associated with it, e.g., a computed view on a document after applying a CSS stylesheet, or multiple presentations (e.g. HTML frame) of the same document in a client. That is, a view is some alternate representation of, or a presentation of, and associated with, a source document.

MSHTML Tasman Gecko WebKit KHTML Presto
Interface AbstractView
DOM2document6.0 ?1.0 ? ?1.0
Interface DocumentView
DOM2defaultView No  ?1.0 ? ?1.0

MSHTML notes

  1. defaultView MSHTML does not support the defaultView property for documents, but it supports another property with the same meaning which is parentWindow.

Traversal

The interfaces found within this section are not mandatory. Its interfaces provide easy-to-use, robust, selective traversal of a document's contents.

MSHTML Tasman Gecko WebKit KHTML Presto
Interface NodeIterator
DOM2rootNo ?1.9.1 ? ?1.0
whatToShow ? ? ?
filter ? ? ?
expandEntityReferences ? ? ?
nextNode()Yes ? ? ?2.0
previousNode() ? ? ?
detach()No ? ? ?1.0
Interface NodeFilter
DOM2acceptNode()No ?1.0 ? ?1.0
Interface TreeWalker
DOM2rootNo ?1.0 ? ?1.0
whatToShow ? ? ?
filter ? ? ?
expandEntityReferences ? ? ?
currentNode ? ? ?
parentNode() ? ? ?
firstChild() ? ? ?
lastChild() ? ? ?
previousSibling() ? ? ?
nextSibling() ? ? ?
previousNode() ? ? ?
nextNode() ? ? ?
Interface DocumentTraversal
DOM2createNodeIterator()No ?1.9.1 ? ?1.0
createTreeWalker() ?1.0 ? ?

Range

The interfaces found within this section are not mandatory. It includes methods for creating and moving a Range and methods for manipulating content with Ranges.

MSHTML Tasman Gecko WebKit KHTML Presto
Interface Range
DOM2startContainerNo ?1.0Yes ?1.0
startOffset ? ?
endContainer ? ?
endOffset ? ?
collapsed ? ?
commonAncestorContainer ? ?
setStart() ? ?
setEnd() ? ?
setStartBefore() ? ?
setStartAfter() ? ?
setEndBefore() ? ?
setEndAfter() ? ?
collapse() ? ?
selectNode() ? ?
selectNodeContents() ? ?
compareBoundaryPoints() ? ?
deleteContents() ? ?
extractContents() ? ?
cloneContents() ? ?
insertNode() ? ?
surroundContents() ? ?
cloneRange() ? ?
toString() ? ?
detach() ? ?
Interface DocumentRange
DOM2createRange()No ?1.0No ?1.0
Exception RangeException
DOM2codeNo ?1.0Yes ?1.0

Load and Save

The interfaces within this section are considered fundamental, and must be fully implemented by all conforming implementations of the DOM Load and Save module.

MSHTML Tasman Gecko WebKit KHTML Presto
Exception LSException
DOM3codeNoNoNo [g 13] NoNo1.0
Interface DOMImplementationLS
DOM3createLSParser()NoNoNoNoNo1.0
createLSSerializer()
createLSInput()
createLSOutput()
Interface LSParser
DOM3domConfigNoNoNoNoNo1.0
filter
async
busy
parse()
parseURI()
parseWithContext()
abort()
Interface LSInput
DOM3characterStreamNoNoNoNoNo1.0
byteStream
stringData
systemId
publicId
baseURI
encoding
certifiedText
Interface LSResourceResolver
DOM3resolveResource()NoNoNoNoNoNo
Interface LSParserFilter
DOM3whatToShowNoNoNoNoNoNo
startElement()2.0
acceptNode()
Interface LSProgressEvent
DOM3inputNoNoNoNoNoNo
position
totalSize
Interface LSLoadEvent
DOM3newDocumentNoNoNoNoNo2.0
inputNo
Interface LSSerializer
DOM3domConfigNoNoNoNoNo1.0
newLine
filter
write()
writeToURI()
writeToString()
Interface LSOutput
DOM3characterStreamNoNoNoNoNo1.0
byteStream
systemId
encoding
Interface LSSerializerFilter
DOM3whatToShowNoNoNoNoNoNo

Validation

The interfaces found within this section are not mandatory. This module provides interfaces to guide construction and editing of XML documents. Examples of such guided editing are queries like those that combine questions like "what does the schema allow me to insert/delete here" and "if I insert/delete here, will the document still be valid."

MSHTML Tasman Gecko WebKit KHTML Presto
Exception ExceptionVAL
DOM3codeNoNoNoNoNoNo
Interface DocumentEditVAL
DOM3continuousValidityCheckingNoNoNoNoNoNo
domConfig
getDefinedElements()
validateDocument()
Interface NodeEditVAL
DOM3defaultValueNoNoNoNoNoNo
enumeratedValues
canInsertBefore()
canRemoveChild()
canReplaceChild()
canAppendChild()
nodeValidity()
Interface ElementEditVAL
DOM3allowedChildrenNoNoNoNoNoNo
allowedFirstChildren
allowedParents
allowedNextSiblings
allowedPreviousSiblings
allowedAttributes
requiredAttributes
contentType
canSetTextContent
canSetAttribute
canSetAttributeNode
canSetAttributeNS
canRemoveAttribute
canRemoveAttributeNS
canRemoveAttributeNode
isElementDefined
isElementDefinedNS
Interface CharacterDataEditVAL
DOM3isWhitespaceOnly()NoNoNoNoNoNo
canSetData()
canAppendData()
canReplaceData()
canInsertData()
canDeleteData()

Related Research Articles

A document type definition (DTD) is a set of markup declarations that define a document type for an SGML-family markup language.

<span class="mw-page-title-main">Document Object Model</span> Convention for representing and interacting with objects in HTML, XHTML and XML documents

The Document Object Model (DOM) is a cross-platform and language-independent interface that treats an XML or HTML document as a tree structure wherein each node is an object representing a part of the document. The DOM represents a document with a logical tree. Each branch of the tree ends in a node, and each node contains objects. DOM methods allow programmatic access to the tree; with them one can change the structure, style or content of a document. Nodes can have event handlers attached to them. Once an event is triggered, the event handlers get executed.

Dynamic HTML, or DHTML, is a term which was used by some browser vendors to describe the combination of HTML, style sheets and client-side scripts that enabled creation of interactive and animated documents. The application of DHTML was introduced by Microsoft with the release of Internet Explorer 4 in 1997.

<span class="mw-page-title-main">HTML</span> Hypertext Markup Language

The HyperText Markup Language or HTML is the standard markup language for documents designed to be displayed in a web browser. It can be assisted by technologies such as Cascading Style Sheets (CSS) and scripting languages such as JavaScript.

An HTML element is a type of HTML document component, one of several types of HTML nodes. The first used version of HTML was written by Tim Berners-Lee in 1993 and there have since been many versions of HTML. The most commonly used version is HTML 4.01, which became official standard in December 1999. An HTML document is composed of a tree of simple HTML nodes, such as text nodes, and HTML elements, which add semantics and formatting to parts of document. Each element can have HTML attributes specified. Elements can also have content, including other elements and text.

<span class="mw-page-title-main">Node (computer science)</span> Basic unit of a data structure

A node is a basic unit of a data structure, such as a linked list or tree data structure. Nodes contain data and also may link to other nodes. Links between nodes are often implemented by pointers. It is a computer connected to the internet that participates in the peer to peer network.

DOM Events are a signal that something has occurred, or is occurring, and can be triggered by user interactions or by the browser. Client-side scripting languages like JavaScript, JScript, ECMAScript, VBScript, and Java can register various event handlers or listeners on the element nodes inside a DOM tree, such as in HTML, XHTML, XUL, and SVG documents.

<span class="mw-page-title-main">XMLHttpRequest</span> Web API to transfer data between a web browser and a web server

XMLHttpRequest (XHR) is an API in the form of an object whose methods transfer data between a web browser and a web server. The object is provided by the browser's JavaScript environment. Particularly, retrieval of data from XHR for the purpose of continually modifying a loaded web page is the underlying concept of Ajax design. Despite the name, XHR can be used with protocols other than HTTP and data can be in the form of not only XML, but also JSON, HTML or plain text.

This article compares Cascading Style Sheets (CSS) support for several browser engines.

This article compares HTML support by several browser engines.

In computing, quirks mode is a technique used by some web browsers for the sake of maintaining backward compatibility with web pages designed for old web browsers instead of strictly complying with W3C and IETF standards in standards mode.

The canvas element is part of HTML5 and allows for dynamic, scriptable rendering of 2D shapes and bitmap images. It is a low level, procedural model that updates a bitmap. HTML5 Canvas also helps in making 2D games.

The following tables compare SVG compatibility and support for a number of browser engines.

Extensible HyperText Markup Language (XHTML) is part of the family of XML markup languages. It mirrors or extends versions of the widely used HyperText Markup Language (HTML), the language in which Web pages are formulated.

XPath is an expression language designed to support the query or transformation of XML documents. It was defined by the World Wide Web Consortium (W3C) and can be used to compute values from the content of an XML document. Support for XPath exists in applications that support XML, such as web browsers, and many programming languages.

Animation of Scalable Vector Graphics, an open XML-based standard vector graphics format is possible through various means:

<span class="mw-page-title-main">CSS</span> Style sheet language

Cascading Style Sheets (CSS) is a style sheet language used for describing the presentation of a document written in a markup language such as HTML or XML. CSS is a cornerstone technology of the World Wide Web, alongside HTML and JavaScript.

This article compares web typography support for several browser engines.

<span class="mw-page-title-main">CSS box model</span> Model used for styling websites

In web development, the CSS box model refers to how HTML elements are modeled in browser engines and how the dimensions of those HTML elements are derived from CSS properties. It is a fundamental concept for the composition of HTML webpages. The guidelines of the box model are described by web standards World Wide Web Consortium (W3C) specifically the CSS Working Group. For much of the late-1990s and early 2000s there had been non-standard compliant implementations of the box model in mainstream browsers. With the advent of CSS2 in 1998, which introduced the box-sizing property, the problem had mostly been resolved.

Content Security Policy (CSP) is a computer security standard introduced to prevent cross-site scripting (XSS), clickjacking and other code injection attacks resulting from execution of malicious content in the trusted web page context. It is a Candidate Recommendation of the W3C working group on Web Application Security, widely supported by modern web browsers. CSP provides a standard method for website owners to declare approved origins of content that browsers should be allowed to load on that website—covered types are JavaScript, CSS, HTML frames, web workers, fonts, images, embeddable objects such as Java applets, ActiveX, audio and video files, and other HTML5 features.

References

MSHTML references

  1. DOMException object (Internet Explorer), Microsoft
  2. DOMStringList object (Internet Explorer), Microsoft
  3. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 Internet Explorer Platform Preview Guide for Developers, Microsoft
  4. "getElementById Method", HTML and DHTML Reference, Microsoft, retrieved 2009-03-05
  5. 1 2 Leithead, Travis, HTML and DOM Standards Compliance in IE8 Beta 1, Microsoft
  6. "Comparing Event Models". Archived from the original on 2010-07-22. Retrieved 2010-07-14.
  7. Internet Explorer 9 Guide for Developers - DOM L2 and L3 Events, Microsoft

Gecko references

Webkit references

    Presto references

    Other references