Trisha Shetty (Editor)

Comparison of layout engines (Document Object Model)

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit
Standard
  
51.0.1 / January 26, 2017; 28 days ago (2017-01-26)

ESR
  
45.7.0 / January 24, 2017; 30 days ago (2017-01-24)

The following tables compare DOM compatibility and support for a number of layout engines. Please see the individual products' articles for further information. Unless otherwise specified in footnotes, comparisons are based on the stable versions without any add-ons, extensions or external programs.

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.

Engine nomenclature

Rather than the names of web browsers and HTML to PDF converters, the names of the underlying engines are used. Some of the software and online converters that use the various engines are listed below.

Values

Values indicate the level of support in the most recent version of the layout engine, or (if a version number is given) in the specified version. Version numbers without any other value indicate the version at which the layout engine first fully supported the feature.

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.

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

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.

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

WebKit HTML notes

  1. cellIndex — Always return zero.

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.

Trident Style (Style Sheets) notes

  1. href — Prior to version 8.0 relative URLs were not resolved to full URLs.
  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.

Tasman Style (CSS Fundamental) notes

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

Style (CSS Extended)

The interfaces found within this section are not mandatory.

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.

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

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.

Trident notes

  1. defaultView — Trident 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.

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.

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.

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

References

Comparison of layout engines (Document Object Model) Wikipedia