这篇翻译不完整。请帮忙从英语翻译这篇文章

DOMImplementation 接口代表了一个对象,这个对象提供了不依赖于任何document的方法。这个对象可以通过Document.implementation属性获得

Property

这个接口没有特定的属性,并且也没有继承到任何属性。

Methods

没有继承的方法

DOMImplementation.createDocument()
创建并返回一个 XMLDocument对象.
DOMImplementation.createDocumentType()
创建并返回一个 DocumentType对象.
DOMImplementation.createHTMLDocument()
创建并返回一个 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
DOMImplementation
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
DOMImplementation
Obsolete Added the getFeature() method (never implemented by any user agent).
Document Object Model (DOM) Level 2 Core Specification
DOMImplementation
Obsolete Added the createDocument() and createDocumentType() methods.
Document Object Model (DOM) Level 1 Specification
DOMImplementation
Obsolete Initial definition.

Browser compatibility

We're converting our compatibility data into a machine-readable JSON format. This compatibility table still uses the old format, because we haven't yet converted the data it contains. Find out how you can help!

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support 1.0 1.0 (1.7 or earlier) 6.0 (Yes) (Yes)
createHTMLDocument() (Yes) 4.0 (2.0) 9.0 (Yes) (Yes)
createDocument() (Yes) 1.0 (1.7 or earlier) 9.0 (Yes) (Yes)
hasFeature() (Yes) 1.0 (1.7 or earlier) [1] 6.0 (Yes) (Yes)
createDocumentType() (Yes) 1.0 (1.7 or earlier) 9.0 (Yes) (Yes)
Feature Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support (Yes) 1.0 (1.0) (Yes) (Yes) (Yes)
createHTMLDocument() (Yes) 4.0 (2.0) (Yes) (Yes) (Yes)
createDocument() (Yes) 1.0 (1.0) (Yes) (Yes) (Yes)
hasFeature() (Yes) 1.0 (1.0) (Yes) (Yes) (Yes)
createDocumentType() (Yes) 1.0 (1.0) (Yes) (Yes) (Yes)

[1] Since Gecko 19, hasFeature() mostly returns true.

See also

文档标签和贡献者

此页面的贡献者: xuanhun, Cribug8080, pantao, AshfaqHossain, less
最后编辑者: xuanhun,