DOMImplementation

The DOMImplementation interface represents 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 value 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

Browser compatibility

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari WebView Android Chrome Android Firefox for Android Opera Android Safari on IOS Samsung Internet
DOMImplementation
1
12
1
6
≤12.1
1
1
18
4
≤12.1
1
1.0
createDocument
1
12
1
9
≤12.1
1
1
18
4
≤12.1
1
1.0
createDocumentType
1
12
1
9
≤12.1
1
1
18
4
≤12.1
1
1.0
createHTMLDocument
1
12
4
9
The title parameter is required, but can be empty string.
≤12.1
1
1
18
4
≤12.1
1
1.0
hasFeature
1
12
1
Since Firefox 19, hasFeature() mostly returns true.
6
≤12.1
1
1
18
4
≤12.1
1
1.0

See also

© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation