A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.mozilla.org/zh-CN/docs/Web/API/Document/implementation below:

document.implementation - Web API | MDN

document.implementation

Baseline Widely available

概要

返回一个和当前文档相关联的DOMImplementation对象。

语法
DOMImpObj = document.implementation;
示例
var modName = "HTML";
var modVer = "2.0";
var conformTest = document.implementation.hasFeature(modName, modVer);

alert("DOM " + modName + " " + modVer + " supported?: " + conformTest);

// alerts with: "DOM HTML 2.0 supported?: true" if DOM Level 2 HTML module is supported.

可以在一致性章节中查看可用的一系列 DOM2 级模型名称(例如:Core, HTML, XML 等等)。

说明

W3C 的 DOM1 级建议值规定了一种检测浏览器对某个 DOM 模型是否支持的方法——hasFeature 方法(请参考上边的例子以及这篇文章 What does your user agent claim to support?)。如果它可用的话,那么 DOMImplementation 接口的其他方法就可以为操作文档以外的内容提供一些服务了。例如,DOMImplementation 接口包含一个 createDocumentType 方法,它可以为实例管理的文档创建对应的 DTD 文档定义。

方法 规范 浏览器兼容性 Gecko 引擎的特别说明

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4