DOMImplementation
interface represents an object providing methods which are not dependent on any particular document. Such an object is returned by the
Document.implementation
特性。
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()
布尔
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.
| 规范 | 状态 | 注释 |
|---|---|---|
|
DOM
The definition of 'DOMImplementation' in that specification. |
实时标准 |
移除
getFeature()
方法。
添加
createHTMLDocument()
方法。
Modified the return type of
createDocument()
from
Document
to
XMLDocument
.
|
|
DOM (文档对象模型) 3 级核心规范
The definition of 'DOMImplementation' in that specification. |
过时 |
添加
getFeature()
method (never implemented by any user agent).
|
|
DOM (文档对象模型) 级别 2 核心规范
The definition of 'DOMImplementation' in that specification. |
过时 |
添加
createDocument()
and
createDocumentType()
方法。
|
|
DOM (文档对象模型) 1 级规范
The definition of 'DOMImplementation' in that specification. |
过时 | 初始定义。 |
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
DOMImplementation
|
Chrome Yes | Edge 12 | Firefox Yes | IE 6 | Opera Yes | Safari Yes | WebView Android Yes | Chrome Android Yes | Firefox Android Yes | Opera Android Yes | Safari iOS Yes | Samsung Internet Android Yes |
createDocument
|
Chrome Yes | Edge 12 | Firefox Yes | IE 9 | Opera Yes | Safari Yes | WebView Android Yes | Chrome Android Yes | Firefox Android Yes | Opera Android Yes | Safari iOS Yes | Samsung Internet Android Yes |
createDocumentType
|
Chrome Yes | Edge 12 | Firefox Yes | IE 9 | Opera Yes | Safari Yes | WebView Android Yes | Chrome Android Yes | Firefox Android Yes | Opera Android Yes | Safari iOS Yes | Samsung Internet Android Yes |
createHTMLDocument
|
Chrome Yes | Edge 12 | Firefox 4 |
IE
9
|
Opera Yes | Safari Yes | WebView Android Yes | Chrome Android Yes | Firefox Android Yes | Opera Android Yes | Safari iOS Yes | Samsung Internet Android Yes |
hasFeature
弃用
|
Chrome Yes | Edge 12 |
Firefox
Yes
|
IE 6 | Opera Yes | Safari Yes | WebView Android Yes | Chrome Android Yes | Firefox Android Yes | Opera Android Yes | Safari iOS Yes | Samsung Internet Android Yes |
完整支持
弃用。不要用于新网站。
见实现注意事项。
DOMImplementation
AbortController
AbortSignal
AbstractRange
Attr
ByteString
CDATASection
CSSPrimitiveValue
CSSValue
CSSValueList
CharacterData
ChildNode
注释
CustomEvent
DOMConfiguration
DOMError
DOMErrorHandler
DOMException
DOMImplementationList
DOMImplementationRegistry
DOMImplementationSource
DOMLocator
DOMObject
DOMParser
DOMPoint
DOMPointInit
DOMPointReadOnly
DOMRect
DOMString
DOMTimeStamp
DOMTokenList
DOMUserData
Document
DocumentFragment
DocumentType
元素
ElementTraversal
Entity
EntityReference
事件
EventTarget
HTMLCollection
MutationObserver
节点
NodeFilter
NodeIterator
NodeList
NonDocumentTypeChildNode
ProcessingInstruction
PromiseResolver
范围
StaticRange
文本
TextDecoder
TextEncoder
TimeRanges
TreeWalker
TypeInfo
USVString
UserDataHandler
XMLDocument