From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- .../ja/web/api/document/implementation/index.html | 68 ++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 files/ja/web/api/document/implementation/index.html (limited to 'files/ja/web/api/document/implementation/index.html') diff --git a/files/ja/web/api/document/implementation/index.html b/files/ja/web/api/document/implementation/index.html new file mode 100644 index 0000000000..08cc40c5c3 --- /dev/null +++ b/files/ja/web/api/document/implementation/index.html @@ -0,0 +1,68 @@ +--- +title: Document.implementation +slug: Web/API/Document/implementation +tags: + - API + - DOM + - Document + - NeedsContent + - Property + - Reference +translation_of: Web/API/Document/implementation +--- +
{{ ApiRef("DOM") }}
+ +

Document.implementation プロパティは、現在の文書に関連付けられた {{domxref("DOMImplementation")}} オブジェクトを返します。

+ +

構文

+ +
DOMImpObj = document.implementation;
+
+ +

+ +
var modName = "HTML";
+var modVer = "2.0";
+var conformTest = document.implementation.hasFeature( modName, modVer );
+
+alert( "DOM " + modName + " " + modVer + " supported?: " + conformTest );
+
+// DOM Level 2 HTML module に対応している場合、"DOM HTML 2.0 supported?: true" とアラート表示されます。
+
+ +

モジュール名 (※ Core 、HTML 、XML 等) の一覧は Conformance Section で入手可能です。

+ +

メモ

+ +

W3C's DOM Level 1 勧告では hasFeature メソッドのみが定義されているので、ブラウザーが DOM モジュールに対応しているかどうかを判断する方法の一つです。 (上記の例と What does your user agent claim to support? を参照してください)。利用できるのであれば、 DOMImplementation の他のメソッドが、単一文書の外のものを制御するサービスを提供します。例えば、 DOMImplementation インターフェイスは createDocumentType メソッドを含んでおり、実装によって管理された1つ以上の文書に DTD が作成されます。

+ +

仕様書

+ + + + + + + + + + + + + + + + +
仕様書状態備考
{{SpecName('DOM WHATWG', '#dom-document-implementation', 'document.implementation')}}{{Spec2('DOM WHATWG')}}
+ +

ブラウザーの互換性

+ + + +

{{Compat("api.Document.implementation")}}

+ +

Gecko に特有のメモ

+ + -- cgit v1.2.3-54-g00ecf