W3cubDocs

/DOM

DOMImplementation

The DOMImplementation interface represent an object providing methods which are not dependent on any particular document. Such an object is returned by the Document.implementation property.

Property

This interface has no specific property and doesn't inherit any.

Methods

No inherited method.

DOMImplementation.createDocument()
Creates and returns an XMLDocument.
DOMImplementation.createDocumentType()
Creates and returns a DocumentType.
DOMImplementation.createHTMLDocument()
Creates and returns an HTML Document.
DOMImplementation.hasFeature()
Returns a Boolean indicating if a given feature is supported or not. This function is unreliable and kept for compatibility purpose alone: except for SVG-related queries, it always returns true. Old browsers are very inconsistent in their behavior.

Specifications

Specification Status Comment
DOM
The definition of 'DOMImplementation' in that specification.
Living Standard Removed the getFeature() method.
Added the createHTMLDocument() method.
Modified the return type of createDocument() from Document to XMLDocument.
Document Object Model (DOM) Level 3 Core Specification
The definition of 'DOMImplementation' in that specification.
Obsolete Added the getFeature() method (never implemented by any user agent).
Document Object Model (DOM) Level 2 Core Specification
The definition of 'DOMImplementation' in that specification.
Obsolete Added the createDocument() and createDocumentType() methods.
Document Object Model (DOM) Level 1 Specification
The definition of 'DOMImplementation' in that specification.
Obsolete Initial definition.

Browser compatibilityUpdate compatibility data on GitHub

Desktop
Chrome Edge Firefox Internet Explorer Opera Safari
Basic support Yes Yes Yes 6 Yes Yes
createDocument Yes Yes Yes 6 Yes Yes
createDocumentType Yes Yes Yes 6 Yes Yes
createHTMLDocument Yes Yes 4 6
6
The title parameter is required, but can be empty string.
Yes Yes
hasFeature Yes Yes Yes
Yes
Since Firefox 19, hasFeature() mostly returns true.
6 Yes Yes
Mobile
Android webview Chrome for Android Edge Mobile Firefox for Android Opera for Android iOS Safari Samsung Internet
Basic support Yes Yes Yes Yes Yes Yes ?
createDocument Yes Yes Yes Yes Yes Yes ?
createDocumentType Yes Yes Yes Yes Yes Yes ?
createHTMLDocument Yes Yes Yes Yes Yes Yes ?
hasFeature Yes Yes Yes Yes Yes Yes ?

See also

© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation