DOMImplementation - Web APIs 编辑
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
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 returnstrue
. 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 compatibility
BCD tables only load in the browser
See also
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论