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.
This interface has no specific property and doesn't inherit any.
No inherited method.
DOMImplementation.createDocument()
XMLDocument
.DOMImplementation.createDocumentType()
DocumentType
.DOMImplementation.createHTMLDocument()
Document
.DOMImplementation.hasFeature()
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.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. | Recommendation | 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. | Recommendation | Added the createDocument() and createDocumentType() methods. |
Document Object Model (DOM) Level 1 Specification The definition of 'DOMImplementation' in that specification. | Recommendation | Initial definition. |
Feature | Chrome | Edge | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|---|
Basic support | 1.0 | (Yes) | 1.0 (1.7 or earlier) | 6.0 | (Yes) | (Yes) |
createHTMLDocument() | (Yes) | (Yes) | 4.0 (2.0) | 9.0 | (Yes) | (Yes) |
createDocument() | (Yes) | (Yes) | 1.0 (1.7 or earlier) | 9.0 | (Yes) | (Yes) |
hasFeature() | (Yes) | (Yes) | 1.0 (1.7 or earlier) [1] | 6.0 | (Yes) | (Yes) |
createDocumentType() | (Yes) | (Yes) | 1.0 (1.7 or earlier) | 9.0 | (Yes) | (Yes) |
Feature | Android | Edge | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|
Basic support | (Yes) | (Yes) | 1.0 (1.0) | (Yes) | (Yes) | (Yes) |
createHTMLDocument() | (Yes) | (Yes) | 4.0 (2.0) | (Yes) | (Yes) | (Yes) |
createDocument() | (Yes) | (Yes) | 1.0 (1.0) | (Yes) | (Yes) | (Yes) |
hasFeature() | (Yes) | (Yes) | 1.0 (1.0) | (Yes) | (Yes) | (Yes) |
createDocumentType() | (Yes) | (Yes) | 1.0 (1.0) | (Yes) | (Yes) | (Yes) |
[1] Since Gecko 19, hasFeature()
mostly returns true
.
© 2005–2017 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