Lorem ipsum dolor sit amet, consetetur sadipscing elitr,
+sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat,
+sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.
+Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
+```
+
+### JavaScript Content
+
+```js
+function insertBreakAtPoint(e) {
+ var range;
+ var textNode;
+ var offset;
+
+ if (document.caretPositionFromPoint) {
+ range = document.caretPositionFromPoint(e.clientX, e.clientY);
+ textNode = range.offsetNode;
+ offset = range.offset;
+ } else if (document.caretRangeFromPoint) {
+ range = document.caretRangeFromPoint(e.clientX, e.clientY);
+ textNode = range.startContainer;
+ offset = range.startOffset;
+ }
+
+ // only split TEXT_NODEs
+ if (textNode.nodeType == 3) {
+ var replacement = textNode.splitText(offset);
+ var br = document.createElement('br');
+ textNode.parentNode.insertBefore(br, replacement);
+ }
+}
+
+window.onload = function (){
+ var paragraphs = document.getElementsByTagName("p");
+ for (i=0 ; i < paragraphs.length; i++) {
+ paragraphs[i].addEventListener("click", insertBreakAtPoint, false);
+ }
+};
+```
+
+## 仕様
+
+| 仕様 | ステータス | 備考 |
+| ---------------------------------------------------------------------------------------------------------------------------- | -------------------------------- | ------------------- |
+| {{SpecName('CSSOM View','#dom-document-caretpositionfrompoint','caretPositionFromPoint()')}} | {{Spec2('CSSOM View')}} | Initial definition. |
+
+## ブラウザーの互換性
+
+{{Compat("api.DocumentOrShadowRoot.caretPositionFromPoint")}}
diff --git a/files/ja/web/api/document/characterset/index.html b/files/ja/web/api/document/characterset/index.html
deleted file mode 100644
index 8dd172b1a76c0a..00000000000000
--- a/files/ja/web/api/document/characterset/index.html
+++ /dev/null
@@ -1,47 +0,0 @@
----
-title: Document.characterSet
-slug: Web/API/Document/characterSet
-tags:
-- API
-- DOM
-- Document
-- Property
-- Read-only
-- Reference
-browser-compat: api.Document.characterSet
-translation_of: Web/API/Document/characterSet
----
-近年のバージョンの Mozilla ベースアプリケーションでも、 Internet Explorer や Netscape 4 でも、このメソッドは何も行いません。
-
-クッキーは普段、ウェブアプリケーションでユーザーと認証されたセッションを識別するために使われます。そこで、ウェブアプリケーションからのクッキーを盗まれると、認証されたユーザーのセッションハイジャックにつながります。クッキーを盗むための一般的な方法は、ソーシャルエンジニアリングを使用するか、アプリケーション内の XSS 脆弱性の悪用です。
-
-このイベントの本来の対象は、コピー操作の意図の対象である {{domxref("Element")}} です。このイベントを {{domxref("Document")}} インターフェイス上で待ち受けし、キャプチャやバブリングの局面で処理することができます。このイベントの局面について完全な詳細は、 Element: copy イベントを参照してください。
-
-名前空間 URI を指定せずに要素を生成する場合は、 {{DOMxRef("Document.createElement()", "createElement()")}} メソッドを使用してください。
-
-The new {{DOMxRef("Element")}}.
-
- 要素を {{Glossary("XHTML")}} 名前空間に生成し、 vbox 要素に追加します。これは有用な [XUL](/ja/docs/Mozilla/Tech/XUL) 文書ではありませんが、二つの異なる名前空間の要素を単一の文書内で利用する方法を紹介しています。
+
+```xml
+
+
+
+
+
+
+
+ The script on this page will add dynamic content below:
+
+
+
+
+```
+
+> **Note:** 上記の例は XHTML 文書では推奨されていないインラインスクリプトを使用しています。この部分的な例は実際には XUL 文書に埋め込んだ XHTML があるものですが、それでもこの推奨事項は適用されます。
+
+## 仕様書
+
+| 仕様書 | 状態 | 備考 |
+| ------------------------------------------------------------------------------------------------------------------------ | -------------------------------- | ---- |
+| {{SpecName("DOM WHATWG", "#dom-document-createelementns", "Document.createElementNS()")}} | {{Spec2("DOM WHATWG")}} | |
+
+## ブラウザーの互換性
+
+{{Compat("api.Document.createElementNS")}}
+
+## 関連情報
+
+- {{DOMxRef("document.createElement()")}}
+- {{DOMxRef("document.createTextNode()")}}
+- {{DOMxRef("Node.namespaceURI")}}
+- [Namespaces in XML](http://www.w3.org/TR/1999/REC-xml-names-19990114)
diff --git a/files/ja/web/api/document/createevent/index.html b/files/ja/web/api/document/createevent/index.html
deleted file mode 100644
index ed1d2cac4af130..00000000000000
--- a/files/ja/web/api/document/createevent/index.html
+++ /dev/null
@@ -1,92 +0,0 @@
----
-title: Document.createEvent()
-slug: Web/API/Document/createEvent
-tags:
- - API
- - DOM
- - Method
- - Reference
- - メソッド
-browser-compat: api.Document.createEvent
-translation_of: Web/API/Document/createEvent
----
-
-
警告
-
createEvent
とともに使用される多くのメソッド (initCustomEvent
など) は非推奨です。代わりに イベントのコンストラクター を使用してください。
-
-
-
{{ApiRef("DOM")}}
-
-
指定された型の イベント を作成します。返されるオブジェクトは最初に初期化する必要があり、その後で {{domxref("EventTarget.dispatchEvent")}} へ渡すことができます。
-
-
構文
-
-
var event = document.createEvent(type);
-
-
-
- event
は作成された イベント オブジェクトです。
- type
は作成するイベント型を表す文字列です。取り得るイベント型は "UIEvents"
, "MouseEvents"
, "MutationEvents"
, "HTMLEvents"
のいずれかです。詳しくは注の項目を参照してください。
-
-
-
例
-
-
// イベントを作成します。
-var event = document.createEvent('Event');
-
-// イベントの名前を 'build' に定義します。
-event.initEvent('build', true, true);
-
-// イベントを待受します。
-elem.addEventListener('build', function (e) {
- // e.target が elem に対応する
-}, false);
-
-// ターゲットは任意の Element やほかの EventTarget にすることができます。
-elem.dispatchEvent(event);
-
-
-
注
-
-
createEvent()
に渡すのに適したイベント型を表す文字列は DOM 標準で定義されています。ステップ 2 の表をご覧ください。現在はほとんどのイベントオブジェクトにコンストラクターがあり、それらはイベントオブジェクトのインスタンスを生成するために推奨される、現代的な方法であることに注意してください。
-
-
Gecko は非標準のイベントオブジェクトの別名をサポートしています。詳細は以下の表を参照してください。
-
-
-
-
- イベントモジュール |
- 標準イベントオブジェクト |
- Gecko が対応する別名 |
-
-
- テキストイベントモジュール |
- TextEvent |
- TextEvents |
-
-
- キーボードイベントモジュール |
- KeyboardEvent |
- KeyEvents |
-
-
- 基本イベントモジュール |
- Event |
- Events |
-
-
-
-
-
仕様書
-
-{{Specifications}}
-
-
ブラウザーの互換性
-
-
{{Compat}}
-
-
関連情報
-
-
diff --git a/files/ja/web/api/document/createevent/index.md b/files/ja/web/api/document/createevent/index.md
new file mode 100644
index 00000000000000..5ecf00526e25e3
--- /dev/null
+++ b/files/ja/web/api/document/createevent/index.md
@@ -0,0 +1,68 @@
+---
+title: Document.createEvent()
+slug: Web/API/Document/createEvent
+tags:
+ - API
+ - DOM
+ - Method
+ - Reference
+ - メソッド
+translation_of: Web/API/Document/createEvent
+browser-compat: api.Document.createEvent
+---
+> **Warning:** `createEvent` とともに使用される多くのメソッド (`initCustomEvent` など) は非推奨です。代わりに [イベントのコンストラクター](/ja/docs/Web/API/CustomEvent) を使用してください。
+
+{{ApiRef("DOM")}}
+
+指定された型の [イベント](/ja/docs/Web/API/Event) を作成します。返されるオブジェクトは最初に初期化する必要があり、その後で {{domxref("EventTarget.dispatchEvent")}} へ渡すことができます。
+
+## 構文
+
+```js
+var event = document.createEvent(type);
+```
+
+- `event` は作成された [イベント](/ja/docs/Web/API/Event) オブジェクトです。
+- `type` は作成するイベント型を表す文字列です。取り得るイベント型は `"UIEvents"`, `"MouseEvents"`, `"MutationEvents"`, `"HTMLEvents"` のいずれかです。詳しくは[注](#notes)の項目を参照してください。
+
+## 例
+
+```js
+// イベントを作成します。
+var event = document.createEvent('Event');
+
+// イベントの名前を 'build' に定義します。
+event.initEvent('build', true, true);
+
+// イベントを待受します。
+elem.addEventListener('build', function (e) {
+ // e.target が elem に対応する
+}, false);
+
+// ターゲットは任意の Element やほかの EventTarget にすることができます。
+elem.dispatchEvent(event);
+```
+
+## 注
+
+`createEvent()` に渡すのに適したイベント型を表す文字列は [DOM 標準で定義されています。ステップ 2 の表をご覧ください](https://dom.spec.whatwg.org/#dom-document-createevent)。現在はほとんどのイベントオブジェクトにコンストラクターがあり、それらはイベントオブジェクトのインスタンスを生成するために推奨される、現代的な方法であることに注意してください。
+
+Gecko は非標準のイベントオブジェクトの別名をサポートしています。詳細は以下の表を参照してください。
+
+| イベントモジュール | 標準イベントオブジェクト | Gecko が対応する別名 |
+| ---------------------------- | ------------------------ | -------------------- |
+| テキストイベントモジュール | `TextEvent` | `TextEvents` |
+| キーボードイベントモジュール | `KeyboardEvent` | `KeyEvents` |
+| 基本イベントモジュール | `Event` | `Events` |
+
+## 仕様書
+
+{{Specifications}}
+
+## ブラウザーの互換性
+
+{{Compat}}
+
+## 関連情報
+
+- [イベントの作成と発行](/ja/docs/Web/Events/Creating_and_triggering_events)
diff --git a/files/ja/web/api/document/createexpression/index.html b/files/ja/web/api/document/createexpression/index.html
deleted file mode 100644
index 0c8e3b0f578c45..00000000000000
--- a/files/ja/web/api/document/createexpression/index.html
+++ /dev/null
@@ -1,45 +0,0 @@
----
-title: Document.createExpression()
-slug: Web/API/Document/createExpression
-tags:
- - API
- - DOM
- - Document
- - Reference
- - XPath
- - createExpression
- - メソッド
-translation_of: Web/API/Document/createExpression
----
-
{{APIRef("DOM")}}
-
-
このメソッドは、 (繰り返して) 評価を行うために使用することができる {{DOMxRef("XPathExpression")}} をコンパイルします。
-
-
構文
-
-
xpathExpr = document.createExpression(xpathText, namespaceURLMapper);
-
-
-
引数
-
-
- - xpathText は文字列で、コンパイルする XPath 式です。
- - namespaceURLMapper は、名前空間接頭辞を名前空間 URL に対応付ける関数 (または必要がなければ null) です。
-
-
-
{{Fx_MinVersion_Note(3, "Firefox 3 より前では、対象として XPath を実行する文書以外の文書に対してこのメソッドを呼び出すことができました。 Firefox 3 では、同じ文書に対して呼び出す必要があります。")}}
-
-
返値
-
-
{{DOMxRef("XPathExpression")}}
-
-
ブラウザーの対応
-
-
{{Compat("api.Document.createExpression")}}
-
-
関連情報
-
-
- - {{DOMxRef("Document.evaluate()")}}
- - {{DOMxRef("XPathExpression")}}
-
diff --git a/files/ja/web/api/document/createexpression/index.md b/files/ja/web/api/document/createexpression/index.md
new file mode 100644
index 00000000000000..c480aa3553c623
--- /dev/null
+++ b/files/ja/web/api/document/createexpression/index.md
@@ -0,0 +1,42 @@
+---
+title: Document.createExpression()
+slug: Web/API/Document/createExpression
+tags:
+ - API
+ - DOM
+ - Document
+ - Reference
+ - XPath
+ - createExpression
+ - メソッド
+translation_of: Web/API/Document/createExpression
+---
+{{APIRef("DOM")}}
+
+このメソッドは、 (繰り返して) 評価を行うために使用することができる {{DOMxRef("XPathExpression")}} をコンパイルします。
+
+## 構文
+
+```
+xpathExpr = document.createExpression(xpathText, namespaceURLMapper);
+```
+
+### 引数
+
+- _xpathText_ は文字列で、コンパイルする XPath 式です。
+- _namespaceURLMapper_ は、名前空間接頭辞を名前空間 URL に対応付ける関数 (または必要がなければ null) です。
+
+{{Fx_MinVersion_Note(3, "Firefox 3 より前では、対象として XPath を実行する文書以外の文書に対してこのメソッドを呼び出すことができました。 Firefox 3 では、同じ文書に対して呼び出す必要があります。")}}
+
+### 返値
+
+{{DOMxRef("XPathExpression")}}
+
+## ブラウザーの互換性
+
+{{Compat("api.Document.createExpression")}}
+
+## 関連情報
+
+- {{DOMxRef("Document.evaluate()")}}
+- {{DOMxRef("XPathExpression")}}
diff --git a/files/ja/web/api/document/createnodeiterator/index.html b/files/ja/web/api/document/createnodeiterator/index.html
deleted file mode 100644
index e04bcfc1b8966c..00000000000000
--- a/files/ja/web/api/document/createnodeiterator/index.html
+++ /dev/null
@@ -1,154 +0,0 @@
----
-title: Document.createNodeIterator()
-slug: Web/API/Document/createNodeIterator
-tags:
- - API
- - DOM
- - Gecko
- - MakeBrowserAgnostic
- - Method
- - メソッド
-translation_of: Web/API/Document/createNodeIterator
----
-
{{APIRef("DOM")}}
-
-
新しい {{domxref("NodeIterator")}} オブジェクトを返します。
-
-
構文
-
-
const nodeIterator = document.createNodeIterator(root[, whatToShow[, filter]]);
-
-
-
値
-
-
- root
- - {{ domxref("NodeIterator") }} の探索の開始地点になるルートノードです。
- whatToShow
{{ optional_inline() }}
- - オプションの
unsigned long
値で、 NodeFilter
の定数プロパティを組み合わせて作られたビットマスクを表します。これは特定の種類のノードを絞り込みするのに便利な方法です。. 既定値は 0xFFFFFFFF
で、 SHOW_ALL
定数を表します。
-
-
-
-
-
-
-
-
-
-
- NodeFilter.SHOW_ALL |
- -1 (すなわち unsigned long の最大値) |
- すべてのノードを表します。 |
-
-
- NodeFilter.SHOW_ATTRIBUTE {{deprecated_inline}} |
- 2 |
-
- 属性 {{ domxref("Attr") }} ノードを表します。
-
- これは、 {{ domxref("Attr") }} ノードをルートとして {{ domxref("NodeIterator") }} を作成した場合にのみ意味を持ちます。この場合、その属性ノードが反復や探索の最初の位置に現れることを意味します。属性は他のノードの子ではないので、文書ツリーを探索しても現れません。
- |
-
-
- NodeFilter.SHOW_CDATA_SECTION {{deprecated_inline}} |
- 8 |
- {{ domxref("CDATASection") }} ノードを表します。 |
-
-
- NodeFilter.SHOW_COMMENT |
- 128 |
- {{ domxref("Comment") }} ノードを表します。 |
-
-
- NodeFilter.SHOW_DOCUMENT |
- 256 |
- {{ domxref("Document") }} ノードを表します。 |
-
-
- NodeFilter.SHOW_DOCUMENT_FRAGMENT |
- 1024 |
- {{ domxref("DocumentFragment") }} ノードを表します。 |
-
-
- NodeFilter.SHOW_DOCUMENT_TYPE |
- 512 |
- {{ domxref("DocumentType") }} ノードを表します。 |
-
-
- NodeFilter.SHOW_ELEMENT |
- 1 |
- {{ domxref("Element") }} ノードを表します。 |
-
-
- NodeFilter.SHOW_ENTITY {{deprecated_inline}} |
- 32 |
- {{ domxref("Entity") }} ノードを表示します。これは、 {{ domxref("Entity") }} ノードをルートとして {{ domxref("NodeIterator") }} を作成した場合にのみ意味を持ちます。この場合、 {{ domxref("Entity") }} ノードが探索の最初の位置に現れることを意味します。エンティティは文書ツリーの一部ではないので、文書ツリーを探索しても表されません。 |
-
-
- NodeFilter.SHOW_ENTITY_REFERENCE {{deprecated_inline}} |
- 16 |
- {{ domxref("EntityReference") }} ノードを表します。 |
-
-
- NodeFilter.SHOW_NOTATION {{deprecated_inline}} |
- 2048 |
- {{ domxref("Notation") }} ノードを表示します。これは、 {{ domxref("Notation") }} ノードをルートとして {{ domxref("NodeIterator") }} を作成した場合にのみ意味を持ちます。この場合、 {{ domxref("Notation") }} ノードが探索の最初の位置に現れることを意味します。 Notation は文書ツリーの一部ではないので、文書ツリーを探索しても表されません。 |
-
-
- NodeFilter.SHOW_PROCESSING_INSTRUCTION |
- 64 |
- Shows {{ domxref("ProcessingInstruction") }} nodes. |
-
-
- NodeFilter.SHOW_TEXT |
- 4 |
- {{ domxref("Text") }} ノードを表します。 |
-
-
-
-
- filter
{{ optional_inline() }}
- - NodeFilter インターフェースを実装したオブジェクト。その acceptNode() メソッドは、反復可能なノードのリストに含めるかどうかを決定するために、 whatToShow フラグによって含まれていると受け入れられたルートを基準としたサブツリーの各ノードに対して呼び出されます (代わりに単純なコールバック関数を使用することもできます)。このメソッドは
NodeFilter.FILTER_ACCEPT
, NodeFilter.FILTER_REJECT
, or NodeFilter.FILTER_SKIP
のいずれかを返します。例を参照してください。
-
-
-
メモ: Gecko 12.0 (Firefox 12.0 / Thunderbird 12.0 / SeaMonkey 2.9) より前の版では、このメソッドは DOM4 仕様の一部ではないオプションの 4 番目の引数 (entityReferenceExpansion) を受け入れていました。この引数は、エンティティ参照ノードの子がイテレーターから見えるかどうかを示していました。このようなノードはブラウザーでは作成されないので、この引数は何の効果もありませんでした。
-
-
例
-
-
const nodeIterator = document.createNodeIterator(
- document.body,
- NodeFilter.SHOW_ELEMENT,
- function(node) {
- return node.nodeName.toLowerCase() === 'p' ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_REJECT;
- }
-);
-const pars = [];
-let currentNode;
-
-while (currentNode = nodeIterator.nextNode()) {
- pars.push(currentNode);
-}
-
-
-
仕様書
-
-
-
-
- 仕様書 |
- 状態 |
- 備考 |
-
-
-
-
- {{SpecName('DOM WHATWG', '#dom-document-createnodeiterator', 'document.createNodeIterator')}} |
- {{Spec2('DOM WHATWG')}} |
- |
-
-
-
-
-
ブラウザーの互換性
-
-
{{Compat("api.Document.createNodeIterator")}}
diff --git a/files/ja/web/api/document/createnodeiterator/index.md b/files/ja/web/api/document/createnodeiterator/index.md
new file mode 100644
index 00000000000000..a765d27615b9eb
--- /dev/null
+++ b/files/ja/web/api/document/createnodeiterator/index.md
@@ -0,0 +1,78 @@
+---
+title: Document.createNodeIterator()
+slug: Web/API/Document/createNodeIterator
+tags:
+ - API
+ - DOM
+ - Gecko
+ - MakeBrowserAgnostic
+ - Method
+ - メソッド
+translation_of: Web/API/Document/createNodeIterator
+---
+{{APIRef("DOM")}}
+
+新しい {{domxref("NodeIterator")}} オブジェクトを返します。
+
+## 構文
+
+```
+const nodeIterator = document.createNodeIterator(root[, whatToShow[, filter]]);
+```
+
+### 値
+
+- `root`
+ - : {{ domxref("NodeIterator") }} の探索の開始地点になるルートノードです。
+- `whatToShow` {{ optional_inline() }}
+
+ - : オプションの `unsigned long` 値で、 [`NodeFilter`](http://www.w3.org/TR/DOM-Level-2-Traversal-Range/traversal.html#Traversal-NodeFilter) の定数プロパティを組み合わせて作られたビットマスクを表します。これは特定の種類のノードを絞り込みするのに便利な方法です。. 既定値は `0xFFFFFFFF` で、 `SHOW_ALL` 定数を表します。
+
+ | 定数 | 数値 | 説明 |
+ | --------------------------------------------------------------- | ---------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+ | `NodeFilter.SHOW_ALL` | `-1` (すなわち `unsigned long` の最大値) | すべてのノードを表します。 |
+ | `NodeFilter.SHOW_ATTRIBUTE` {{deprecated_inline}} | `2` | 属性 {{ domxref("Attr") }} ノードを表します。これは、 {{ domxref("Attr") }} ノードをルートとして {{ domxref("NodeIterator") }} を作成した場合にのみ意味を持ちます。この場合、その属性ノードが反復や探索の最初の位置に現れることを意味します。属性は他のノードの子ではないので、文書ツリーを探索しても現れません。 |
+ | `NodeFilter.SHOW_CDATA_SECTION` {{deprecated_inline}} | `8` | {{ domxref("CDATASection") }} ノードを表します。 |
+ | `NodeFilter.SHOW_COMMENT` | `128` | {{ domxref("Comment") }} ノードを表します。 |
+ | `NodeFilter.SHOW_DOCUMENT` | `256` | {{ domxref("Document") }} ノードを表します。 |
+ | `NodeFilter.SHOW_DOCUMENT_FRAGMENT` | `1024` | {{ domxref("DocumentFragment") }} ノードを表します。 |
+ | `NodeFilter.SHOW_DOCUMENT_TYPE` | `512` | {{ domxref("DocumentType") }} ノードを表します。 |
+ | `NodeFilter.SHOW_ELEMENT` | `1` | {{ domxref("Element") }} ノードを表します。 |
+ | `NodeFilter.SHOW_ENTITY` {{deprecated_inline}} | `32` | {{ domxref("Entity") }} ノードを表示します。これは、 {{ domxref("Entity") }} ノードをルートとして {{ domxref("NodeIterator") }} を作成した場合にのみ意味を持ちます。この場合、 {{ domxref("Entity") }} ノードが探索の最初の位置に現れることを意味します。エンティティは文書ツリーの一部ではないので、文書ツリーを探索しても表されません。 |
+ | `NodeFilter.SHOW_ENTITY_REFERENCE` {{deprecated_inline}} | `16` | {{ domxref("EntityReference") }} ノードを表します。 |
+ | `NodeFilter.SHOW_NOTATION` {{deprecated_inline}} | `2048` | {{ domxref("Notation") }} ノードを表示します。これは、 {{ domxref("Notation") }} ノードをルートとして {{ domxref("NodeIterator") }} を作成した場合にのみ意味を持ちます。この場合、 {{ domxref("Notation") }} ノードが探索の最初の位置に現れることを意味します。 Notation は文書ツリーの一部ではないので、文書ツリーを探索しても表されません。 |
+ | `NodeFilter.SHOW_PROCESSING_INSTRUCTION` | `64` | Shows {{ domxref("ProcessingInstruction") }} nodes. |
+ | `NodeFilter.SHOW_TEXT` | `4` | {{ domxref("Text") }} ノードを表します。 |
+
+- `filter` {{ optional_inline() }}
+ - : NodeFilter インターフェースを実装したオブジェクト。その acceptNode() メソッドは、反復可能なノードのリストに含めるかどうかを決定するために、 whatToShow フラグによって含まれていると受け入れられたルートを基準としたサブツリーの各ノードに対して呼び出されます (代わりに単純なコールバック関数を使用することもできます)。このメソッドは `NodeFilter.FILTER_ACCEPT`, `NodeFilter.FILTER_REJECT`, or `NodeFilter.FILTER_SKIP` のいずれかを返します。[例](#example)を参照してください。
+
+> **Note:** Gecko 12.0 (Firefox 12.0 / Thunderbird 12.0 / SeaMonkey 2.9) より前の版では、このメソッドは DOM4 仕様の一部ではないオプションの 4 番目の引数 (entityReferenceExpansion) を受け入れていました。この引数は、エンティティ参照ノードの子がイテレーターから見えるかどうかを示していました。このようなノードはブラウザーでは作成されないので、この引数は何の効果もありませんでした。
+
+## 例
+
+```js
+const nodeIterator = document.createNodeIterator(
+ document.body,
+ NodeFilter.SHOW_ELEMENT,
+ function(node) {
+ return node.nodeName.toLowerCase() === 'p' ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_REJECT;
+ }
+);
+const pars = [];
+let currentNode;
+
+while (currentNode = nodeIterator.nextNode()) {
+ pars.push(currentNode);
+}
+```
+
+## 仕様書
+
+| 仕様書 | 状態 | 備考 |
+| ---------------------------------------------------------------------------------------------------------------------------- | -------------------------------- | ---- |
+| {{SpecName('DOM WHATWG', '#dom-document-createnodeiterator', 'document.createNodeIterator')}} | {{Spec2('DOM WHATWG')}} | |
+
+## ブラウザーの互換性
+
+{{Compat("api.Document.createNodeIterator")}}
diff --git a/files/ja/web/api/document/creatensresolver/index.html b/files/ja/web/api/document/creatensresolver/index.html
deleted file mode 100644
index 0027c1366a1912..00000000000000
--- a/files/ja/web/api/document/creatensresolver/index.html
+++ /dev/null
@@ -1,69 +0,0 @@
----
-title: Document.createNSResolver()
-slug: Web/API/Document/createNSResolver
-tags:
- - API
- - DOM
- - DOM Reference
- - Method
- - Reference
-translation_of: Web/API/Document/createNSResolver
----
-
{{ ApiRef("DOM") }}
-
-
指定されたノードのスコープで定義を尊重する名前空間を解決する XPathNSResolver
を生成します。
-
-
構文
-
-
nsResolver = document.createNSResolver(node);
-
-
-
引数
-
-
- node
は名前空間の解決のためのコンテキストとして使用されるノードです。
-
-
-
返値
-
-
- nsResolver
は XPathNSResolver オブジェクトです。
-
-
-
注
-
-
任意の DOM ノードをネームスペースを解決するように修正し、 XPath 式が文書内に現れたノードのコンテキストに対して容易に評価できるようにします。このアダプターは、 lookupNamespaceURI
が呼び出されたときにノードの階層で使用可能な現在の情報を使用して、指定された接頭辞から namespaceURI
を解決する際に、ノード上の DOM Level 3 メソッド lookupNamespaceURI
のように機能します。 暗黙の xml
接頭辞も正しく解決されます。
-
-
なお、 XPath は、ヌル名前空間の要素と一致する接頭辞のない QNames を定義します。 XPath には、通常の要素参照に適用される既定の名前空間を選択する方法はありません (例えば xmlns='http://www.w3.org/1999/xhtml'
における p[@id='_myid'
])。ヌルではない名前空間の既定の要素を照合するには、 *namespace-uri()=http://www.w3.org/1999/xhtml and name()=p[@id='_myid']
のような形を使用して特定の要素を参照するか (このアプローチは名前空間が分からない可能性がある動的 XPath 式で動作します)、接頭辞付きの名前の条件を使用し、接頭辞と名前空間を対応付ける名前空間リゾルバーを作成するかしてください。後者のアプローチを採りたいと思うのであれば、ユーザー定義の名前空間リゾルバーの作成方法をお読みください。
-
-
createNSResolver
は DOM Level 3 で導入されました。
-
-
仕様書
-
-
-
-
- 仕様書 |
- 状態 |
- 備考 |
-
-
-
-
- {{SpecName('DOM3 XPath', 'xpath.html#XPathEvaluator-createNSResolver', 'document.createNSResolver')}} |
- {{Spec2('DOM3 XPath')}} |
- |
-
-
-
-
-
ブラウザーの互換性
-
-
{{Compat("api.Document.createNSResolver")}}
-
-
関連情報
-
-
diff --git a/files/ja/web/api/document/creatensresolver/index.md b/files/ja/web/api/document/creatensresolver/index.md
new file mode 100644
index 00000000000000..873ccf0ddb6a5d
--- /dev/null
+++ b/files/ja/web/api/document/creatensresolver/index.md
@@ -0,0 +1,51 @@
+---
+title: Document.createNSResolver()
+slug: Web/API/Document/createNSResolver
+tags:
+ - API
+ - DOM
+ - DOM Reference
+ - Method
+ - Reference
+translation_of: Web/API/Document/createNSResolver
+---
+{{ ApiRef("DOM") }}
+
+指定されたノードのスコープで定義を尊重する名前空間を解決する `XPathNSResolver` を生成します。
+
+## 構文
+
+```
+nsResolver = document.createNSResolver(node);
+```
+
+### 引数
+
+- `node` は名前空間の解決のためのコンテキストとして使用されるノードです。
+
+### 返値
+
+- `nsResolver` は XPathNSResolver オブジェクトです。
+
+## 注
+
+任意の DOM ノードをネームスペースを解決するように修正し、 [XPath](/ja/docs/Web/XPath) 式が文書内に現れたノードのコンテキストに対して容易に評価できるようにします。このアダプターは、 `lookupNamespaceURI` が呼び出されたときにノードの階層で使用可能な現在の情報を使用して、指定された接頭辞から `namespaceURI` を解決する際に、ノード上の DOM Level 3 メソッド `lookupNamespaceURI` のように機能します。 暗黙の `xml` 接頭辞も正しく解決されます。
+
+なお、 XPath は、ヌル名前空間の要素と一致する接頭辞のない QNames を定義します。 XPath には、通常の要素参照に適用される既定の名前空間を選択する方法はありません (例えば `xmlns='http://www.w3.org/1999/xhtml'` における `p[@id='_myid'`])。ヌルではない名前空間の既定の要素を照合するには、 `*namespace-uri()=http://www.w3.org/1999/xhtml and name()=p[@id='_myid']` のような形を使用して特定の要素を参照するか ([このアプローチ](/ja/docs/Web/JavaScript/Introduction_to_using_XPath_in_JavaScript#Using_XPath_functions_to_reference_elements_with_its_default_namespace)は名前空間が分からない可能性がある動的 XPath 式で動作します)、接頭辞付きの名前の条件を使用し、接頭辞と名前空間を対応付ける名前空間リゾルバーを作成するかしてください。後者のアプローチを採りたいと思うのであれば、[ユーザー定義の名前空間リゾルバーの作成方法](/ja/docs/Web/JavaScript/Introduction_to_using_XPath_in_JavaScript#Implementing_a_User_Defined_Namespace_Resolver)をお読みください。
+
+`createNSResolver` は DOM Level 3 で導入されました。
+
+## 仕様書
+
+| 仕様書 | 状態 | 備考 |
+| ---------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------- | ---- |
+| {{SpecName('DOM3 XPath', 'xpath.html#XPathEvaluator-createNSResolver', 'document.createNSResolver')}} | {{Spec2('DOM3 XPath')}} | |
+
+## ブラウザーの互換性
+
+{{Compat("api.Document.createNSResolver")}}
+
+## 関連情報
+
+- [document.evaluate](/ja/docs/Web/API/Document/evaluate)
+- [Javascript での XPath の使用](/ja/docs/Web/JavaScript/Introduction_to_using_XPath_in_JavaScript)
diff --git a/files/ja/web/api/document/createprocessinginstruction/index.html b/files/ja/web/api/document/createprocessinginstruction/index.html
deleted file mode 100644
index 265c070f056404..00000000000000
--- a/files/ja/web/api/document/createprocessinginstruction/index.html
+++ /dev/null
@@ -1,96 +0,0 @@
----
-title: Document.createProcessingInstruction()
-slug: Web/API/Document/createProcessingInstruction
-tags:
- - API
- - DOM
- - Document
- - Method
- - Reference
- - createProcessInstruction
-translation_of: Web/API/Document/createProcessingInstruction
----
-
{{APIRef("DOM")}}
-
-
createProcessingInstruction()
は新しい処理命令ノードを生成して返します。
-
-
新しいノードは {{ domxref("node.insertBefore") }} のように、あらゆることを成立させるために XML 文書に挿入されます。
-
-
構文
-
-
piNode = document.createProcessingInstruction(target, data)
-
-
-
引数
-
-
- piNode
は結果の {{ domxref("ProcessingInstruction") }} ノードです。
- target
は処理命令の最初の部分 (つまり <?target … ?>
) を含む文字列です。
- data
は target の後に処理命令が伝えるすべての情報を含む文字列です。このデータはあなた次第ですが、 ?>
は処理命令を閉じるので含むことができません。
-
-
-
例外
-
-
- DOM_INVALID_CHARACTER
- - 以下の何れかが真になると例外を投げます。
-
- - 処理命令の target が無効である — 有効な XML 名とは、 "xml", "XML" またはその2つの大文字・小文字の組み合わせであり、
<?xml-stylesheet ?>
のような標準化されたものではないものです。
- - closing processing instruction sequence (
?>
) がdata
に含まれている。
-
-
-
-
-
例
-
-
var doc = new DOMParser().parseFromString('<foo />', 'application/xml');
-var pi = doc.createProcessingInstruction('xml-stylesheet', 'href="mycss.css" type="text/css"');
-
-doc.insertBefore(pi, doc.firstChild);
-
-console.log(new XMLSerializer().serializeToString(doc));
-// Displays: <?xml-stylesheet href="mycss.css" type="text/css"?><foo/>
-
-
-
仕様書
-
-
-
-
- 仕様書 |
- 状態 |
- 備考 |
-
-
-
-
- {{SpecName('DOM WHATWG', '#dom-document-createprocessinginstruction', 'createProcessingInstruction()')}} |
- {{Spec2('DOM WHATWG')}} |
- 変更なし |
-
-
- {{SpecName('DOM4', '#dom-document-createprocessinginstruction', 'createProcessingInstruction()')}} |
- {{Spec2('DOM4')}} |
- data 引数の検証方法のもっと詳細な定義を追加した。 |
-
-
- {{SpecName('DOM3 Core', 'core.html#ID-135944439', 'createProcessingInstruction()')}} |
- {{Spec2('DOM3 Core')}} |
- 対象名の名前空間が正しい形式かどうかチェックされないこと、どの文字が対象名に違反するかの定義、返された {{domxref("ProcessingInstruction")}} オブジェクトのより詳細についてのメモを追加。 |
-
-
- {{SpecName('DOM2 Core', 'core.html#ID-135944439', 'createProcessingInstruction()')}} |
- {{Spec2('DOM2 Core')}} |
- 変更なし |
-
-
- {{SpecName('DOM1', 'level-one-core.html#ID-135944439', 'createProcessingInstruction()')}} |
- {{Spec2('DOM1')}} |
- 初回定義 |
-
-
-
-
-
ブラウザーの対応
-
-
{{Compat("api.Document.createProcessingInstruction")}}
diff --git a/files/ja/web/api/document/createprocessinginstruction/index.md b/files/ja/web/api/document/createprocessinginstruction/index.md
new file mode 100644
index 00000000000000..214c050c679b87
--- /dev/null
+++ b/files/ja/web/api/document/createprocessinginstruction/index.md
@@ -0,0 +1,64 @@
+---
+title: Document.createProcessingInstruction()
+slug: Web/API/Document/createProcessingInstruction
+tags:
+ - API
+ - DOM
+ - Document
+ - Method
+ - Reference
+ - createProcessInstruction
+translation_of: Web/API/Document/createProcessingInstruction
+---
+{{APIRef("DOM")}}
+
+`createProcessingInstruction()` は新しい[処理命令](/ja/docs/Web/API/ProcessingInstruction)ノードを生成して返します。
+
+新しいノードは {{ domxref("node.insertBefore") }} のように、あらゆることを成立させるために XML 文書に挿入されます。
+
+## 構文
+
+```js
+piNode = document.createProcessingInstruction(target, data)
+```
+
+### 引数
+
+- `piNode` は結果の {{ domxref("ProcessingInstruction") }} ノードです。
+- `target` は処理命令の最初の部分 (つまり ``) を含む文字列です。
+- `data` は target の後に処理命令が伝えるすべての情報を含む文字列です。このデータはあなた次第ですが、 `?>` は処理命令を閉じるので含むことができません。
+
+### 例外
+
+- `DOM_INVALID_CHARACTER`
+
+ - : 以下の何れかが真になると例外を投げます。
+
+ - 処理命令の **_target_** が無効である — 有効な *[XML 名](https://www.w3.org/TR/REC-xml/#dt-name)*とは、 "xml", "XML" またはその 2 つの大文字・小文字の組み合わせであり、 `` のような標準化されたものではないものです。
+ - _closing processing instruction sequence_ (`?>`) が`data` に含まれている。
+
+## 例
+
+```js
+var doc = new DOMParser().parseFromString('
', 'application/xml');
+var pi = doc.createProcessingInstruction('xml-stylesheet', 'href="mycss.css" type="text/css"');
+
+doc.insertBefore(pi, doc.firstChild);
+
+console.log(new XMLSerializer().serializeToString(doc));
+// Displays:
+```
+
+## 仕様書
+
+| 仕様書 | 状態 | 備考 |
+| -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| {{SpecName('DOM WHATWG', '#dom-document-createprocessinginstruction', 'createProcessingInstruction()')}} | {{Spec2('DOM WHATWG')}} | 変更なし |
+| {{SpecName('DOM4', '#dom-document-createprocessinginstruction', 'createProcessingInstruction()')}} | {{Spec2('DOM4')}} | `data` 引数の検証方法のもっと詳細な定義を追加した。 |
+| {{SpecName('DOM3 Core', 'core.html#ID-135944439', 'createProcessingInstruction()')}} | {{Spec2('DOM3 Core')}} | 対象名の名前空間が正しい形式かどうかチェックされないこと、どの文字が対象名に違反するかの定義、返された {{domxref("ProcessingInstruction")}} オブジェクトのより詳細についてのメモを追加。 |
+| {{SpecName('DOM2 Core', 'core.html#ID-135944439', 'createProcessingInstruction()')}} | {{Spec2('DOM2 Core')}} | 変更なし |
+| {{SpecName('DOM1', 'level-one-core.html#ID-135944439', 'createProcessingInstruction()')}} | {{Spec2('DOM1')}} | 初回定義 |
+
+## ブラウザーの互換性
+
+{{Compat("api.Document.createProcessingInstruction")}}
diff --git a/files/ja/web/api/document/createrange/index.html b/files/ja/web/api/document/createrange/index.html
deleted file mode 100644
index 2c0bef84df8ea7..00000000000000
--- a/files/ja/web/api/document/createrange/index.html
+++ /dev/null
@@ -1,58 +0,0 @@
----
-title: Document.createRange()
-slug: Web/API/Document/createRange
-tags:
- - API
- - DOM
- - DOM Reference
- - Document
- - DocumentRange.createRange
- - Method
- - Range
-translation_of: Web/API/Document/createRange
----
-
{{APIRef("DOM")}}
-
-
Document.createRange()
メソッドは、新しい {{domxref("Range")}} オブジェクトを返します。
-
-
構文
-
-
range = document.createRange();
-
-
-
range は生成された {{domxref("Range")}} オブジェクトです。
-
-
例
-
-
let range = document.createRange();
-
-range.setStart(startNode, startOffset);
-range.setEnd(endNode, endOffset);
-
-
-
注
-
-
Range
を生成したあと、大部分のメソッドを使用するには境界を設定する必要があります。
-
-
仕様書
-
-
-
-
- 仕様書 |
- 状態 |
- 備考 |
-
-
-
-
- {{SpecName('DOM WHATWG', '#dom-document-createrange', 'document.createRange')}} |
- {{Spec2('DOM WHATWG')}} |
- |
-
-
-
-
-
ブラウザーの互換性
-
-
{{Compat("api.Document.createRange")}}
diff --git a/files/ja/web/api/document/createrange/index.md b/files/ja/web/api/document/createrange/index.md
new file mode 100644
index 00000000000000..fbccc5218f5ca0
--- /dev/null
+++ b/files/ja/web/api/document/createrange/index.md
@@ -0,0 +1,47 @@
+---
+title: Document.createRange()
+slug: Web/API/Document/createRange
+tags:
+ - API
+ - DOM
+ - DOM Reference
+ - Document
+ - DocumentRange.createRange
+ - Method
+ - Range
+translation_of: Web/API/Document/createRange
+---
+{{APIRef("DOM")}}
+
+**`Document.createRange()`** メソッドは、新しい {{domxref("Range")}} オブジェクトを返します。
+
+## 構文
+
+```
+range = document.createRange();
+```
+
+_range_ は生成された {{domxref("Range")}} オブジェクトです。
+
+## 例
+
+```js
+let range = document.createRange();
+
+range.setStart(startNode, startOffset);
+range.setEnd(endNode, endOffset);
+```
+
+## 注
+
+`Range` を生成したあと、大部分のメソッドを使用するには境界を設定する必要があります。
+
+## 仕様書
+
+| 仕様書 | 状態 | 備考 |
+| -------------------------------------------------------------------------------------------------------- | -------------------------------- | ---- |
+| {{SpecName('DOM WHATWG', '#dom-document-createrange', 'document.createRange')}} | {{Spec2('DOM WHATWG')}} | |
+
+## ブラウザーの互換性
+
+{{Compat("api.Document.createRange")}}
diff --git a/files/ja/web/api/document/createtextnode/index.html b/files/ja/web/api/document/createtextnode/index.html
deleted file mode 100644
index 155bc42a3f4ee0..00000000000000
--- a/files/ja/web/api/document/createtextnode/index.html
+++ /dev/null
@@ -1,79 +0,0 @@
----
-title: Document.createTextNode()
-slug: Web/API/Document/createTextNode
-tags:
- - API
- - DOM
- - Document
- - Reference
- - createTextNode
- - メソッド
-translation_of: Web/API/Document/createTextNode
----
-
{{APIRef("DOM")}}
-
-
新しい {{domxref("Text")}} ノードを生成します。このメソッドは HTML 文字をエスケープするのに利用できます。
-
-
構文
-
-
var text = document.createTextNode(data);
-
-
-
- - text: {{domxref("Text")}} ノード。
- - data: テキストノードの中に入れるデータが入った文字列。
-
-
-
例
-
-
<!DOCTYPE html>
-<html lang="en">
-<head>
-<title>createTextNode example</title>
-<script>
-function addTextNode(text) {
- var newtext = document.createTextNode(text),
- p1 = document.getElementById("p1");
-
- p1.appendChild(newtext);
-}
-</script>
-</head>
-
-<body>
- <button onclick="addTextNode('YES! ');">YES!</button>
- <button onclick="addTextNode('NO! ');">NO!</button>
- <button onclick="addTextNode('WE CAN! ');">WE CAN!</button>
-
- <hr />
-
- <p id="p1">First line of paragraph.</p>
-</body>
-</html>
-
-
-
-
{{EmbedLiveSample('Example')}}
-
-
仕様書
-
-
-
-
- 仕様書 |
- 状態 |
- 備考 |
-
-
-
-
- {{SpecName('DOM WHATWG', '#dom-document-createtextnode', 'Document: createTextNode')}} |
- {{Spec2('DOM WHATWG')}} |
- |
-
-
-
-
-
ブラウザーの対応
-
-
{{Compat("api.Document.createTextNode")}}
diff --git a/files/ja/web/api/document/createtextnode/index.md b/files/ja/web/api/document/createtextnode/index.md
new file mode 100644
index 00000000000000..193bbcc1434ea9
--- /dev/null
+++ b/files/ja/web/api/document/createtextnode/index.md
@@ -0,0 +1,65 @@
+---
+title: Document.createTextNode()
+slug: Web/API/Document/createTextNode
+tags:
+ - API
+ - DOM
+ - Document
+ - Reference
+ - createTextNode
+ - メソッド
+translation_of: Web/API/Document/createTextNode
+---
+{{APIRef("DOM")}}
+
+新しい {{domxref("Text")}} ノードを生成します。このメソッドは HTML 文字をエスケープするのに利用できます。
+
+## 構文
+
+```
+var text = document.createTextNode(data);
+```
+
+- _text_: {{domxref("Text")}} ノード。
+- _data_: テキストノードの中に入れるデータが入った[文字列](/ja/docs/Web/JavaScript/Reference/Global_Objects/String)。
+
+## 例
+
+```html
+
+
+
+
createTextNode example
+
+
+
+
+
+
+
+
+
+
+
First line of paragraph.
+
+
+```
+
+{{EmbedLiveSample('Example')}}
+
+## 仕様書
+
+| 仕様書 | 状態 | 備考 |
+| -------------------------------------------------------------------------------------------------------------------- | -------------------------------- | ---- |
+| {{SpecName('DOM WHATWG', '#dom-document-createtextnode', 'Document: createTextNode')}} | {{Spec2('DOM WHATWG')}} | |
+
+## ブラウザーの互換性
+
+{{Compat("api.Document.createTextNode")}}
diff --git a/files/ja/web/api/document/createtouch/index.html b/files/ja/web/api/document/createtouch/index.html
deleted file mode 100644
index 3b8eb3107c3c70..00000000000000
--- a/files/ja/web/api/document/createtouch/index.html
+++ /dev/null
@@ -1,116 +0,0 @@
----
-title: Document.createTouch()
-slug: Web/API/Document/createTouch
-tags:
- - API
- - Deprecated
- - HTML DOM
- - Method
- - Mobile
- - Reference
- - createTouch
- - touch
-translation_of: Web/API/Document/createTouch
----
-
{{APIRef("DOM")}}{{Deprecated_Header}}
-
-
-
注: {{Gecko("25.0")}} 以前では、このメソッドは {{DOMxRef("DocumentTouch")}} ミックスインで定義されていました。
-
-
-
Document.createTouch()
メソッドは、新しい {{DOMxRef("Touch")}} オブジェクトを生成して返します。
-
-
構文
-
-
var touch = DocumentTouch.createTouch(view, target, identifier, pageX, pageY,
- screenX, screenY);
-
-
-
引数
-
-
注: すべての引数が省略可能です。
-
-
- view
- - タッチが発生した {{DOMxRef("window")}} です。
- target
- - タッチの {{DOMxRef("EventTarget")}} です。
- identifier
- - {{DOMxRef("Touch.identifier")}} の値です。
- pageX
- - {{DOMxRef("Touch.pageX")}} の値です。
- pageY
- - {{DOMxRef("Touch.pageY")}} の値です。
- screenX
- - {{DOMxRef("Touch.screenX")}} の値です。
- screenY
- - {{DOMxRef("Touch.screenY")}} の値です。
-
-
-
注: このメソッドの以前のバージョンでは、以下の追加の引数を含んでいましたが、これらの引数は下記の標準のいずれにも含まれていません。従って、これらの引数は非推奨であり、使用されないと考えてください。
-
-
- clientX
- - {{DOMxRef("Touch.clientX")}} の値です。
- clientY
- - {{DOMxRef("Touch.clientY")}} の値です。
- radiusX
- - {{DOMxRef("Touch.radiusX")}} の値です。
- radiusY
- - {{DOMxRef("Touch.radiusY")}} の値です。
- rotationAngle
- - {{DOMxRef("Touch.rotationAngle")}} の値です。
- force
- - {{DOMxRef("Touch.force")}} の値です。
-
-
-
返値
-
-
- touch
- - 入力引数で記述されたように構成された {{DOMxRef("Touch")}} オブジェクトです。
-
-
-
例
-
-
この例は {{DOMxRef("Document.createTouch()")}} メソッドを使用して {{DOMxRef("Touch")}} オブジェクトを生成する様子を示しています。
-
-
以下のコードスニペットでは、2つの {{DOMxRef("Touch")}} オブジェクトが target
要素に生成されます。
-
-
var target = document.getElementById("target");
-
-var touch1 = Document.createTouch(window, target, 1, 15, 20, 35, 40);
-var touch2 = Document.createTouch(window, target, 2, 25, 30, 45, 50);
-
-
-
仕様書
-
-
-
-
- 仕様書 |
- 状態 |
- 備考 |
-
-
-
-
- {{SpecName("Touch Events", "#widl-Document-createTouch-Touch-WindowProxy-view-EventTarget-target-long-identifier-long-pageX-long-pageY-long-screenX-long-screenY", "Document.createTouch()")}} |
- {{Spec2("Touch Events")}} |
- 初回定義 |
-
-
-
-
-
ブラウザーの互換性
-
-
{{Compat("api.Document.createTouch")}}
-
-
関連情報
-
-
- - タッチイベント
- - {{DOMxRef("TouchList")}}
- - {{DOMxRef("Touch")}}
- - {{DOMxRef("Document.createTouchList()")}}
-
diff --git a/files/ja/web/api/document/createtouch/index.md b/files/ja/web/api/document/createtouch/index.md
new file mode 100644
index 00000000000000..3e8fd55bc67b64
--- /dev/null
+++ b/files/ja/web/api/document/createtouch/index.md
@@ -0,0 +1,95 @@
+---
+title: Document.createTouch()
+slug: Web/API/Document/createTouch
+tags:
+ - API
+ - Deprecated
+ - HTML DOM
+ - Method
+ - Mobile
+ - Reference
+ - createTouch
+ - touch
+translation_of: Web/API/Document/createTouch
+---
+{{APIRef("DOM")}}{{Deprecated_Header}}
+
+> **Note:** {{Gecko("25.0")}} 以前では、このメソッドは {{DOMxRef("DocumentTouch")}} ミックスインで定義されていました。
+
+**`Document.createTouch()`** メソッドは、新しい {{DOMxRef("Touch")}} オブジェクトを生成して返します。
+
+## 構文
+
+```
+var touch = DocumentTouch.createTouch(view, target, identifier, pageX, pageY,
+ screenX, screenY);
+```
+
+### 引数
+
+> **Note:** すべての引数が省略可能です。
+
+- `view`
+ - : タッチが発生した {{DOMxRef("window")}} です。
+- `target`
+ - : タッチの {{DOMxRef("EventTarget")}} です。
+- `identifier`
+ - : {{DOMxRef("Touch.identifier")}} の値です。
+- `pageX`
+ - : {{DOMxRef("Touch.pageX")}} の値です。
+- `pageY`
+ - : {{DOMxRef("Touch.pageY")}} の値です。
+- `screenX`
+ - : {{DOMxRef("Touch.screenX")}} の値です。
+- `screenY`
+ - : {{DOMxRef("Touch.screenY")}} の値です。
+
+> **Note:** このメソッドの以前のバージョンでは、以下の追加の引数を含んでいましたが、これらの引数は下記の標準のいずれにも含まれていません。従って、これらの引数は非推奨であり、使用されないと考えてください。
+
+- `clientX`
+ - : {{DOMxRef("Touch.clientX")}} の値です。
+- `clientY`
+ - : {{DOMxRef("Touch.clientY")}} の値です。
+- `radiusX`
+ - : {{DOMxRef("Touch.radiusX")}} の値です。
+- `radiusY`
+ - : {{DOMxRef("Touch.radiusY")}} の値です。
+- `rotationAngle`
+ - : {{DOMxRef("Touch.rotationAngle")}} の値です。
+- `force`
+ - : {{DOMxRef("Touch.force")}} の値です。
+
+### 返値
+
+- `touch`
+ - : 入力引数で記述されたように構成された {{DOMxRef("Touch")}} オブジェクトです。
+
+## 例
+
+この例は {{DOMxRef("Document.createTouch()")}} メソッドを使用して {{DOMxRef("Touch")}} オブジェクトを生成する様子を示しています。
+
+以下のコードスニペットでは、2 つの {{DOMxRef("Touch")}} オブジェクトが `target` 要素に生成されます。
+
+```js
+var target = document.getElementById("target");
+
+var touch1 = Document.createTouch(window, target, 1, 15, 20, 35, 40);
+var touch2 = Document.createTouch(window, target, 2, 25, 30, 45, 50);
+```
+
+## 仕様書
+
+| 仕様書 | 状態 | 備考 |
+| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------- | -------- |
+| {{SpecName("Touch Events", "#widl-Document-createTouch-Touch-WindowProxy-view-EventTarget-target-long-identifier-long-pageX-long-pageY-long-screenX-long-screenY", "Document.createTouch()")}} | {{Spec2("Touch Events")}} | 初回定義 |
+
+## ブラウザーの互換性
+
+{{Compat("api.Document.createTouch")}}
+
+## 関連情報
+
+- [タッチイベント](/ja/docs/Web/API/Touch_events)
+- {{DOMxRef("TouchList")}}
+- {{DOMxRef("Touch")}}
+- {{DOMxRef("Document.createTouchList()")}}
diff --git a/files/ja/web/api/document/createtouchlist/index.html b/files/ja/web/api/document/createtouchlist/index.html
deleted file mode 100644
index 5766b6465ce7a0..00000000000000
--- a/files/ja/web/api/document/createtouchlist/index.html
+++ /dev/null
@@ -1,97 +0,0 @@
----
-title: Document.createTouchList()
-slug: Web/API/Document/createTouchList
-tags:
- - API
- - DOM
- - Deprecated
- - Document
- - Method
- - Mobile
- - createTouchList
- - touch
- - タッチパネル
- - メソッド
-translation_of: Web/API/Document/createTouchList
----
-
{{APIRef("DOM")}}{{Deprecated_Header}}
-
-
-
注: {{Gecko("25.0")}} 以前では、このメソッドは {{DOMxRef("DocumentTouch")}} ミックスインで定義されていました。
-
-
-
Document.createTouchList()
メソッドは、新しい {{DOMxRef("TouchList")}} オブジェクトを生成して返します。
-
-
構文
-
-
var list = DocumentTouch.createTouchList([touch1 [, touch2 [, ...]]]);
-
-
-
引数
-
-
- touches
- - 0個以上の {{DOMxRef("Touch")}} オブジェクトです。 注: Firefox は {{DOMxRef("Touch")}} オブジェクトの配列も受け付けます。
-
-
-
返値
-
-
- list
- - {{DOMxRef("TouchList")}} オブジェクトで、
touches
引数で指定された {{DOMxRef("Touch")}} オブジェクトを含みます。
-
-
-
例
-
-
この例は、 {{DOMxRef("Document.createTouchList()")}} メソッドを使用して {{DOMxRef("TouchList")}} オブジェクトを生成する様子を紹介しています。
-
-
以下のコードスニペットでは、いくつかの {{DOMxRef("Touch")}} オブジェクトがタッチ点と共に target
要素に生成され、 {{DOMxRef("TouchList")}} オブジェクトを作成するために使用されます。
-
-
var target = document.getElementById("target");
-
-// Create some touch points
-var touch1 = document.createTouch(window, target, 1, 15, 20, 35, 40);
-var touch2 = document.createTouch(window, target, 2, 25, 30, 45, 50);
-
-// Create an empty TouchList objects
-var list0 = document.createTouchList();
-
-// Create a TouchList with only one Touch object
-var list1 = document.createTouchList(touch1);
-
-// Create a list with two Touch objects
-var list2 = document.createTouchList(touch1, touch2);
-
-
-
仕様書
-
-
-
-
- 仕様書 |
- 状態 |
- 備考 |
-
-
-
-
- {{SpecName("Touch Events", "#widl-Document-createTouchList-TouchList-Touch-touches", "Document.createTouchList()")}} |
- {{Spec2("Touch Events")}} |
- 初回定義 |
-
-
-
-
-
ブラウザーの互換性
-
-
{{Compat("api.Document.createTouchList")}}
-
-
関連情報
-
-
- - タッチイベント
- - {{DOMxRef("Touch")}}
- - {{DOMxRef("TouchEvent")}}
- - {{DOMxRef("TouchList")}}
- - {{DOMxRef("Document.createTouch()")}}
-
diff --git a/files/ja/web/api/document/createtouchlist/index.md b/files/ja/web/api/document/createtouchlist/index.md
new file mode 100644
index 00000000000000..323e8cc4c54a55
--- /dev/null
+++ b/files/ja/web/api/document/createtouchlist/index.md
@@ -0,0 +1,78 @@
+---
+title: Document.createTouchList()
+slug: Web/API/Document/createTouchList
+tags:
+ - API
+ - DOM
+ - Deprecated
+ - Document
+ - Method
+ - Mobile
+ - createTouchList
+ - touch
+ - タッチパネル
+ - メソッド
+translation_of: Web/API/Document/createTouchList
+---
+{{APIRef("DOM")}}{{Deprecated_Header}}
+
+> **Note:** {{Gecko("25.0")}} 以前では、このメソッドは {{DOMxRef("DocumentTouch")}} ミックスインで定義されていました。
+
+**`Document.createTouchList()`** メソッドは、新しい {{DOMxRef("TouchList")}} オブジェクトを生成して返します。
+
+## 構文
+
+```
+var list = DocumentTouch.createTouchList([touch1 [, touch2 [, ...]]]);
+```
+
+### 引数
+
+- `touches`
+ - : 0 個以上の {{DOMxRef("Touch")}} オブジェクトです。 **注:** Firefox は {{DOMxRef("Touch")}} オブジェクトの[配列](/ja/docs/Web/JavaScript/Reference/Global_Objects/Array)も受け付けます。
+
+### 返値
+
+- `list`
+ - : {{DOMxRef("TouchList")}} オブジェクトで、 `touches` 引数で指定された {{DOMxRef("Touch")}} オブジェクトを含みます。
+
+## 例
+
+この例は、 {{DOMxRef("Document.createTouchList()")}} メソッドを使用して {{DOMxRef("TouchList")}} オブジェクトを生成する様子を紹介しています。
+
+以下のコードスニペットでは、いくつかの {{DOMxRef("Touch")}} オブジェクトがタッチ点と共に `target` 要素に生成され、 {{DOMxRef("TouchList")}} オブジェクトを作成するために使用されます。
+
+```js
+var target = document.getElementById("target");
+
+// Create some touch points
+var touch1 = document.createTouch(window, target, 1, 15, 20, 35, 40);
+var touch2 = document.createTouch(window, target, 2, 25, 30, 45, 50);
+
+// Create an empty TouchList objects
+var list0 = document.createTouchList();
+
+// Create a TouchList with only one Touch object
+var list1 = document.createTouchList(touch1);
+
+// Create a list with two Touch objects
+var list2 = document.createTouchList(touch1, touch2);
+```
+
+## 仕様書
+
+| 仕様書 | 状態 | 備考 |
+| ------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------- | -------- |
+| {{SpecName("Touch Events", "#widl-Document-createTouchList-TouchList-Touch-touches", "Document.createTouchList()")}} | {{Spec2("Touch Events")}} | 初回定義 |
+
+## ブラウザーの互換性
+
+{{Compat("api.Document.createTouchList")}}
+
+## 関連情報
+
+- [タッチイベント](/ja/docs/Web/API/Touch_events)
+- {{DOMxRef("Touch")}}
+- {{DOMxRef("TouchEvent")}}
+- {{DOMxRef("TouchList")}}
+- {{DOMxRef("Document.createTouch()")}}
diff --git a/files/ja/web/api/document/currentscript/index.html b/files/ja/web/api/document/currentscript/index.html
deleted file mode 100644
index 17eb7fb52ea7dc..00000000000000
--- a/files/ja/web/api/document/currentscript/index.html
+++ /dev/null
@@ -1,66 +0,0 @@
----
-title: Document.currentScript
-slug: Web/API/Document/currentScript
-tags:
- - API
- - DOM
- - Document
- - Property
- - Reference
- - プロパティ
-translation_of: Web/API/Document/currentScript
----
-
{{APIRef("DOM")}}
-
-
Document.currentScript
プロパティは、現在処理中で、 JavaScript モジュールではないスクリプトの {{HTMLElement("script")}} 要素を返します。 (モジュールの場合は代わりに {{JSxRef("Statements/import%2Emeta", "import.meta")}} を使用してください。
-
-
重要なことですが、スクリプト内のコードがコールバックまたはイベントハンドラーとして呼び出されている場合は、 {{HTMLElement("script")}} 要素を参照しないことに注意してください。初期化時に処理されている要素のみを参照します。
-
-
構文
-
-
var curScriptElement = document.currentScript;
-
-
-
例
-
-
次の例では、スクリプトが非同期で実行されているかどうかをチェックしています。
-
-
if (document.currentScript.async) {
- console.log("非同期で実行中");
-} else {
- console.log("同期で実行中");
-}
-
-
実際の表示を確認
-
-
仕様書
-
-
-
-
- 仕様書 |
- 状態 |
- 備考 |
-
-
-
-
- {{SpecName("HTML WHATWG", "dom.html#dom-document-currentscript", "Document.currentScript")}} |
- {{Spec2("HTML WHATWG")}} |
- 初回定義 |
-
-
-
-
-
ブラウザーの互換性
-
-
{{Compat("api.Document.currentScript")}}
-
-
関連情報
-
-
- - {{JSxRef("Statements/import%2Emeta", "import.meta")}}
- - {{HTMLElement("script")}}
- - {{DOMxRef("document.onafterscriptexecute")}}
- - {{DOMxRef("document.onbeforescriptexecute")}}
-
diff --git a/files/ja/web/api/document/currentscript/index.md b/files/ja/web/api/document/currentscript/index.md
new file mode 100644
index 00000000000000..21c79522d257cb
--- /dev/null
+++ b/files/ja/web/api/document/currentscript/index.md
@@ -0,0 +1,54 @@
+---
+title: Document.currentScript
+slug: Web/API/Document/currentScript
+tags:
+ - API
+ - DOM
+ - Document
+ - Property
+ - Reference
+ - プロパティ
+translation_of: Web/API/Document/currentScript
+---
+{{APIRef("DOM")}}
+
+**`Document.currentScript`** プロパティは、現在処理中で、 [JavaScript モジュールではない](https://github.com/whatwg/html/issues/997)スクリプトの {{HTMLElement("script")}} 要素を返します。 (モジュールの場合は代わりに {{JSxRef("Statements/import%2Emeta", "import.meta")}} を使用してください。
+
+重要なことですが、スクリプト内のコードがコールバックまたはイベントハンドラーとして呼び出されている場合は、 {{HTMLElement("script")}} 要素を参照しないことに注意してください。初期化時に処理されている要素のみを参照します。
+
+## 構文
+
+```
+var curScriptElement = document.currentScript;
+```
+
+## 例
+
+次の例では、スクリプトが非同期で実行されているかどうかをチェックしています。
+
+```js
+if (document.currentScript.async) {
+ console.log("非同期で実行中");
+} else {
+ console.log("同期で実行中");
+}
+```
+
+[実際の表示を確認](/samples/html/currentScript.html)
+
+## 仕様書
+
+| 仕様書 | 状態 | 備考 |
+| ---------------------------------------------------------------------------------------------------------------------------- | -------------------------------- | -------- |
+| {{SpecName("HTML WHATWG", "dom.html#dom-document-currentscript", "Document.currentScript")}} | {{Spec2("HTML WHATWG")}} | 初回定義 |
+
+## ブラウザーの互換性
+
+{{Compat("api.Document.currentScript")}}
+
+## 関連情報
+
+- {{JSxRef("Statements/import%2Emeta", "import.meta")}}
+- {{HTMLElement("script")}}
+- {{DOMxRef("document.onafterscriptexecute")}}
+- {{DOMxRef("document.onbeforescriptexecute")}}
diff --git a/files/ja/web/api/document/cut_event/index.html b/files/ja/web/api/document/cut_event/index.html
deleted file mode 100644
index 36b67a63944e62..00000000000000
--- a/files/ja/web/api/document/cut_event/index.html
+++ /dev/null
@@ -1,74 +0,0 @@
----
-title: 'Document: cut イベント'
-slug: Web/API/Document/cut_event
-tags:
- - API
- - Clipboard API
- - Cut
- - Document
- - Event
- - Reference
- - Web
-translation_of: Web/API/Document/cut_event
----
-
{{APIRef}}
-
-
cut
イベントは、ユーザーがブラウザーのユーザーインターフェイスから切り取り操作を実行したときに発生します。
-
-
-
-
- バブリング |
- あり |
-
-
- キャンセル |
- 可 |
-
-
- インターフェイス |
- {{domxref("ClipboardEvent")}} |
-
-
- イベントハンドラープロパティ |
- {{domxref("HTMLElement/oncut", "oncut")}} |
-
-
-
-
-
このイベントの本来の対象は、切り取り操作の意図の対象である {{domxref("Element")}} です。このイベントを {{domxref("Document")}} インターフェイス上で待ち受けし、キャプチャやバブリングの局面で処理することができます。このイベントの局面について完全な詳細は、 Element: cut イベントを参照してください。
-
-
例
-
-
document.addEventListener('cut', (event) => {
- console.log('cut action initiated')
-});
-
-
仕様書
-
-
-
-
- 仕様書 |
- 状態 |
-
-
-
-
- {{SpecName('Clipboard API', '#clipboard-event-cut')}} |
- {{Spec2('Clipboard API')}} |
-
-
-
-
-
ブラウザーの互換性
-
-
{{Compat("api.Document.cut_event")}}
-
-
関連情報
-
-
- - 関連イベント: {{domxref("Document/copy_event", "copy")}}, {{domxref("Document/paste_event", "paste")}}
- - {{domxref("Element")}} を対象としたこのイベント: {{domxref("Element/cut_event", "cut")}}
- - {{domxref("Document")}} を対象としたこのイベント: {{domxref("Document/cut_event", "cut")}}
-
diff --git a/files/ja/web/api/document/cut_event/index.md b/files/ja/web/api/document/cut_event/index.md
new file mode 100644
index 00000000000000..86d82d6f7ce835
--- /dev/null
+++ b/files/ja/web/api/document/cut_event/index.md
@@ -0,0 +1,63 @@
+---
+title: 'Document: cut イベント'
+slug: Web/API/Document/cut_event
+tags:
+ - API
+ - Clipboard API
+ - Cut
+ - Document
+ - Event
+ - Reference
+ - Web
+translation_of: Web/API/Document/cut_event
+---
+{{APIRef}}
+
+**`cut`** イベントは、ユーザーがブラウザーのユーザーインターフェイスから切り取り操作を実行したときに発生します。
+
+
+
+
+ バブリング |
+ あり |
+
+
+ キャンセル |
+ 可 |
+
+
+ インターフェイス |
+ {{domxref("ClipboardEvent")}} |
+
+
+ イベントハンドラープロパティ |
+ {{domxref("HTMLElement/oncut", "oncut")}} |
+
+
+
+
+このイベントの本来の対象は、切り取り操作の意図の対象である {{domxref("Element")}} です。このイベントを {{domxref("Document")}} インターフェイス上で待ち受けし、キャプチャやバブリングの局面で処理することができます。このイベントの局面について完全な詳細は、 [Element: cut イベント](/ja/docs/Web/API/Element/cut_event)を参照してください。
+
+## 例
+
+```js
+document.addEventListener('cut', (event) => {
+ console.log('cut action initiated')
+});
+```
+
+## 仕様書
+
+| 仕様書 | 状態 |
+| ------------------------------------------------------------------------ | ------------------------------------ |
+| {{SpecName('Clipboard API', '#clipboard-event-cut')}} | {{Spec2('Clipboard API')}} |
+
+## ブラウザーの互換性
+
+{{Compat("api.Document.cut_event")}}
+
+## 関連情報
+
+- 関連イベント: {{domxref("Document/copy_event", "copy")}}, {{domxref("Document/paste_event", "paste")}}
+- {{domxref("Element")}} を対象としたこのイベント: {{domxref("Element/cut_event", "cut")}}
+- {{domxref("Document")}} を対象としたこのイベント: {{domxref("Document/cut_event", "cut")}}
diff --git a/files/ja/web/api/document/defaultview/index.html b/files/ja/web/api/document/defaultview/index.html
deleted file mode 100644
index ee022ee27b464a..00000000000000
--- a/files/ja/web/api/document/defaultview/index.html
+++ /dev/null
@@ -1,30 +0,0 @@
----
-title: Document.defaultView
-slug: Web/API/Document/defaultView
-tags:
-- API
-- Document
-- HTML DOM
-- Property
-- Reference
-browser-compat: api.Document.defaultView
-translation_of: Web/API/Document/defaultView
----
-
{{ApiRef}}
-
-
ブラウザーにおいて、document.defaultView
はドキュメントに関連付けられている {{domxref("Window", "window")}} オブジェクトを返します。もし存在しない場合は null
を返します。
-
-
構文
-
-
var win = document.defaultView;
-
-
このプロパティは読み取り専用です。
-
-
仕様書
-
-{{Specifications}}
-
-
ブラウザーの互換性
-
-
{{Compat}}
diff --git a/files/ja/web/api/document/defaultview/index.md b/files/ja/web/api/document/defaultview/index.md
new file mode 100644
index 00000000000000..a6b1778c24a10b
--- /dev/null
+++ b/files/ja/web/api/document/defaultview/index.md
@@ -0,0 +1,31 @@
+---
+title: Document.defaultView
+slug: Web/API/Document/defaultView
+tags:
+ - API
+ - Document
+ - HTML DOM
+ - Property
+ - Reference
+translation_of: Web/API/Document/defaultView
+browser-compat: api.Document.defaultView
+---
+{{ApiRef}}
+
+ブラウザーにおいて、**`document.defaultView`** はドキュメントに関連付けられている {{domxref("Window", "window")}} オブジェクトを返します。もし存在しない場合は `null` を返します。
+
+## 構文
+
+```js
+var win = document.defaultView;
+```
+
+このプロパティは読み取り専用です。
+
+## 仕様書
+
+{{Specifications}}
+
+## ブラウザーの互換性
+
+{{Compat}}
diff --git a/files/ja/web/api/document/designmode/index.html b/files/ja/web/api/document/designmode/index.html
deleted file mode 100644
index c0a2da4cdef89e..00000000000000
--- a/files/ja/web/api/document/designmode/index.html
+++ /dev/null
@@ -1,64 +0,0 @@
----
-title: Document.designMode
-slug: Web/API/Document/designMode
-tags:
- - API
- - DOM
- - Document
- - HTML DOM
- - Property
- - Reference
- - designmode
- - editor
- - エディター
-translation_of: Web/API/Document/designMode
----
-
{{ApiRef()}}
-
-
document.designMode
は、文書全体を編集可能にするかどうかを制御します。妥当な値は "on"
および "off"
です。仕様書では、このプロパティの既定値は "off"
です。 Firefox はこの標準仕様に従っています。初期のバージョンの Chrome や IE は既定で "inherit"
です。 Chrome 43 以降では、既定値は "off"
であり、 "inherit"
には対応しなくなりました。 IE6~10 では、値が大文字です。
-
-
構文
-
-
var mode = document.designMode;
-document.designMode = value;
-
-
値
-
-
designMode
が on または off のどちらに設定されているか (または設定するか) を示す文字列です。有効な値は on
および off
です。
-
-
例
-
-
{{HTMLElement("iframe")}} の文書を編集可能にします。
-
-
iframeNode.contentDocument.designMode = "on";
-
-
-
仕様書
-
-
-
-
- 仕様書 |
- 状態 |
- 備考 |
-
-
-
-
- {{SpecName('HTML WHATWG', '#making-entire-documents-editable:-the-designmode-idl-attribute', 'designMode')}} |
- {{Spec2('HTML WHATWG')}} |
- 初回定義 |
-
-
-
-
-
ブラウザーの互換性
-
-
{{Compat("api.Document.designMode")}}
-
-
関連情報
-
-
diff --git a/files/ja/web/api/document/designmode/index.md b/files/ja/web/api/document/designmode/index.md
new file mode 100644
index 00000000000000..4c1aaa5e2bf644
--- /dev/null
+++ b/files/ja/web/api/document/designmode/index.md
@@ -0,0 +1,52 @@
+---
+title: Document.designMode
+slug: Web/API/Document/designMode
+tags:
+ - API
+ - DOM
+ - Document
+ - HTML DOM
+ - Property
+ - Reference
+ - designmode
+ - editor
+ - エディター
+translation_of: Web/API/Document/designMode
+---
+{{ApiRef()}}
+
+**`document.designMode`** は、文書全体を編集可能にするかどうかを制御します。妥当な値は `"on"` および `"off"` です。仕様書では、このプロパティの既定値は `"off"` です。 Firefox はこの標準仕様に従っています。初期のバージョンの Chrome や IE は既定で `"inherit"` です。 Chrome 43 以降では、既定値は `"off"` であり、 `"inherit"` には対応しなくなりました。 IE6 ~ 10 では、値が大文字です。
+
+## 構文
+
+```
+var mode = document.designMode;
+document.designMode = value;
+```
+
+### 値
+
+`designMode` が on または off のどちらに設定されているか (または設定するか) を示す文字列です。有効な値は `on` および `off` です。
+
+## 例
+
+{{HTMLElement("iframe")}} の文書を編集可能にします。
+
+```js
+iframeNode.contentDocument.designMode = "on";
+```
+
+## 仕様書
+
+| 仕様書 | 状態 | 備考 |
+| ------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------- | -------- |
+| {{SpecName('HTML WHATWG', '#making-entire-documents-editable:-the-designmode-idl-attribute', 'designMode')}} | {{Spec2('HTML WHATWG')}} | 初回定義 |
+
+## ブラウザーの互換性
+
+{{Compat("api.Document.designMode")}}
+
+## 関連情報
+
+- [Mozilla におけるリッチテキスト編集](/ja/docs/Rich-Text_Editing_in_Mozilla)
+- {{domxref("HTMLElement.contentEditable")}}
diff --git a/files/ja/web/api/document/dir/index.html b/files/ja/web/api/document/dir/index.html
deleted file mode 100644
index 60a685df0ad71b..00000000000000
--- a/files/ja/web/api/document/dir/index.html
+++ /dev/null
@@ -1,49 +0,0 @@
----
-title: Document.dir
-slug: Web/API/Document/dir
-tags:
- - API
- - Document
- - HTML DOM
- - Reference
- - プロパティ
-translation_of: Web/API/Document/dir
----
-
{{ApiRef("HTML DOM")}}
-
-
Document.dir
プロパティは {{domxref("DOMString")}} で、文書のテキストの書字方向が、左書き (既定) か右書きかを表します。有効な値は 'rtl'
右書き (右から左)、または 'ltr'
左書き (左から右) です。
-
-
構文
-
-
dirStr = document.dir
-document.dir = dirStr
-
-
-
仕様書
-
-
-
-
- 仕様書 |
- 状態 |
- 備考 |
-
-
-
-
- {{SpecName("HTML WHATWG", "#dom-document-dir", "Document.dir")}} |
- {{Spec2("HTML WHATWG")}} |
- 初回定義 |
-
-
-
-
-
ブラウザーの互換性
-
-
{{Compat("api.Document.dir")}}
-
-
関連情報
-
-
diff --git a/files/ja/web/api/document/dir/index.md b/files/ja/web/api/document/dir/index.md
new file mode 100644
index 00000000000000..f5b9ea3e4297d1
--- /dev/null
+++ b/files/ja/web/api/document/dir/index.md
@@ -0,0 +1,35 @@
+---
+title: Document.dir
+slug: Web/API/Document/dir
+tags:
+ - API
+ - Document
+ - HTML DOM
+ - Reference
+ - プロパティ
+translation_of: Web/API/Document/dir
+---
+{{ApiRef("HTML DOM")}}
+
+**`Document.dir`** プロパティは {{domxref("DOMString")}} で、文書のテキストの書字方向が、左書き (既定) か右書きかを表します。有効な値は `'rtl'` 右書き (右から左)、または `'ltr'` 左書き (左から右) です。
+
+## 構文
+
+```
+dirStr = document.dir
+document.dir = dirStr
+```
+
+## 仕様書
+
+| 仕様書 | 状態 | 備考 |
+| ------------------------------------------------------------------------------------ | -------------------------------- | -------- |
+| {{SpecName("HTML WHATWG", "#dom-document-dir", "Document.dir")}} | {{Spec2("HTML WHATWG")}} | 初回定義 |
+
+## ブラウザーの互換性
+
+{{Compat("api.Document.dir")}}
+
+## 関連情報
+
+- [`dir`](/ja/docs/Web/HTML/Global_attributes/dir) グローバル属性
diff --git a/files/ja/web/api/document/doctype/index.html b/files/ja/web/api/document/doctype/index.html
deleted file mode 100644
index b2ff8cb2446635..00000000000000
--- a/files/ja/web/api/document/doctype/index.html
+++ /dev/null
@@ -1,64 +0,0 @@
----
-title: Document.doctype
-slug: Web/API/Document/doctype
-tags:
- - API
- - DOCTYPE
- - DOM
- - Document
- - Reference
- - プロパティ
-translation_of: Web/API/Document/doctype
----
-
{{ApiRef("DOM")}}
-
-
現在の文書に関連付けられた文書型宣言 (DTD) を返します。返されるオブジェクトは、 {{domxref("DocumentType")}} インターフェイスを持ちます。 DocumentType
を生成するには {{domxref("DOMImplementation.createDocumentType()")}} を使用してください。
-
-
構文
-
-
doctype = document.doctype;
-
-
-
- doctype
: 読み取り専用のプロパティです。
-
-
-
例
-
-
var doctypeObj = document.doctype;
-
-console.log(
- "doctypeObj.name: " + doctypeObj.name + "\n" +
- "doctypeObj.internalSubset: " + doctypeObj.internalSubset + "\n" +
- "doctypeObj.publicId: " + doctypeObj.publicId + "\n" +
- "doctypeObj.systemId: " + doctypeObj.systemId
-);
-
-
メモ
-
-
現在の文書に関連付けられている DTD が存在しないは null
が返されます。
-
-
DOM レベル 2 では、文書型宣言の編集に対応していません。
-
-
仕様書
-
-
-
-
- 仕様書 |
- 状態 |
- 備考 |
-
-
-
-
- {{SpecName('DOM WHATWG', '#dom-document-doctype', 'Document: doctype')}} |
- {{Spec2('DOM WHATWG')}} |
- |
-
-
-
-
-
ブラウザーの対応
-
-
{{Compat("api.Document.doctype")}}
diff --git a/files/ja/web/api/document/doctype/index.md b/files/ja/web/api/document/doctype/index.md
new file mode 100644
index 00000000000000..03e974724a05a0
--- /dev/null
+++ b/files/ja/web/api/document/doctype/index.md
@@ -0,0 +1,52 @@
+---
+title: Document.doctype
+slug: Web/API/Document/doctype
+tags:
+ - API
+ - DOCTYPE
+ - DOM
+ - Document
+ - Reference
+ - プロパティ
+translation_of: Web/API/Document/doctype
+---
+{{ApiRef("DOM")}}
+
+現在の文書に関連付けられた文書型宣言 (Document Type Declaration) (DTD) を返します。返されるオブジェクトは、 {{domxref("DocumentType")}} インターフェイスを持ちます。 `DocumentType` を生成するには {{domxref("DOMImplementation.createDocumentType()")}} を使用してください。
+
+## 構文
+
+```
+doctype = document.doctype;
+```
+
+- `doctype` : 読み取り専用のプロパティです。
+
+## 例
+
+```js
+var doctypeObj = document.doctype;
+
+console.log(
+ "doctypeObj.name: " + doctypeObj.name + "\n" +
+ "doctypeObj.internalSubset: " + doctypeObj.internalSubset + "\n" +
+ "doctypeObj.publicId: " + doctypeObj.publicId + "\n" +
+ "doctypeObj.systemId: " + doctypeObj.systemId
+);
+```
+
+## メモ
+
+現在の文書に関連付けられている DTD が存在しないは `null` が返されます。
+
+DOM レベル 2 では、文書型宣言の編集に対応していません。
+
+## 仕様書
+
+| 仕様書 | 状態 | 備考 |
+| ------------------------------------------------------------------------------------------------ | -------------------------------- | ---- |
+| {{SpecName('DOM WHATWG', '#dom-document-doctype', 'Document: doctype')}} | {{Spec2('DOM WHATWG')}} | |
+
+## ブラウザーの互換性
+
+{{Compat("api.Document.doctype")}}
diff --git a/files/ja/web/api/document/document/index.html b/files/ja/web/api/document/document/index.html
deleted file mode 100644
index 9af2b27e16d6ca..00000000000000
--- a/files/ja/web/api/document/document/index.html
+++ /dev/null
@@ -1,42 +0,0 @@
----
-title: Document()
-slug: Web/API/Document/Document
-tags:
- - API
- - DOM
- - Document
- - Reference
- - コンストラクター
-translation_of: Web/API/Document/Document
----
-
{{APIRef}}
-
-
Document
コンストラクターは、ブラウザーに読み込まれたウェブページである {{domxref("Document")}} オブジェクトを新たに生成し、そのページの内容へのエントリーポイントを提供します。
-
-
構文
-
-
new Document();
-
-
-
仕様書
-
-
-
-
- 仕様書 |
- 状態 |
- 備考 |
-
-
-
-
- {{SpecName('DOM WHATWG','#dom-document-document','Document')}} |
- {{Spec2('DOM WHATWG')}} |
- 初回定義 |
-
-
-
-
-
ブラウザーの互換性
-
-
{{Compat("api.Document.Document")}}
diff --git a/files/ja/web/api/document/document/index.md b/files/ja/web/api/document/document/index.md
new file mode 100644
index 00000000000000..8744ed6da66418
--- /dev/null
+++ b/files/ja/web/api/document/document/index.md
@@ -0,0 +1,30 @@
+---
+title: Document()
+slug: Web/API/Document/Document
+tags:
+ - API
+ - DOM
+ - Document
+ - Reference
+ - コンストラクター
+translation_of: Web/API/Document/Document
+---
+{{APIRef}}
+
+**`Document`** コンストラクターは、ブラウザーに読み込まれたウェブページである {{domxref("Document")}} オブジェクトを新たに生成し、そのページの内容へのエントリーポイントを提供します。
+
+## 構文
+
+```
+new Document();
+```
+
+## 仕様書
+
+| 仕様書 | 状態 | 備考 |
+| ------------------------------------------------------------------------------------ | -------------------------------- | -------- |
+| {{SpecName('DOM WHATWG','#dom-document-document','Document')}} | {{Spec2('DOM WHATWG')}} | 初回定義 |
+
+## ブラウザーの互換性
+
+{{Compat("api.Document.Document")}}
diff --git a/files/ja/web/api/document/documentelement/index.html b/files/ja/web/api/document/documentelement/index.html
deleted file mode 100644
index 0bafaeff0b7439..00000000000000
--- a/files/ja/web/api/document/documentelement/index.html
+++ /dev/null
@@ -1,60 +0,0 @@
----
-title: Document.documentElement
-slug: Web/API/Document/documentElement
-tags:
- - API
- - DOM
- - Document
- - Node
- - Reference
- - documentElement
- - root
- - プロパティ
-translation_of: Web/API/Document/documentElement
----
-
{{ApiRef("DOM")}}
-
-
Document.documentElement
は、その {{domxref("document")}} のルート要素 (例えば、 HTML 文書の場合は {{HTMLElement("html")}} 要素) である {{domxref("Element")}} を返します。
-
-
構文
-
-
const element = document.documentElement
-
-
-
例
-
-
const rootElement = document.documentElement;
-const firstTier = rootElement.childNodes;
-// firstTier は <head> や <body> などの
-// ルート要素の直接の子である NodeList
-
-for (const child of firstTier) {
- // ルート要素のそれぞれの直接の子に対する処理
-}
-
-
メモ
-
-
空ではない HTML 文章の場合、 documentElement
は常に {{HTMLElement("html")}} 要素を返します。空ではない XML 文章の場合、 documentElement
は常に文章のルート要素である何らかの要素を返します。
-
-
仕様書
-
-
-
-
- 仕様書 |
- 状態 |
- 備考 |
-
-
-
-
- {{SpecName('DOM WHATWG','#dom-document-documentelement','Document.documentElement')}} |
- {{Spec2('DOM WHATWG')}} |
- |
-
-
-
-
-
ブラウザーの互換性
-
-
{{Compat("api.Document.documentElement")}}
diff --git a/files/ja/web/api/document/documentelement/index.md b/files/ja/web/api/document/documentelement/index.md
new file mode 100644
index 00000000000000..81eb6a5dfe607b
--- /dev/null
+++ b/files/ja/web/api/document/documentelement/index.md
@@ -0,0 +1,50 @@
+---
+title: Document.documentElement
+slug: Web/API/Document/documentElement
+tags:
+ - API
+ - DOM
+ - Document
+ - Node
+ - Reference
+ - documentElement
+ - root
+ - プロパティ
+translation_of: Web/API/Document/documentElement
+---
+{{ApiRef("DOM")}}
+
+**`Document.documentElement`** は、その {{domxref("document")}} のルート要素 (例えば、 HTML 文書の場合は {{HTMLElement("html")}} 要素) である {{domxref("Element")}} を返します。
+
+## 構文
+
+```
+const element = document.documentElement
+```
+
+## 例
+
+```js
+const rootElement = document.documentElement;
+const firstTier = rootElement.childNodes;
+// firstTier は や などの
+// ルート要素の直接の子である NodeList
+
+for (const child of firstTier) {
+ // ルート要素のそれぞれの直接の子に対する処理
+}
+```
+
+## メモ
+
+空ではない HTML 文章の場合、 `documentElement` は常に {{HTMLElement("html")}} 要素を返します。空ではない XML 文章の場合、 `documentElement` は常に文章のルート要素である何らかの要素を返します。
+
+## 仕様書
+
+| 仕様書 | 状態 | 備考 |
+| ---------------------------------------------------------------------------------------------------------------- | -------------------------------- | ---- |
+| {{SpecName('DOM WHATWG','#dom-document-documentelement','Document.documentElement')}} | {{Spec2('DOM WHATWG')}} | |
+
+## ブラウザーの互換性
+
+{{Compat("api.Document.documentElement")}}
diff --git a/files/ja/web/api/document/documenturi/index.html b/files/ja/web/api/document/documenturi/index.html
deleted file mode 100644
index 7451aefcfc5e44..00000000000000
--- a/files/ja/web/api/document/documenturi/index.html
+++ /dev/null
@@ -1,69 +0,0 @@
----
-title: Document.documentURI
-slug: Web/API/Document/documentURI
-tags:
-- API
-- DOM
-- Document
-- Property
-- Read-only
-- Reference
- - Web
- - プロパティ
-translation_of: Web/API/Document/documentURI
----
-
{{ApiRef("DOM")}}
-
-
{{domxref("Document")}} インターフェイスの documentURI
プロパティは、文書の位置を文字列で返します。
-
-
構文
-
-
const uri = document.documentURI
-
-
-
例
-
-
JavaScript
-
-
document.getElementById("url").textContent = document.documentURI;
-
-
HTML
-
-
<p id="urlText">
- URL:<br/>
- <span id="url">URL goes here</span>
-</p>
-
-
結果
-
-
{{EmbedLiveSample("Example", "100%", 100)}}
-
-
仕様書
-
-
-
-
- 仕様書 |
- 状態 |
- 備考 |
-
-
-
-
- {{SpecName('DOM WHATWG', '#dom-document-documenturi','documentURI')}} |
- {{Spec2('DOM WHATWG')}} |
- |
-
-
-
-
-
ブラウザーの互換性
-
-
{{Compat("api.Document.documentURI")}}
-
-
関連情報
-
-
- - 同じ値を返す {{domxref("document.URL")}} プロパティ
-
diff --git a/files/ja/web/api/document/documenturi/index.md b/files/ja/web/api/document/documenturi/index.md
new file mode 100644
index 00000000000000..46d2ca6922ca2f
--- /dev/null
+++ b/files/ja/web/api/document/documenturi/index.md
@@ -0,0 +1,56 @@
+---
+title: Document.documentURI
+slug: Web/API/Document/documentURI
+tags:
+ - API
+ - DOM
+ - Document
+ - Property
+ - Read-only
+ - Reference - Web - プロパティ
+translation_of: Web/API/Document/documentURI
+---
+{{ApiRef("DOM")}}
+
+{{domxref("Document")}} インターフェイスの **`documentURI`** プロパティは、文書の位置を文字列で返します。
+
+## 構文
+
+```js
+const uri = document.documentURI
+```
+
+## 例
+
+### JavaScript
+
+```js
+document.getElementById("url").textContent = document.documentURI;
+```
+
+### HTML
+
+```html
+
+ URL:
+ URL goes here
+
+```
+
+### 結果
+
+{{EmbedLiveSample("Example", "100%", 100)}}
+
+## 仕様書
+
+| 仕様書 | 状態 | 備考 |
+| -------------------------------------------------------------------------------------------- | -------------------------------- | ---- |
+| {{SpecName('DOM WHATWG', '#dom-document-documenturi','documentURI')}} | {{Spec2('DOM WHATWG')}} | |
+
+## ブラウザーの互換性
+
+{{Compat("api.Document.documentURI")}}
+
+## 関連情報
+
+- 同じ値を返す {{domxref("document.URL")}} プロパティ
diff --git a/files/ja/web/api/document/documenturiobject/index.html b/files/ja/web/api/document/documenturiobject/index.html
deleted file mode 100644
index d28d29a2bc2466..00000000000000
--- a/files/ja/web/api/document/documenturiobject/index.html
+++ /dev/null
@@ -1,44 +0,0 @@
----
-title: Document.documentURIObject
-slug: Web/API/Document/documentURIObject
-tags:
- - API
- - DOM
- - Non-standard
- - Reference
- - プロパティ
- - 標準外
-translation_of: Web/API/Document/documentURIObject
----
-
{{ApiRef("DOM")}}{{Non-standard_header}}
-
-
Document.documentURIObject
プロパティは読み取り専用で、 document の URI を表す nsIURI
オブジェクトを返します。
-
-
このプロパティは、拡張機能のコードなどの (UniversalXPConnect) 特権を持つスクリプトでのみ機能します。ウェブコンテンツではこのプロパティは特別な意味を持たず、他のカスタムプロパティと同様に扱うことしかできません。
-
-
特権コードでは、(XPCNativeWrapper
の wrappedJSObject
などの) ラップされていないコンテンツオブジェクトに対してこのプロパティを取得または設定しないように注意しなければなりません。詳しくは {{Bug(324464)}} のコメントを参照して下さい。
-
-
構文
-
-
var uri = document.documentURIObject;
-
-
-
例
-
-
// Firefox の現在のタブの URI スキームが "http" かどうか調べる
-// このコードは browser.xul のコンテキストで実行されるものとする
-var uriObj = content.document.documentURIObject;
-var uriPort = uriObj.port;
-
-if (uriObj.schemeIs('http')) {
- ...
-}
-
-
-
仕様書
-
-
どの仕様にも属しません。
-
-
ブラウザーの対応
-
-
{{Compat("api.Document.documentURIObject")}}
diff --git a/files/ja/web/api/document/documenturiobject/index.md b/files/ja/web/api/document/documenturiobject/index.md
new file mode 100644
index 00000000000000..1adff14314c14b
--- /dev/null
+++ b/files/ja/web/api/document/documenturiobject/index.md
@@ -0,0 +1,46 @@
+---
+title: Document.documentURIObject
+slug: Web/API/Document/documentURIObject
+tags:
+ - API
+ - DOM
+ - Non-standard
+ - Reference
+ - プロパティ
+ - 標準外
+translation_of: Web/API/Document/documentURIObject
+---
+{{ApiRef("DOM")}}{{Non-standard_header}}
+
+**`Document.documentURIObject`** プロパティは読み取り専用で、 [document](/ja/docs/Web/API/document) の URI を表す `nsIURI` オブジェクトを返します。
+
+このプロパティは、拡張機能のコードなどの (UniversalXPConnect) 特権を持つスクリプトでのみ機能します。ウェブコンテンツではこのプロパティは特別な意味を持たず、他のカスタムプロパティと同様に扱うことしかできません。
+
+特権コードでは、([`XPCNativeWrapper`](/ja/XPCNativeWrapper) の `wrappedJSObject` などの) ラップされていないコンテンツオブジェクトに対してこのプロパティを取得または設定しないように注意しなければなりません。詳しくは {{Bug(324464)}} のコメントを参照して下さい。
+
+## 構文
+
+```
+var uri = document.documentURIObject;
+```
+
+## 例
+
+```js
+// Firefox の現在のタブの URI スキームが "http" かどうか調べる
+// このコードは browser.xul のコンテキストで実行されるものとする
+var uriObj = content.document.documentURIObject;
+var uriPort = uriObj.port;
+
+if (uriObj.schemeIs('http')) {
+ ...
+}
+```
+
+## 仕様書
+
+どの仕様にも属しません。
+
+## ブラウザーの互換性
+
+{{Compat("api.Document.documentURIObject")}}
diff --git a/files/ja/web/api/document/domain/index.html b/files/ja/web/api/document/domain/index.html
deleted file mode 100644
index 5a8651f5bfa837..00000000000000
--- a/files/ja/web/api/document/domain/index.html
+++ /dev/null
@@ -1,89 +0,0 @@
----
-title: Document.domain
-slug: Web/API/Document/domain
-tags:
- - API
- - Document
- - HTML DOM
- - Property
- - Reference
-translation_of: Web/API/Document/domain
----
-
{{ApiRef}}
-
-
{{domxref("Document")}} インターフェイスの domain
プロパティは、同一オリジンポリシーで使用される現在の文書の{{glossary("origin", "オリジン")}}のうち、ドメインの部分を取得または設定します。
-
-
このプロパティが正常に設定されると、オリジンのポート番号の部分も {{jsxref("null")}} に設定されます。
-
-
構文
-
-
const domainString = document.domain
-document.domain = domainString
-
-
値
-
-
現在の文書のオリジンのうち、ドメインの部分です。
-
-
例外
-
-
- SecurityError
- - 以下の状況のうちの一つで、
domain
を設定することが試みられた。
-
- - 文書がサンドボックス化された {{htmlelement("iframe")}} の中にある場合
- - 文書に{{glossary("browsing context", "閲覧コンテキスト")}}がない場合
- - 文書の影響ドメインが
null
の場合
- - 指定された値が文書の影響ドメインと一致しない (または登録可能なドメインの接頭辞ではない) 場合
- - {{HTTPHeader("Feature-Policy")}} の {{httpheader('Feature-Policy/document-domain','document-domain')}} が有効の場合
-
-
-
-
-
例
-
-
ドメイン名の取得
-
-
http://developer.mozilla.org/en-US/docs/Web
の URI において、この例は currentDomain
に "developer.mozilla.org
" の文字列を設定します。
-
-
const currentDomain = document.domain;
-
-
ウィンドウを閉じる
-
-
文書が www.example.xxx/good.html
のような "www.example.xxx
" のドメインを持つ場合、この例はウィンドウを閉じようとします。
-
-
const badDomain = "www.example.xxx";
-
-if (document.domain === badDomain) {
- // 単なる例: window.close() は効果がないことがある
- window.close();
-}
-
-
-
仕様書
-
-
-
-
- 仕様書 |
- 状態 |
- 備考 |
-
-
-
-
- {{SpecName('HTML WHATWG','origin.html#relaxing-the-same-origin-restriction','Document.domain')}} |
- {{Spec2('HTML WHATWG')}} |
- |
-
-
-
-
-
ブラウザーの互換性
-
-
{{Compat("api.Document.domain")}}
-
-
関連情報
-
-
diff --git a/files/ja/web/api/document/domain/index.md b/files/ja/web/api/document/domain/index.md
new file mode 100644
index 00000000000000..263df59dd114af
--- /dev/null
+++ b/files/ja/web/api/document/domain/index.md
@@ -0,0 +1,76 @@
+---
+title: Document.domain
+slug: Web/API/Document/domain
+tags:
+ - API
+ - Document
+ - HTML DOM
+ - Property
+ - Reference
+translation_of: Web/API/Document/domain
+---
+{{ApiRef}}
+
+{{domxref("Document")}} インターフェイスの **`domain`** プロパティは、[同一オリジンポリシー](/ja/docs/Web/Security/Same-origin_policy)で使用される現在の文書の{{glossary("origin", "オリジン")}}のうち、ドメインの部分を取得または設定します。
+
+このプロパティが正常に設定されると、オリジンのポート番号の部分も {{jsxref("null")}} に設定されます。
+
+## 構文
+
+```
+const domainString = document.domain
+document.domain = domainString
+```
+
+### 値
+
+現在の文書のオリジンのうち、ドメインの部分です。
+
+### 例外
+
+- `SecurityError`
+
+ - : 以下の状況のうちの一つで、 `domain` を設定することが試みられた。
+
+ - 文書がサンドボックス化された {{htmlelement("iframe")}} の中にある場合
+ - 文書に{{glossary("browsing context", "閲覧コンテキスト")}}がない場合
+ - 文書の[影響ドメイン](https://html.spec.whatwg.org/multipage/origin.html#concept-origin-effective-domain)が `null` の場合
+ - 指定された値が文書の影響ドメインと一致しない (または登録可能なドメインの接頭辞ではない) 場合
+ - {{HTTPHeader("Feature-Policy")}} の {{httpheader('Feature-Policy/document-domain','document-domain')}} が有効の場合
+
+## 例
+
+### ドメイン名の取得
+
+`http://developer.mozilla.org/en-US/docs/Web` の URI において、この例は `currentDomain` に "`developer.mozilla.org`" の文字列を設定します。
+
+```js
+const currentDomain = document.domain;
+```
+
+### ウィンドウを閉じる
+
+文書が `www.example.xxx/good.html` のような "`www.example.xxx`" のドメインを持つ場合、この例はウィンドウを閉じようとします。
+
+```js
+const badDomain = "www.example.xxx";
+
+if (document.domain === badDomain) {
+ // 単なる例: window.close() は効果がないことがある
+ window.close();
+}
+```
+
+## 仕様書
+
+| 仕様書 | 状態 | 備考 |
+| -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------- | ---- |
+| {{SpecName('HTML WHATWG','origin.html#relaxing-the-same-origin-restriction','Document.domain')}} | {{Spec2('HTML WHATWG')}} | |
+
+## ブラウザーの互換性
+
+{{Compat("api.Document.domain")}}
+
+## 関連情報
+
+- [同一オリジンポリシー](/ja/docs/Web/Security/Same-origin_policy)
diff --git a/files/ja/web/api/document/domcontentloaded_event/index.html b/files/ja/web/api/document/domcontentloaded_event/index.html
deleted file mode 100644
index c89a7ebfcb0fa9..00000000000000
--- a/files/ja/web/api/document/domcontentloaded_event/index.html
+++ /dev/null
@@ -1,188 +0,0 @@
----
-title: 'Document: DOMContentLoaded イベント'
-slug: Web/API/Document/DOMContentLoaded_event
-tags:
- - API
- - DOMContentLoaded
- - Document
- - Event
- - Web
-translation_of: Web/API/Document/DOMContentLoaded_event
----
-
{{APIRef}}
-
-
DOMContentLoaded
イベントは、 HTML の初期文書が完全に読み込まれ解釈された時点で発生し、スタイルシート、画像、サブフレームの読み込みが完了するのを待ちません。
-
-
-
-
- バブリング |
- あり |
-
-
- キャンセル |
- 可 (ただし、キャンセル可能ではない単純イベントとして定義されている) |
-
-
- インターフェイス |
- {{domxref("Event")}} |
-
-
- イベントハンドラープロパティ |
- なし |
-
-
-
-
-
別なイベントである {{domxref("Window/load_event", "load")}} は、ページ全体が読み込まれたときにのみ使用します。 load
を DOMContentLoaded
がより適切である場面で使ってしまうことがよくある誤りです。
-
-
同期 JavaScript は DOM の解析をいったん中断します。ユーザーがページをリクエストした後でできるだけ早く DOM が解析されるようにしたい場合は、 JavaScript を非同期にして、スタイルシートの読み込みを最適化してください。ふつう通りに読み込むと、スタイルシートは HTML と並行で読み込まれ、中心となる HTML 文書の帯域を「盗む」ため、ふつう通りに読み込むと DOM 解析の速度を低下させます。
-
-
例
-
-
基本的な使用
-
-
document.addEventListener('DOMContentLoaded', (event) => {
- console.log('DOM fully loaded and parsed');
-});
-
-
-
DOMContentLoaded の遅延
-
-
<script>
- document.addEventListener('DOMContentLoaded', (event) => {
- console.log('DOM fully loaded and parsed');
- });
-
-for( let i = 0; i < 1000000000; i++)
-{} // This synchronous script is going to delay parsing of the DOM,
- // so the DOMContentLoaded event is going to launch later.
-</script>
-
-
-
読み込みが完了しているかどうかのチェック
-
-
DOMContentLoaded
はスクリプト実行の機会がある前に発生することがあるため、リスナーを追加する前にチェックするのが賢明です。
-
-
function doSomething() {
- console.info('DOM loaded');
-}
-
-if (document.readyState === 'loading') { // Loading hasn't finished yet
- document.addEventListener('DOMContentLoaded', doSomething);
-} else { // `DOMContentLoaded` has already fired
- doSomething();
-}
-
-
-
ライブデモ
-
-
HTML
-
-
<div class="controls">
- <button id="reload" type="button">Reload</button>
-</div>
-
-<div class="event-log">
- <label>Event log:</label>
- <textarea readonly class="event-log-contents" rows="8" cols="30"></textarea>
-</div>
-
-
-
CSS
-
-
body {
- display: grid;
- grid-template-areas: "control log";
-}
-
-.controls {
- grid-area: control;
- display: flex;
- align-items: center;
- justify-content: center;
-}
-
-.event-log {
- grid-area: log;
-}
-
-.event-log-contents {
- resize: none;
-}
-
-label, button {
- display: block;
-}
-
-#reload {
- height: 2rem;
-}
-
-
-
-
-
JS
-
-
const log = document.querySelector('.event-log-contents');
-const reload = document.querySelector('#reload');
-
-reload.addEventListener('click', () => {
- log.textContent ='';
- window.setTimeout(() => {
- window.location.reload(true);
- }, 200);
-});
-
-window.addEventListener('load', (event) => {
- log.textContent = log.textContent + 'load\n';
-});
-
-document.addEventListener('readystatechange', (event) => {
- log.textContent = log.textContent + `readystate: ${document.readyState}\n`;
-});
-
-document.addEventListener('DOMContentLoaded', (event) => {
- log.textContent = log.textContent + `DOMContentLoaded\n`;
-});
-
-
-
-
結果
-
-
{{ EmbedLiveSample('Live_example', '100%', '160px') }}
-
-
仕様書
-
-
-
-
- 仕様書 |
- 状態 |
- 備考 |
-
-
- {{SpecName('HTML WHATWG', '#stop-parsing', 'DOMContentLoaded')}} |
- {{Spec2('HTML WHATWG')}} |
- |
-
-
-
-
- {{SpecName('HTML5 W3C', 'syntax.html#the-end', 'DOMContentLoaded')}} |
- {{Spec2('HTML5 W3C')}} |
- |
-
-
-
-
-
ブラウザーの互換性
-
-
{{Compat("api.Document.DOMContentLoaded_event")}}
-
-
関連情報
-
-
- - 関連イベント: {{domxref("Window/load_event", "load")}}, {{domxref("Document/readystatechange_event", "readystatechange")}}, {{domxref("Window/beforeunload_event", "beforeunload")}}, {{domxref("Window/unload_event", "unload")}}
- - {{domxref("Window")}} を対象とした同じイベント: {{domxref("Window/DOMContentLoaded_event", "DOMContentLoaded")}}
-
diff --git a/files/ja/web/api/document/domcontentloaded_event/index.md b/files/ja/web/api/document/domcontentloaded_event/index.md
new file mode 100644
index 00000000000000..5376e85b596882
--- /dev/null
+++ b/files/ja/web/api/document/domcontentloaded_event/index.md
@@ -0,0 +1,172 @@
+---
+title: 'Document: DOMContentLoaded イベント'
+slug: Web/API/Document/DOMContentLoaded_event
+tags:
+ - API
+ - DOMContentLoaded
+ - Document
+ - Event
+ - Web
+translation_of: Web/API/Document/DOMContentLoaded_event
+---
+{{APIRef}}
+
+**`DOMContentLoaded`** イベントは、 HTML の初期文書が完全に読み込まれ解釈された時点で発生し、スタイルシート、画像、サブフレームの読み込みが完了するのを待ちません。
+
+
+
+
+ バブリング |
+ あり |
+
+
+ キャンセル |
+
+ 可 (ただし、キャンセル可能ではない単純イベントとして定義されている)
+ |
+
+
+ インターフェイス |
+ {{domxref("Event")}} |
+
+
+ イベントハンドラープロパティ |
+ なし |
+
+
+
+
+別なイベントである {{domxref("Window/load_event", "load")}} は、ページ全体が読み込まれたときにのみ使用します。 `load` を `DOMContentLoaded` がより適切である場面で使ってしまうことがよくある誤りです。
+
+同期 JavaScript は DOM の解析をいったん中断します。ユーザーがページをリクエストした後でできるだけ早く DOM が解析されるようにしたい場合は、 [JavaScript を非同期に](/ja/docs/Web/API/XMLHttpRequest/Synchronous_and_Asynchronous_Requests)して、[スタイルシートの読み込みを最適化](https://developers.google.com/speed/docs/insights/OptimizeCSSDelivery)してください。ふつう通りに読み込むと、スタイルシートは HTML と並行で読み込まれ、中心となる HTML 文書の帯域を「盗む」ため、ふつう通りに読み込むと DOM 解析の速度を低下させます。
+
+## 例
+
+### 基本的な使用
+
+```js
+document.addEventListener('DOMContentLoaded', (event) => {
+ console.log('DOM fully loaded and parsed');
+});
+```
+
+### DOMContentLoaded の遅延
+
+```html
+
+```
+
+### 読み込みが完了しているかどうかのチェック
+
+`DOMContentLoaded` はスクリプト実行の機会がある前に発生することがあるため、リスナーを追加する前にチェックするのが賢明です。
+
+```js
+function doSomething() {
+ console.info('DOM loaded');
+}
+
+if (document.readyState === 'loading') { // Loading hasn't finished yet
+ document.addEventListener('DOMContentLoaded', doSomething);
+} else { // `DOMContentLoaded` has already fired
+ doSomething();
+}
+```
+
+### ライブデモ
+
+#### HTML
+
+```html
+
+
+
+
+
+
+
+
+```
+
+```css hidden
+body {
+ display: grid;
+ grid-template-areas: "control log";
+}
+
+.controls {
+ grid-area: control;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+
+.event-log {
+ grid-area: log;
+}
+
+.event-log-contents {
+ resize: none;
+}
+
+label, button {
+ display: block;
+}
+
+#reload {
+ height: 2rem;
+}
+```
+
+#### JS
+
+```js
+const log = document.querySelector('.event-log-contents');
+const reload = document.querySelector('#reload');
+
+reload.addEventListener('click', () => {
+ log.textContent ='';
+ window.setTimeout(() => {
+ window.location.reload(true);
+ }, 200);
+});
+
+window.addEventListener('load', (event) => {
+ log.textContent = log.textContent + 'load\n';
+});
+
+document.addEventListener('readystatechange', (event) => {
+ log.textContent = log.textContent + `readystate: ${document.readyState}\n`;
+});
+
+document.addEventListener('DOMContentLoaded', (event) => {
+ log.textContent = log.textContent + `DOMContentLoaded\n`;
+});
+```
+
+#### 結果
+
+{{ EmbedLiveSample('Live_example', '100%', '160px') }}
+
+## 仕様書
+
+| 仕様書 | 状態 | 備考 |
+| -------------------------------------------------------------------------------------------- | -------------------------------- | ---- |
+| {{SpecName('HTML WHATWG', '#stop-parsing', 'DOMContentLoaded')}} | {{Spec2('HTML WHATWG')}} | |
+| {{SpecName('HTML5 W3C', 'syntax.html#the-end', 'DOMContentLoaded')}} | {{Spec2('HTML5 W3C')}} | |
+
+## ブラウザーの互換性
+
+{{Compat("api.Document.DOMContentLoaded_event")}}
+
+## 関連情報
+
+- 関連イベント: {{domxref("Window/load_event", "load")}}, {{domxref("Document/readystatechange_event", "readystatechange")}}, {{domxref("Window/beforeunload_event", "beforeunload")}}, {{domxref("Window/unload_event", "unload")}}
+- {{domxref("Window")}} を対象とした同じイベント: {{domxref("Window/DOMContentLoaded_event", "DOMContentLoaded")}}
diff --git a/files/ja/web/api/document/elementsfrompoint/index.html b/files/ja/web/api/document/elementsfrompoint/index.html
deleted file mode 100644
index 98a08a450f3d72..00000000000000
--- a/files/ja/web/api/document/elementsfrompoint/index.html
+++ /dev/null
@@ -1,101 +0,0 @@
----
-title: DocumentOrShadowRoot.elementsFromPoint()
-slug: Web/API/Document/elementsFromPoint
-tags:
- - API
- - Document
- - DocumentOrShadowRoot
- - Method
- - Reference
- - ShadowRoot
- - elementsFromPoint
- - elementsFromPoint()
- - shadow dom
- - メソッド
-translation_of: Web/API/DocumentOrShadowRoot/elementsFromPoint
-original_slug: Web/API/DocumentOrShadowRoot/elementsFromPoint
----
-
{{APIRef("DOM")}}{{SeeCompatTable}}
-
-
elementsFromPoint()
は {{domxref("DocumentOrShadowRoot")}} インターフェイスのメソッドで、指定された座標 (ビューポートからの相対) にあるすべての要素の配列を返します。
-
-
これは {{domxref("DocumentOrShadowRoot.elementFromPoint", "elementFromPoint()")}} メソッドと同じような方法で動作します。
-
-
構文
-
-
const elements = document.elementsFromPoint(x, y);
-
-
引数
-
-
- x
- - 点の水平座標です。
- y
- - 点の垂直座標です。
-
-
-
返値
-
-
{{domxref("Element")}} オブジェクトの配列です。
-
-
例
-
-
HTML
-
-
<div>
- <p>Some text</p>
-</div>
-<p>Elements at point 30, 20:</p>
-<div id="output"></div>
-
-
-
JavaScript
-
-
let output = document.getElementById("output");
-if (document.elementsFromPoint) {
- let elements = document.elementsFromPoint(30, 20);
- for (var i = 0; i < elements.length; i++) {
- output.textContent += elements[i].localName;
- if (i < elements.length - 1) {
- output.textContent += " < ";
- }
- }
-} else {
- output.innerHTML = "<span style=\"color: red;\">" +
- "Browser does not support <code>document.elementsFromPoint()</code>" +
- "</span>";
-}
-
-
{{EmbedLiveSample('Example', '420', '120')}}
-
-
仕様書
-
-
-
-
- 仕様書 |
- 状態 |
-
-
-
-
- {{SpecName('Shadow DOM','#dom-documentorshadowroot-elementsfrompoint','elementsFromPoint()')}} |
- {{Spec2('Shadow DOM')}} |
-
-
- {{SpecName('CSSOM View', '#dom-document-elementsfrompoint', 'elementsFromPoint()')}} |
- {{Spec2('CSSOM View')}} |
-
-
-
-
-
ブラウザーの互換性
-
-
{{Compat("api.DocumentOrShadowRoot.elementsFromPoint")}}
-
-
関連情報
-
-
- - {{DOMxRef("DocumentOrShadowRoot.elementFromPoint()")}}
- - {{DOMxRef("DocumentOrShadowRoot.msElementsFromRect()")}} {{Non-standard_Inline}}
-
diff --git a/files/ja/web/api/document/elementsfrompoint/index.md b/files/ja/web/api/document/elementsfrompoint/index.md
new file mode 100644
index 00000000000000..89d2bd5deb17b0
--- /dev/null
+++ b/files/ja/web/api/document/elementsfrompoint/index.md
@@ -0,0 +1,88 @@
+---
+title: DocumentOrShadowRoot.elementsFromPoint()
+slug: Web/API/Document/elementsFromPoint
+tags:
+ - API
+ - Document
+ - DocumentOrShadowRoot
+ - Method
+ - Reference
+ - ShadowRoot
+ - elementsFromPoint
+ - elementsFromPoint()
+ - shadow dom
+ - メソッド
+translation_of: Web/API/DocumentOrShadowRoot/elementsFromPoint
+original_slug: Web/API/DocumentOrShadowRoot/elementsFromPoint
+---
+{{APIRef("DOM")}}{{SeeCompatTable}}
+
+**`elementsFromPoint()`** は {{domxref("DocumentOrShadowRoot")}} インターフェイスのメソッドで、指定された座標 (ビューポートからの相対) にあるすべての要素の配列を返します。
+
+これは {{domxref("DocumentOrShadowRoot.elementFromPoint", "elementFromPoint()")}} メソッドと同じような方法で動作します。
+
+## 構文
+
+```
+const elements = document.elementsFromPoint(x, y);
+```
+
+### 引数
+
+- `x`
+ - : 点の水平座標です。
+- `y`
+ - : 点の垂直座標です。
+
+### 返値
+
+{{domxref("Element")}} オブジェクトの配列です。
+
+## 例
+
+### HTML
+
+```html
+
+
Elements at point 30, 20:
+
+```
+
+### JavaScript
+
+```js
+let output = document.getElementById("output");
+if (document.elementsFromPoint) {
+ let elements = document.elementsFromPoint(30, 20);
+ for (var i = 0; i < elements.length; i++) {
+ output.textContent += elements[i].localName;
+ if (i < elements.length - 1) {
+ output.textContent += " < ";
+ }
+ }
+} else {
+ output.innerHTML = "
" +
+ "Browser does not support document.elementsFromPoint()
" +
+ "";
+}
+```
+
+{{EmbedLiveSample('Example', '420', '120')}}
+
+## 仕様書
+
+| 仕様書 | 状態 |
+| ---------------------------------------------------------------------------------------------------------------------------- | -------------------------------- |
+| {{SpecName('Shadow DOM','#dom-documentorshadowroot-elementsfrompoint','elementsFromPoint()')}} | {{Spec2('Shadow DOM')}} |
+| {{SpecName('CSSOM View', '#dom-document-elementsfrompoint', 'elementsFromPoint()')}} | {{Spec2('CSSOM View')}} |
+
+## ブラウザーの互換性
+
+{{Compat("api.DocumentOrShadowRoot.elementsFromPoint")}}
+
+## 関連情報
+
+- {{DOMxRef("DocumentOrShadowRoot.elementFromPoint()")}}
+- {{DOMxRef("DocumentOrShadowRoot.msElementsFromRect()")}} {{Non-standard_Inline}}
diff --git a/files/ja/web/api/document/embeds/index.html b/files/ja/web/api/document/embeds/index.html
deleted file mode 100644
index 5da1ce13fd5c9d..00000000000000
--- a/files/ja/web/api/document/embeds/index.html
+++ /dev/null
@@ -1,48 +0,0 @@
----
-title: Document.embeds
-slug: Web/API/Document/embeds
-tags:
- - API
- - DOM
- - Document
- - HTML DOM
- - Property
- - embeds
- - プロパティ
-translation_of: Web/API/Document/embeds
----
-
{{ApiRef}}
-
-
{{domxref("Document")}} インターフェイスの embeds
プロパティは読み取り専用で、現在の文書の埋め込み {{htmlelement("object")}} 要素のリストを返します。
-
-
構文
-
-
nodeList = document.embeds
-
-
-
値
-
-
{{domxref("HTMLCollection")}} です。
-
-
仕様書
-
-
-
-
- 仕様書 |
- 状態 |
- 備考 |
-
-
-
-
- {{SpecName('HTML WHATWG', '#dom-document-embeds', 'Document.embeds')}} |
- {{ Spec2('HTML WHATWG') }} |
- |
-
-
-
-
-
ブラウザーの対応
-
-
{{Compat("api.Document.embeds")}}
diff --git a/files/ja/web/api/document/embeds/index.md b/files/ja/web/api/document/embeds/index.md
new file mode 100644
index 00000000000000..7935056a66fb5e
--- /dev/null
+++ b/files/ja/web/api/document/embeds/index.md
@@ -0,0 +1,36 @@
+---
+title: Document.embeds
+slug: Web/API/Document/embeds
+tags:
+ - API
+ - DOM
+ - Document
+ - HTML DOM
+ - Property
+ - embeds
+ - プロパティ
+translation_of: Web/API/Document/embeds
+---
+{{ApiRef}}
+
+{{domxref("Document")}} インターフェイスの **`embeds`** プロパティは読み取り専用で、現在の文書の埋め込み {{htmlelement("object")}} 要素のリストを返します。
+
+## 構文
+
+```
+nodeList = document.embeds
+```
+
+### 値
+
+{{domxref("HTMLCollection")}} です。
+
+## 仕様書
+
+| 仕様書 | 状態 | 備考 |
+| -------------------------------------------------------------------------------------------- | ------------------------------------ | ---- |
+| {{SpecName('HTML WHATWG', '#dom-document-embeds', 'Document.embeds')}} | {{ Spec2('HTML WHATWG') }} | |
+
+## ブラウザーの互換性
+
+{{Compat("api.Document.embeds")}}
diff --git a/files/ja/web/api/document/evaluate/index.html b/files/ja/web/api/document/evaluate/index.html
deleted file mode 100644
index a3ec8c762523b0..00000000000000
--- a/files/ja/web/api/document/evaluate/index.html
+++ /dev/null
@@ -1,161 +0,0 @@
----
-title: Document.evaluate()
-slug: Web/API/Document/evaluate
-translation_of: Web/API/Document/evaluate
----
-
{{ ApiRef("DOM") }}
-
-
-
-
-
-
構文
-
-
var xpathResult = document.evaluate(
- xpathExpression,
- contextNode,
- namespaceResolver,
- resultType,
- result
-);
-
-
- xpathExpression
は評価される Xpath を示す文字列です。
- contextNode
はクエリのコンテキストノードを指定します(XPath の仕様を参照してください) コンテキストノードとして document
を渡すのが一般的です。
- namespaceResolver
は、任意の名前空間接頭辞を受け取り、その接頭辞に関連付けられた名前空間 URI を文字列として返す関数です。接頭辞が文書の中でマッチされるように、XPath 自身の中で接頭辞を解決するために使われます。HTML 文書向け、または名前空間接頭辞を使わないときは null
を指定するのが一般的です。
- resultType
は返り値である XPathResult
のタイプに対応する整数です。XPathResult コンストラクタの名前付き定数プロパティ (例えば XPathResult.ANY_TYPE
) を使用してください。これらは0から9までの整数に対応しています。
- result
は結果として使われる既存の XPathResult
です。null
を指定するのが最も一般的です。null
は新しい XPathResult を生成します。
-
-
-
例
-
-
var headings = document.evaluate("/html/body//h2", document, null, XPathResult.ANY_TYPE, null);
-/* Search the document for all h2 elements.
- * The result will likely be an unordered node iterator. */
-var thisHeading = headings.iterateNext();
-var alertText = "Level 2 headings in this document are:\n";
-while (thisHeading) {
- alertText += thisHeading.textContent + "\n";
- thisHeading = headings.iterateNext();
-}
-alert(alertText); // Alerts the text of all h2 elements
-
-
-
Note, in the above example, a more verbose XPath is preferred over common shortcuts such as //h2
. Generally, more specific XPath selectors as in the above example usually gives a significant performance improvement, especially on very large documents. This is because the evaluation of the query spends does not waste time visiting unnecessary nodes. Using // is generally slow as it visits every node from the root and all subnodes looking for possible matches.
-
-
Further optimization can be achieved by careful use of the context parameter. For example, if you know the content you are looking for is somewhere inside the body tag, you can use this:
-
-
document.evaluate(".//h2", document.body, null, XPathResult.ANY_TYPE, null);
-
-
-
Notice in the above document.body
has been used as the context instead of document
so the XPath starts from the body element. (In this example, the "."
is important to indicate that the querying should start from the context node, document.body. If the "." was left out (leaving //h2
) the query would start from the root node (html
) which would be more wasteful.)
-
-
See Introduction to using XPath in JavaScript for more information.
-
-
注釈
-
-
- - XPath expressions can be evaluated on HTML and XML documents.
- - While using document.evaluate() works in FF2, in FF3 one must use someXMLDoc.evaluate() if evaluating against something other than the current document.
-
-
-
戻り値の分類
-
-
(Merge with Template:XPathResultConstants?
-
-
These are supported values for the resultType
parameter of the evaluate
method:
-
-
-
-
-
-
-
-
-
- ANY_TYPE |
- 0 |
- Whatever type naturally results from the given expression. |
-
-
- NUMBER_TYPE |
- 1 |
- A result set containing a single number. Useful, for example, in an XPath expression using the count() function. |
-
-
- STRING_TYPE |
- 2 |
- A result set containing a single string. |
-
-
- BOOLEAN_TYPE |
- 3 |
- A result set containing a single boolean value. Useful, for example, an an XPath expression using the not() function. |
-
-
- UNORDERED_NODE_ITERATOR_TYPE |
- 4 |
- A result set containing all the nodes matching the expression. The nodes in the result set are not necessarily in the same order they appear in the document. |
-
-
- ORDERED_NODE_ITERATOR_TYPE |
- 5 |
- A result set containing all the nodes matching the expression. The nodes in the result set are in the same order they appear in the document. |
-
-
- UNORDERED_NODE_SNAPSHOT_TYPE |
- 6 |
- A result set containing snapshots of all the nodes matching the expression. The nodes in the result set are not necessarily in the same order they appear in the document. |
-
-
- ORDERED_NODE_SNAPSHOT_TYPE |
- 7 |
- A result set containing snapshots of all the nodes matching the expression. The nodes in the result set are in the same order they appear in the document. |
-
-
- ANY_UNORDERED_NODE_TYPE |
- 8 |
- A result set containing any single node that matches the expression. The node is not necessarily the first node in the document that matches the expression. |
-
-
- FIRST_ORDERED_NODE_TYPE |
- 9 |
- A result set containing the first node in the document that matches the expression. |
-
-
-
-
-
Results of NODE_ITERATOR
types contain references to nodes in the document. Modifying a node will invalidate the iterator. After modifying a node, attempting to iterate through the results will result in an error.
-
-
Results of NODE_SNAPSHOT
types are snapshots, which are essentially lists of matched nodes. You can make changes to the document by altering snapshot nodes. Modifying the document doesn't invalidate the snapshot; however, if the document is changed, the snapshot may not correspond to the current state of the document, since nodes may have moved, been changed, added, or removed.
-
-
仕様
-
-
-
-
- Specification |
- Status |
- Comment |
-
-
-
-
- {{SpecName("DOM3 XPath", "xpath.html#XPathEvaluator-evaluate", "Document.evaluate")}} |
- {{Spec2("DOM3 XPath")}} |
- Initial specification |
-
-
-
-
-
ブラウザ互換性
-
-
{{Compat("api.Document.evaluate")}}
-
-
関連項目
-
-
diff --git a/files/ja/web/api/document/evaluate/index.md b/files/ja/web/api/document/evaluate/index.md
new file mode 100644
index 00000000000000..39510119abfb07
--- /dev/null
+++ b/files/ja/web/api/document/evaluate/index.md
@@ -0,0 +1,95 @@
+---
+title: Document.evaluate()
+slug: Web/API/Document/evaluate
+translation_of: Web/API/Document/evaluate
+---
+{{ ApiRef("DOM") }}[XPath](/ja/docs/XPath "XPath") 式やその他与えられたパラメータに基づいて [`XPathResult`](/ja/docs/XPathResult "XPathResult") を返します。
+
+## 構文
+
+```
+var xpathResult = document.evaluate(
+ xpathExpression,
+ contextNode,
+ namespaceResolver,
+ resultType,
+ result
+);
+```
+
+- `xpathExpression` は評価される Xpath を示す文字列です。
+- `contextNode` はクエリの*コンテキストノード*を指定します([XPath の仕様](http://www.w3.org/TR/xpath)を参照してください) コンテキストノードとして `document` を渡すのが一般的です。
+- `namespaceResolver` は、任意の名前空間接頭辞を受け取り、その接頭辞に関連付けられた名前空間 URI を文字列として返す関数です。接頭辞が文書の中でマッチされるように、XPath 自身の中で接頭辞を解決するために使われます。HTML 文書向け、または名前空間接頭辞を使わないときは `null` を指定するのが一般的です。
+- `resultType` は返り値である `XPathResult` のタイプに対応する整数です。XPathResult コンストラクタの[名前付き定数プロパティ](#Result_types) (例えば `XPathResult.ANY_TYPE`) を使用してください。これらは 0 から 9 までの整数に対応しています。
+- `result` は結果として使われる既存の `XPathResult` です。`null` を指定するのが最も一般的です。`null` は新しい `XPathResult を生成します。`
+
+## 例
+
+```js
+var headings = document.evaluate("/html/body//h2", document, null, XPathResult.ANY_TYPE, null);
+/* Search the document for all h2 elements.
+ * The result will likely be an unordered node iterator. */
+var thisHeading = headings.iterateNext();
+var alertText = "Level 2 headings in this document are:\n";
+while (thisHeading) {
+ alertText += thisHeading.textContent + "\n";
+ thisHeading = headings.iterateNext();
+}
+alert(alertText); // Alerts the text of all h2 elements
+```
+
+Note, in the above example, a more verbose XPath is preferred over common shortcuts such as `//h2`. Generally, more specific XPath selectors as in the above example usually gives a significant performance improvement, especially on very large documents. This is because the evaluation of the query spends does not waste time visiting unnecessary nodes. Using // is generally slow as it visits _every_ node from the root and all subnodes looking for possible matches.
+
+Further optimization can be achieved by careful use of the context parameter. For example, if you know the content you are looking for is somewhere inside the body tag, you can use this:
+
+```js
+document.evaluate(".//h2", document.body, null, XPathResult.ANY_TYPE, null);
+```
+
+Notice in the above `document.body` has been used as the context instead of `document` so the XPath starts from the body element. (In this example, the `"."` is important to indicate that the querying should start from the context node, document.body. If the "." was left out (leaving `//h2`) the query would start from the root node (`html`) which would be more wasteful.)
+
+See [Introduction to using XPath in JavaScript](/ja/docs/Introduction_to_using_XPath_in_JavaScript "Introduction to using XPath in JavaScript") for more information.
+
+## 注釈
+
+- XPath expressions can be evaluated on HTML and XML documents.
+- While using document.evaluate() works in FF2, in FF3 one must use someXMLDoc.evaluate() if evaluating against something other than the current document.
+
+## 戻り値の分類
+
+(Merge with [Template:XPathResultConstants](/Template:XPathResultConstants "Template:XPathResultConstants")?
+
+These are supported values for the `resultType` parameter of the `evaluate` method:
+
+| Result Type | Value | Description |
+| ------------------------------ | ----- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `ANY_TYPE` | 0 | Whatever type naturally results from the given expression. |
+| `NUMBER_TYPE` | 1 | A result set containing a single number. Useful, for example, in an XPath expression using the `count()` function. |
+| `STRING_TYPE` | 2 | A result set containing a single string. |
+| `BOOLEAN_TYPE` | 3 | A result set containing a single boolean value. Useful, for example, an an XPath expression using the `not()` function. |
+| `UNORDERED_NODE_ITERATOR_TYPE` | 4 | A result set containing all the nodes matching the expression. The nodes in the result set are not necessarily in the same order they appear in the document. |
+| `ORDERED_NODE_ITERATOR_TYPE` | 5 | A result set containing all the nodes matching the expression. The nodes in the result set are in the same order they appear in the document. |
+| `UNORDERED_NODE_SNAPSHOT_TYPE` | 6 | A result set containing snapshots of all the nodes matching the expression. The nodes in the result set are not necessarily in the same order they appear in the document. |
+| `ORDERED_NODE_SNAPSHOT_TYPE` | 7 | A result set containing snapshots of all the nodes matching the expression. The nodes in the result set are in the same order they appear in the document. |
+| `ANY_UNORDERED_NODE_TYPE` | 8 | A result set containing any single node that matches the expression. The node is not necessarily the first node in the document that matches the expression. |
+| `FIRST_ORDERED_NODE_TYPE` | 9 | A result set containing the first node in the document that matches the expression. |
+
+Results of `NODE_ITERATOR` types contain references to nodes in the document. Modifying a node will invalidate the iterator. After modifying a node, attempting to iterate through the results will result in an error.
+
+Results of `NODE_SNAPSHOT` types are snapshots, which are essentially lists of matched nodes. You can make changes to the document by altering snapshot nodes. Modifying the document doesn't invalidate the snapshot; however, if the document is changed, the snapshot may not correspond to the current state of the document, since nodes may have moved, been changed, added, or removed.
+
+## 仕様
+
+| Specification | Status | Comment |
+| ---------------------------------------------------------------------------------------------------------------- | -------------------------------- | --------------------- |
+| {{SpecName("DOM3 XPath", "xpath.html#XPathEvaluator-evaluate", "Document.evaluate")}} | {{Spec2("DOM3 XPath")}} | Initial specification |
+
+## ブラウザ互換性
+
+{{Compat("api.Document.evaluate")}}
+
+## 関連項目
+
+- [DOM:document.createExpression](/ja/docs/DOM/document.createExpression "DOM/document.createExpression")
+- [XPath Code Snippets](/ja/docs/Code_snippets/XPath "Code_snippets/XPath")
+- [Check for browser support](http://codepen.io/johan/full/ckFgn)
diff --git a/files/ja/web/api/document/exitfullscreen/index.html b/files/ja/web/api/document/exitfullscreen/index.html
deleted file mode 100644
index 07ceffe70acda2..00000000000000
--- a/files/ja/web/api/document/exitfullscreen/index.html
+++ /dev/null
@@ -1,87 +0,0 @@
----
-title: Document.exitFullscreen()
-slug: Web/API/Document/exitFullscreen
-tags:
- - API
- - DOM
- - Document
- - Full
- - Full-screen
- - Fullscreen API
- - Method
- - Reference
- - exitFullscreen
- - fullscreen
- - screen
- - メソッド
- - 全画面
-translation_of: Web/API/Document/exitFullscreen
----
-
{{ApiRef("Fullscreen API")}}
-
-
{{domxref("Document")}} の exitFullscreen()
メソッドは、この文書で現在全画面モードで表示されている要素が全画面モードを向け、画面を以前の状態に戻すことを要求します。これはふつう、以前の {{domxref("Element.requestFullscreen()")}} の呼び出しの効果を取り消します。
-
-
構文
-
-
exitPromise = document.exitFullscreen();
-
-
-
引数
-
-
なし。
-
-
返値
-
-
{{Glossary("user agent", "ユーザーエージェント")}}が全画面モードから完全に抜けたら解決される {{jsxref("Promise")}} です。全画面モードから抜けようとしてエラーが発生したら、 Promise の catch()
ハンドラーが呼び出されます。
-
-
例
-
-
この例ではマウスボタンで中をクリックするたびに、現在の文書が全画面表示になったり戻ったりします。
-
-
document.onclick = function (event) {
- if (document.fullscreenElement) {
- document.exitFullscreen()
- .then(() => console.log("Document Exited form Full screen mode"))
- .catch((err) => console.error(err))
- } else {
- document.documentElement.requestFullscreen()
- }
-}
-
-
-
注: もっと完全な例については、{{SectionOnPage("/ja/docs/Web/API/Element/requestFullScreen", "例")}}をご覧ください。
-
-
-
仕様書
-
-
-
-
- 仕様書 |
- 状態 |
- 備考 |
-
-
-
-
- {{SpecName("Fullscreen", "#dom-document-exitfullscreen", "Document.exitFullscreen()")}} |
- {{Spec2("Fullscreen")}} |
- 初回定義 |
-
-
-
-
-
ブラウザーの互換性
-
-
{{Compat("api.Document.exitFullscreen")}}
-
-
関連情報
-
-
- - 全画面 API
- - 全画面 API のガイド
- - {{ domxref("Element.requestFullscreen()") }}
- - {{ domxref("Document.fullscreenElement") }}
- - {{ cssxref(":fullscreen") }} および {{cssxref("::backdrop")}}
- - {{HTMLElement("iframe")}} の {{ HTMLAttrXRef("allowfullscreen", "iframe") }} 属性
-
diff --git a/files/ja/web/api/document/exitfullscreen/index.md b/files/ja/web/api/document/exitfullscreen/index.md
new file mode 100644
index 00000000000000..51ee56a1b55060
--- /dev/null
+++ b/files/ja/web/api/document/exitfullscreen/index.md
@@ -0,0 +1,73 @@
+---
+title: Document.exitFullscreen()
+slug: Web/API/Document/exitFullscreen
+tags:
+ - API
+ - DOM
+ - Document
+ - Full
+ - Full-screen
+ - Fullscreen API
+ - Method
+ - Reference
+ - exitFullscreen
+ - fullscreen
+ - screen
+ - メソッド
+ - 全画面
+translation_of: Web/API/Document/exitFullscreen
+---
+{{ApiRef("Fullscreen API")}}
+
+{{domxref("Document")}} の **`exitFullscreen()`** メソッドは、この文書で現在全画面モードで表示されている要素が全画面モードを向け、画面を以前の状態に戻すことを要求します。これはふつう、以前の {{domxref("Element.requestFullscreen()")}} の呼び出しの効果を取り消します。
+
+## 構文
+
+```
+exitPromise = document.exitFullscreen();
+```
+
+### 引数
+
+なし。
+
+### 返値
+
+{{Glossary("user agent", "ユーザーエージェント")}}が全画面モードから完全に抜けたら解決される {{jsxref("Promise")}} です。全画面モードから抜けようとしてエラーが発生したら、 Promise の `catch()` ハンドラーが呼び出されます。
+
+## 例
+
+この例ではマウスボタンで中をクリックするたびに、現在の文書が全画面表示になったり戻ったりします。
+
+```
+document.onclick = function (event) {
+ if (document.fullscreenElement) {
+ document.exitFullscreen()
+ .then(() => console.log("Document Exited form Full screen mode"))
+ .catch((err) => console.error(err))
+ } else {
+ document.documentElement.requestFullscreen()
+ }
+}
+```
+
+> **Note:** もっと完全な例については、{{SectionOnPage("/ja/docs/Web/API/Element/requestFullScreen", "例")}}をご覧ください。
+
+## 仕様書
+
+| 仕様書 | 状態 | 備考 |
+| -------------------------------------------------------------------------------------------------------------------- | -------------------------------- | -------- |
+| {{SpecName("Fullscreen", "#dom-document-exitfullscreen", "Document.exitFullscreen()")}} | {{Spec2("Fullscreen")}} | 初回定義 |
+
+## ブラウザーの互換性
+
+{{Compat("api.Document.exitFullscreen")}}
+
+## 関連情報
+
+- [全画面 API](/ja/docs/Web/API/Fullscreen_API)
+- [全画面 API のガイド](/ja/docs/Web/API/Fullscreen_API/Guide)
+- {{ domxref("Element.requestFullscreen()") }}
+- {{ domxref("Document.fullscreenElement") }}
+- {{ cssxref(":fullscreen") }} および {{cssxref("::backdrop")}}
+- {{HTMLElement("iframe")}} の {{ HTMLAttrXRef("allowfullscreen", "iframe") }} 属性
diff --git a/files/ja/web/api/document/exitpointerlock/index.html b/files/ja/web/api/document/exitpointerlock/index.html
deleted file mode 100644
index 90a3d83ac04543..00000000000000
--- a/files/ja/web/api/document/exitpointerlock/index.html
+++ /dev/null
@@ -1,52 +0,0 @@
----
-title: Document.exitPointerLock()
-slug: Web/API/Document/exitPointerLock
-tags:
- - API
- - Experimental
- - Method
- - Reference
- - mouse lock
-translation_of: Web/API/Document/exitPointerLock
----
-
{{APIRef("DOM")}} {{seeCompatTable}}
-
-
exitPointerLock()
メソッドは、以前 {{domxref("Element.requestPointerLock")}} でリクエストされたポインターロックを非同期に解放します。
-
-
リクエストが成功したか失敗したかを追跡するには、 {{event("pointerlockchange")}} および {{event("pointerlockerror")}} イベントを待ち受けする必要があります。
-
-
構文
-
-
document.exitPointerLock();
-
-
-
仕様書
-
-
-
-
- 仕様書 |
- 状態 |
- 備考 |
-
-
-
-
- {{SpecName('Pointer Lock','#extensions-to-the-document-interface','Document')}} |
- {{Spec2('Pointer Lock')}} |
- Document インターフェイスを拡張 |
-
-
-
-
-
ブラウザーの互換性
-
-
{{Compat("api.Document.exitPointerLock")}}
-
-
関連情報
-
-
- - {{ domxref("Document.pointerLockElement") }}
- - {{ domxref("Element.requestPointerLock()") }}
- - ポインターロック
-
diff --git a/files/ja/web/api/document/exitpointerlock/index.md b/files/ja/web/api/document/exitpointerlock/index.md
new file mode 100644
index 00000000000000..8605fad5ebdcf3
--- /dev/null
+++ b/files/ja/web/api/document/exitpointerlock/index.md
@@ -0,0 +1,38 @@
+---
+title: Document.exitPointerLock()
+slug: Web/API/Document/exitPointerLock
+tags:
+ - API
+ - Experimental
+ - Method
+ - Reference
+ - mouse lock
+translation_of: Web/API/Document/exitPointerLock
+---
+{{APIRef("DOM")}} {{seeCompatTable}}
+
+**`exitPointerLock()`** メソッドは、以前 {{domxref("Element.requestPointerLock")}} でリクエストされたポインターロックを非同期に解放します。
+
+リクエストが成功したか失敗したかを追跡するには、 {{event("pointerlockchange")}} および {{event("pointerlockerror")}} イベントを待ち受けする必要があります。
+
+## 構文
+
+```
+document.exitPointerLock();
+```
+
+## 仕様書
+
+| 仕様書 | 状態 | 備考 |
+| -------------------------------------------------------------------------------------------------------- | -------------------------------- | --------------------------------- |
+| {{SpecName('Pointer Lock','#extensions-to-the-document-interface','Document')}} | {{Spec2('Pointer Lock')}} | `Document` インターフェイスを拡張 |
+
+## ブラウザーの互換性
+
+{{Compat("api.Document.exitPointerLock")}}
+
+## 関連情報
+
+- {{ domxref("Document.pointerLockElement") }}
+- {{ domxref("Element.requestPointerLock()") }}
+- [ポインターロック](/ja/docs/Web/API/Pointer_Lock_API)
diff --git a/files/ja/web/api/document/featurepolicy/index.html b/files/ja/web/api/document/featurepolicy/index.html
deleted file mode 100644
index 127c058f19a95d..00000000000000
--- a/files/ja/web/api/document/featurepolicy/index.html
+++ /dev/null
@@ -1,46 +0,0 @@
----
-title: Document.featurePolicy
-slug: Web/API/Document/featurePolicy
-tags:
- - API
- - Document
- - Feature Policy
- - Feature-Policy
- - Reference
- - 機能ポリシー
-translation_of: Web/API/Document/featurePolicy
----
-
{{APIRef("Feature Policy")}}
-
-
featurePolicy
は {{domxref("Document")}} インターフェイスの読み取り専用プロパティで、特定の文書に適用される機能ポリシーを見ることができる簡単な API を提供する {{domxref("Policy")}} インターフェイスを返します。
-
-
構文
-
-
var policy = iframeElement.featurePolicy
-
-
値
-
-
{{domxref("FeaturePolicy")}} オブジェクトで、文書に適用された機能ポリシーの設定を調べるために使用するうことができます。
-
-
仕様書
-
-
-
-
- 仕様書 |
- 状態 |
- 備考 |
-
-
-
-
- {{SpecName("Feature Policy")}} |
- {{Spec2("Feature Policy")}} |
- 初回定義 |
-
-
-
-
-
ブラウザーの互換性
-
-
{{Compat("api.Document.featurePolicy")}}
diff --git a/files/ja/web/api/document/featurepolicy/index.md b/files/ja/web/api/document/featurepolicy/index.md
new file mode 100644
index 00000000000000..e43eb80e1b184a
--- /dev/null
+++ b/files/ja/web/api/document/featurepolicy/index.md
@@ -0,0 +1,35 @@
+---
+title: Document.featurePolicy
+slug: Web/API/Document/featurePolicy
+tags:
+ - API
+ - Document
+ - Feature Policy
+ - Feature-Policy
+ - Reference
+ - 機能ポリシー
+translation_of: Web/API/Document/featurePolicy
+---
+{{APIRef("Feature Policy")}}
+
+**`featurePolicy`** は {{domxref("Document")}} インターフェイスの読み取り専用プロパティで、特定の文書に適用される機能ポリシーを見ることができる簡単な API を提供する {{domxref("Policy")}} インターフェイスを返します。
+
+## 構文
+
+```
+var policy = iframeElement.featurePolicy
+```
+
+### 値
+
+{{domxref("FeaturePolicy")}} オブジェクトで、文書に適用された機能ポリシーの設定を調べるために使用するうことができます。
+
+## 仕様書
+
+| 仕様書 | 状態 | 備考 |
+| ---------------------------------------- | ------------------------------------ | -------- |
+| {{SpecName("Feature Policy")}} | {{Spec2("Feature Policy")}} | 初回定義 |
+
+## ブラウザーの互換性
+
+{{Compat("api.Document.featurePolicy")}}
diff --git a/files/ja/web/api/document/fgcolor/index.html b/files/ja/web/api/document/fgcolor/index.html
deleted file mode 100644
index 07da4e19339982..00000000000000
--- a/files/ja/web/api/document/fgcolor/index.html
+++ /dev/null
@@ -1,47 +0,0 @@
----
-title: Document.fgColor
-slug: Web/API/Document/fgColor
-tags:
- - API
- - DOM
- - Deprecated
- - Document
- - HTML DOM
- - Reference
- - fgColor
- - プロパティ
-translation_of: Web/API/Document/fgColor
----
-
{{ApiRef}}{{Deprecated_header}}
-
-
fgColor
は、現在の文書の前景色またはテキストの色を取得または設定します。
-
-
構文
-
-
var color = document.fgColor;
-document.fgColor = color;
-
-
-
引数
-
-
- color
は文字列で、色を表すキーワード ("red" など) または16進数の値 ("#000000"
など) です。
-
-
-
例
-
-
document.fgColor = "white";
-document.bgColor = "darkblue";
-
-
-
メモ
-
-
Mozilla Firefox ではこのプロパティの既定値は黒 (16進数で #000000
) です。
-
-
document.fgColor
は DOM Level 2 HTML で非推奨となっています。推奨される代替手段は CSS プロパティの {{Cssxref("color")}} (たとえば document.body.style.color = "red"
) です。
-
-
他の代替手段として document.body.text
がありますが、上記の CSS による代替手段が設置されたため HTML 4.01 で非推奨となっています。
-
-
ブラウザーの対応
-
-
{{Compat("api.Document.fgColor")}}
diff --git a/files/ja/web/api/document/fgcolor/index.md b/files/ja/web/api/document/fgcolor/index.md
new file mode 100644
index 00000000000000..8c1f285db9af8f
--- /dev/null
+++ b/files/ja/web/api/document/fgcolor/index.md
@@ -0,0 +1,47 @@
+---
+title: Document.fgColor
+slug: Web/API/Document/fgColor
+tags:
+ - API
+ - DOM
+ - Deprecated
+ - Document
+ - HTML DOM
+ - Reference
+ - fgColor
+ - プロパティ
+translation_of: Web/API/Document/fgColor
+---
+{{ApiRef}}{{Deprecated_header}}
+
+**`fgColor`** は、現在の文書の前景色またはテキストの色を取得または設定します。
+
+## 構文
+
+```
+var color = document.fgColor;
+document.fgColor = color;
+```
+
+### 引数
+
+- `color` は文字列で、色を表すキーワード ("red" など) または 16 進数の値 (`"#000000"` など) です。
+
+## 例
+
+```js
+document.fgColor = "white";
+document.bgColor = "darkblue";
+```
+
+## メモ
+
+Mozilla Firefox ではこのプロパティの既定値は黒 (16 進数で `#000000`) です。
+
+`document.fgColor` は [DOM Level 2 HTML で非推奨](http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-26809268)となっています。推奨される代替手段は CSS プロパティの {{Cssxref("color")}} (たとえば `document.body.style.color = "red"`) です。
+
+他の代替手段として `document.body.text` がありますが、上記の CSS による代替手段が設置されたため [HTML 4.01 で非推奨](http://www.w3.org/TR/html401/struct/global.html#adef-text)となっています。
+
+## ブラウザーの互換性
+
+{{Compat("api.Document.fgColor")}}
diff --git a/files/ja/web/api/document/fonts/index.html b/files/ja/web/api/document/fonts/index.html
deleted file mode 100644
index ee417ef8838545..00000000000000
--- a/files/ja/web/api/document/fonts/index.html
+++ /dev/null
@@ -1,64 +0,0 @@
----
-title: Document.fonts
-slug: Web/API/Document/fonts
-tags:
- - API
- - DOM
- - Font Loading API
- - FontFace
- - FontFaceSet
- - Fonts
- - フォント
-translation_of: Web/API/Document/fonts
----
-
{{APIRef("DOM")}}
-
-
fonts
は {{domxref("Document")}} インターフェイスのプロパティで、文書の {{domxref("FontFaceSet")}} インターフェイスを返します。
-
-
構文
-
-
let fontFaceSet = document.fonts;
-
-
値
-
-
返値は文書の {{domxref("FontFaceSet")}} インターフェイスです。 FontFaceSet
インターフェイスは新しいフォントを読み込んだり、以前読み込まれたフォントの状態をチェックしたりするのに有用です。
-
-
例
-
-
すべてのフォントが読み込まれた後の操作の実行
-
-
document.fonts.ready.then(function() {
- // すべてのフォントが読み込まれた後にのみ実行する必要がある操作を
- // ここに記述します。
-});
-
-
-
仕様書
-
-
-
-
- 仕様書 |
- 状態 |
- 備考 |
-
-
-
-
- {{SpecName('CSS3 Font Loading','#FontFaceSet-interface','FontFaceSet')}} |
- {{Spec2('CSS3 Font Loading')}} |
- 初回定義 |
-
-
-
-
-
ブラウザーの互換性
-
-
{{Compat("api.Document.fonts")}}
-
-
関連情報
-
-
- - {{domxref("FontFaceSet")}} インターフェイス
- - {{domxref("FontFace")}}
-
diff --git a/files/ja/web/api/document/fonts/index.md b/files/ja/web/api/document/fonts/index.md
new file mode 100644
index 00000000000000..59cf1c370ad427
--- /dev/null
+++ b/files/ja/web/api/document/fonts/index.md
@@ -0,0 +1,52 @@
+---
+title: Document.fonts
+slug: Web/API/Document/fonts
+tags:
+ - API
+ - DOM
+ - Font Loading API
+ - FontFace
+ - FontFaceSet
+ - Fonts
+ - フォント
+translation_of: Web/API/Document/fonts
+---
+{{APIRef("DOM")}}
+
+**`fonts`** は {{domxref("Document")}} インターフェイスのプロパティで、文書の {{domxref("FontFaceSet")}} インターフェイスを返します。
+
+## 構文
+
+```
+let fontFaceSet = document.fonts;
+```
+
+### 値
+
+返値は文書の {{domxref("FontFaceSet")}} インターフェイスです。 `FontFaceSet` インターフェイスは新しいフォントを読み込んだり、以前読み込まれたフォントの状態をチェックしたりするのに有用です。
+
+## 例
+
+### すべてのフォントが読み込まれた後の操作の実行
+
+```js
+document.fonts.ready.then(function() {
+ // すべてのフォントが読み込まれた後にのみ実行する必要がある操作を
+ // ここに記述します。
+});
+```
+
+## 仕様書
+
+| 仕様書 | 状態 | 備考 |
+| ------------------------------------------------------------------------------------------------ | ---------------------------------------- | -------- |
+| {{SpecName('CSS3 Font Loading','#FontFaceSet-interface','FontFaceSet')}} | {{Spec2('CSS3 Font Loading')}} | 初回定義 |
+
+## ブラウザーの互換性
+
+{{Compat("api.Document.fonts")}}
+
+## 関連情報
+
+- {{domxref("FontFaceSet")}} インターフェイス
+- {{domxref("FontFace")}}
diff --git a/files/ja/web/api/document/forms/index.html b/files/ja/web/api/document/forms/index.html
deleted file mode 100644
index d25fd3204ca471..00000000000000
--- a/files/ja/web/api/document/forms/index.html
+++ /dev/null
@@ -1,126 +0,0 @@
----
-title: Document.forms
-slug: Web/API/Document/forms
-tags:
- - API
- - DOM
- - Document
- - HTML DOM
- - HTML フォーム
- - フォーム
- - プロパティ
- - リファレンス
-translation_of: Web/API/Document/forms
----
-
{{domxref("Document")}} インターフェイスの forms
プロパティは読み取り専用で、文書内に含まれるすべての {{HTMLElement("form")}} を列挙した {{domxref("HTMLCollection")}} を返します。
-
-
-
メモ: 同様に、{{domxref("HTMLFormElement.elements")}} プロパティを使用すると、フォームコンポーネントのユーザー入力要素のリストにアクセスすることができます。
-
-
-
構文
-
-
collection = document.forms;
-
-
値
-
-
文書のすべてのフォームを列挙する {{domxref("HTMLCollection")}} オブジェクトです。コレクションのそれぞれの項目は、単一の <form>
要素を表す {{domxref("HTMLFormElement")}} です。
-
-
文書にフォームがない場合、返されるコレクションは空で、長さはゼロです。
-
-
例
-
-
-
-
<!DOCTYPE html>
-<html lang="en">
-
-<head>
-<title>document.forms example</title>
-</head>
-
-<body>
-
-<form id="robby">
- <input type="button" onclick="alert(document.forms[0].id);" value="robby's form" />
-</form>
-
-<form id="dave">
- <input type="button" onclick="alert(document.forms[1].id);" value="dave's form" />
-</form>
-
-<form id="paul">
- <input type="button" onclick="alert(document.forms[2].id);" value="paul's form" />
-</form>
-
-</body>
-</html>
-
-
-
-
-
var selectForm = document.forms[index];
-var selectFormElement = document.forms[index].elements[index];
-
-
-
-
-
<!DOCTYPE html>
-<html lang="en">
-<head>
- <title>document.forms example</title>
-</head>
-
-<body>
-
-<form name="login">
- <input name="email" type="email">
- <input name="password" type="password">
- <button type="submit">Log in</button>
-</form>
-
-<script>
- var loginForm = document.forms.login; // Or document.forms['login']
- loginForm.elements.email.placeholder = 'test@example.com';
- loginForm.elements.password.placeholder = 'password';
-</script>
-</body>
-</html>
-
-
-
仕様書
-
-
-
-
- 仕様書 |
- 状態 |
- コメント |
-
-
-
-
- {{SpecName('HTML WHATWG', '#dom-document-forms', 'Document.forms')}} |
- {{ Spec2('HTML WHATWG') }} |
- |
-
-
- {{SpecName('DOM2 HTML', 'html.html#ID-1689064', 'Document.forms')}} |
- {{ Spec2('DOM2 Events') }} |
- 初回定義 |
-
-
-
-
-
ブラウザーの対応
-
-
{{Compat("api.Document.forms")}}
-
-
関連情報
-
-
- - HTML forms
- - {{HTMLElement("form")}} および {{domxref("HTMLFormElement")}} インターフェイス
-
-
-
{{APIRef("DOM")}}
diff --git a/files/ja/web/api/document/forms/index.md b/files/ja/web/api/document/forms/index.md
new file mode 100644
index 00000000000000..f2f9ff94902c17
--- /dev/null
+++ b/files/ja/web/api/document/forms/index.md
@@ -0,0 +1,110 @@
+---
+title: Document.forms
+slug: Web/API/Document/forms
+tags:
+ - API
+ - DOM
+ - Document
+ - HTML DOM
+ - HTML フォーム
+ - フォーム
+ - プロパティ
+ - リファレンス
+translation_of: Web/API/Document/forms
+---
+{{domxref("Document")}} インターフェイスの **`forms`** プロパティは読み取り専用で、文書内に含まれるすべての {{HTMLElement("form")}} を列挙した {{domxref("HTMLCollection")}} を返します。
+
+> **Note:** 同様に、{{domxref("HTMLFormElement.elements")}} プロパティを使用すると、フォームコンポーネントのユーザー入力要素のリストにアクセスすることができます。
+
+## 構文
+
+```
+collection = document.forms;
+```
+
+### 値
+
+文書のすべてのフォームを列挙する {{domxref("HTMLCollection")}} オブジェクトです。コレクションのそれぞれの項目は、単一の `
+
+
+
+
+
+
+
+```
+
+### フォーム内要素の取得
+
+```js
+var selectForm = document.forms[index];
+var selectFormElement = document.forms[index].elements[index];
+```
+
+### 名前付きフォームへのアクセス
+
+```html
+
+
+
+
document.forms example
+
+
+
+
+
+
+
+
+
+```
+
+## 仕様書
+
+| 仕様書 | 状態 | コメント |
+| -------------------------------------------------------------------------------------------- | ------------------------------------ | -------- |
+| {{SpecName('HTML WHATWG', '#dom-document-forms', 'Document.forms')}} | {{ Spec2('HTML WHATWG') }} | |
+| {{SpecName('DOM2 HTML', 'html.html#ID-1689064', 'Document.forms')}} | {{ Spec2('DOM2 Events') }} | 初回定義 |
+
+## ブラウザーの互換性
+
+{{Compat("api.Document.forms")}}
+
+## 関連情報
+
+- [HTML forms](/ja/docs/Learn/HTML/Forms)
+- {{HTMLElement("form")}} および {{domxref("HTMLFormElement")}} インターフェイス
+
+{{APIRef("DOM")}}
diff --git a/files/ja/web/api/document/fullscreen/index.html b/files/ja/web/api/document/fullscreen/index.html
deleted file mode 100644
index 37c051694f8a87..00000000000000
--- a/files/ja/web/api/document/fullscreen/index.html
+++ /dev/null
@@ -1,78 +0,0 @@
----
-title: Document.fullscreen
-slug: Web/API/Document/fullscreen
-tags:
- - API
- - Document
- - Fullscreen API
- - Read-only
- - Reference
- - プロパティ
-translation_of: Web/API/Document/fullscreen
----
-
{{APIRef("Fullscreen API")}}{{Deprecated_Header}}
-
-
廃止された {{domxref("Document")}} インターフェイスの fullscreen
プロパティは読み取り専用で、文書が現在全画面モードで表示されているかどうかを報告します。
-
-
このプロパティは読み取り専用ですが、変更されても (strict モードでも) 例外を投げません。セッターは何もしないので、無視されます。
-
-
-
メモ: このプロパティは非推奨であり、文書が全画面モードになっているかどうかは、 {{DOMxRef("Document.fullscreenElement")}} が null
ではないことで確認することができます。
-
-
-
構文
-
-
var isFullScreen = document.fullscreen;
-
-
-
返値
-
-
真偽値であり、文書が全画面モードで表示されているときに true
、それ以外の場合に false
になります。
-
-
例
-
-
このシンプルな関数は、現在全画面モードがアクティブになっているかどうかを、廃止された fullscreen
プロパティを使用して報告しています。
-
-
function isDocumentInFullScreenMode() {
- return document.fullscreen;
-}
-
-
-
一方、次の例では、現在の fullscreenElement
プロパティを使用して同じことを確認しています。
-
-
function isDocumentInFullScreenMode() {
- return document.fullscreenElement !== null;
-}
-
-
fullscreenElement
が null
でなければ、これは true
を返し、全画面モードで表示されていることを示します。
-
-
仕様書
-
-
-
-
- 仕様書 |
- 状態 |
- 備考 |
-
-
-
-
- {{SpecName("Fullscreen", "#dom-document-fullscreen", "Document.fullscreen")}} |
- {{Spec2("Fullscreen")}} |
- 初回定義 (廃止プロパティとして) |
-
-
-
-
-
ブラウザーの対応
-
-
{{Compat("api.Document.fullscreen")}}
-
-
関連情報
-
-
diff --git a/files/ja/web/api/document/fullscreen/index.md b/files/ja/web/api/document/fullscreen/index.md
new file mode 100644
index 00000000000000..fba01888c2289d
--- /dev/null
+++ b/files/ja/web/api/document/fullscreen/index.md
@@ -0,0 +1,65 @@
+---
+title: Document.fullscreen
+slug: Web/API/Document/fullscreen
+tags:
+ - API
+ - Document
+ - Fullscreen API
+ - Read-only
+ - Reference
+ - プロパティ
+translation_of: Web/API/Document/fullscreen
+---
+{{APIRef("Fullscreen API")}}{{Deprecated_Header}}
+
+廃止された {{domxref("Document")}} インターフェイスの **`fullscreen`** プロパティは読み取り専用で、文書が現在全画面モードで表示されているかどうかを報告します。
+
+このプロパティは読み取り専用ですが、変更されても (strict モードでも) 例外を投げません。セッターは何もしないので、無視されます。
+
+> **Note:** このプロパティは非推奨であり、文書が全画面モードになっているかどうかは、 {{DOMxRef("Document.fullscreenElement")}} が `null` ではないことで確認することができます。
+
+## 構文
+
+```
+var isFullScreen = document.fullscreen;
+```
+
+### 返値
+
+真偽値であり、文書が全画面モードで表示されているときに `true`、それ以外の場合に `false` になります。
+
+## 例
+
+このシンプルな関数は、現在全画面モードがアクティブになっているかどうかを、廃止された `fullscreen` プロパティを使用して報告しています。
+
+```js
+function isDocumentInFullScreenMode() {
+ return document.fullscreen;
+}
+```
+
+一方、次の例では、現在の `fullscreenElement` プロパティを使用して同じことを確認しています。
+
+```js
+function isDocumentInFullScreenMode() {
+ return document.fullscreenElement !== null;
+}
+```
+
+`fullscreenElement` が `null` でなければ、これは `true` を返し、全画面モードで表示されていることを示します。
+
+## 仕様書
+
+| 仕様書 | 状態 | 備考 |
+| -------------------------------------------------------------------------------------------------------- | -------------------------------- | ------------------------------- |
+| {{SpecName("Fullscreen", "#dom-document-fullscreen", "Document.fullscreen")}} | {{Spec2("Fullscreen")}} | 初回定義 (廃止プロパティとして) |
+
+## ブラウザーの互換性
+
+{{Compat("api.Document.fullscreen")}}
+
+## 関連情報
+
+- [Fullscreen API](/ja/docs/Web/API/Fullscreen_API)
+- [Fullscreen API ガイド](/ja/docs/Web/API/Fullscreen_API/Guide)
+- {{DOMxRef("Document.fullscreenEnabled")}}
diff --git a/files/ja/web/api/document/fullscreenchange_event/index.html b/files/ja/web/api/document/fullscreenchange_event/index.html
deleted file mode 100644
index 308d99b941b024..00000000000000
--- a/files/ja/web/api/document/fullscreenchange_event/index.html
+++ /dev/null
@@ -1,90 +0,0 @@
----
-title: 'Document: fullscreenchange イベント'
-slug: Web/API/Document/fullscreenchange_event
-tags:
- - API
- - Fullscreen API
- - Reference
- - events
- - fullscreen
- - fullscreenchange
- - イベント
- - 全画面モード
-translation_of: Web/API/Document/fullscreenchange_event
----
-
{{APIRef}}
-
-
fullscreenchange
イベントは、ブラウザーが全画面モードに移行したり終了したりした直後に発生します。
-
-
-
-
- バブリング |
- あり |
-
-
- キャンセル |
- 不可 |
-
-
- インターフェイス |
- {{domxref("Event")}} |
-
-
- イベントハンドラープロパティ |
- {{domxref("Document.onfullscreenchange", "onfullscreenchange")}} |
-
-
-
-
-
このイベントは、全画面モードに移行または終了しようとしている Element
に送られ、それから Document
までバブリングします。
-
-<p<code>Element が全画面モードに移行しようとしているのか、終了しようとしているのかを判別するには、 {{domxref("DocumentOrShadowRoot/fullscreenElement", "DocumentOrShadowRoot.fullscreenElement")}} の値をチェックしてください。この値が
null
ならば、要素が全画面モードを終了しようとしており、そうでなければ全画面モードに移行しようとしています。
-
-
例
-
-
この例では、 fullscreenchange
イベントのハンドラーが {{domxref("Document")}} に追加されます。
-
-
document.addEventListener('fullscreenchange', (event) => {
- // document.fullscreenElement は、全画面モードにある要素があれば
- // それを指します。要素がなければ、このプロパティの値は null に
- // あります。
- if (document.fullscreenElement) {
- console.log(`Element: ${document.fullscreenElement.id} entered full-screen mode.`);
- } else {
- console.log('Leaving full-screen mode.');
- }
-});
-
-
-
その他の例については Element: fullscreenchange イベントを参照してください。
-
-
仕様書
-
-
-
-
- 仕様書 |
- 状態 |
-
-
-
-
- {{SpecName("Fullscreen")}} |
- {{Spec2("Fullscreen")}} |
-
-
-
-
-
ブラウザーの互換性
-
-
{{Compat("api.Document.fullscreenchange_event")}}
-
-
関連情報
-
-
- - {{domxref("Document/fullscreenerror_event", "fullscreenerror")}}
- - {{domxref("Element")}}: {{domxref("Element/fullscreenchange_event", "fullscreenchange")}} イベント
- - Fullscreen API
- - Fullscreen API のガイド
-
diff --git a/files/ja/web/api/document/fullscreenchange_event/index.md b/files/ja/web/api/document/fullscreenchange_event/index.md
new file mode 100644
index 00000000000000..b4d6b847a1ecfc
--- /dev/null
+++ b/files/ja/web/api/document/fullscreenchange_event/index.md
@@ -0,0 +1,80 @@
+---
+title: 'Document: fullscreenchange イベント'
+slug: Web/API/Document/fullscreenchange_event
+tags:
+ - API
+ - Fullscreen API
+ - Reference
+ - events
+ - fullscreen
+ - fullscreenchange
+ - イベント
+ - 全画面モード
+translation_of: Web/API/Document/fullscreenchange_event
+---
+{{APIRef}}
+
+`fullscreenchange` イベントは、ブラウザーが全画面モードに移行したり終了したりした直後に発生します。
+
+
+
+
+ バブリング |
+ あり |
+
+
+ キャンセル |
+ 不可 |
+
+
+ インターフェイス |
+ {{domxref("Event")}} |
+
+
+ イベントハンドラープロパティ |
+
+ {{domxref("Document.onfullscreenchange", "onfullscreenchange")}}
+ |
+
+
+
+
+このイベントは、全画面モードに移行または終了しようとしている `Element` に送られ、それから `Document` までバブリングします。
+
+\
Element が全画面モードに移行しようとしているのか、終了しようとしているのかを判別するには、 {{domxref("DocumentOrShadowRoot/fullscreenElement", "DocumentOrShadowRoot.fullscreenElement")}} の値をチェックしてください。この値が `null` ならば、要素が全画面モードを終了しようとしており、そうでなければ全画面モードに移行しようとしています。
+
+## 例
+
+この例では、 `fullscreenchange` イベントのハンドラーが {{domxref("Document")}} に追加されます。
+
+```js
+document.addEventListener('fullscreenchange', (event) => {
+ // document.fullscreenElement は、全画面モードにある要素があれば
+ // それを指します。要素がなければ、このプロパティの値は null に
+ // あります。
+ if (document.fullscreenElement) {
+ console.log(`Element: ${document.fullscreenElement.id} entered full-screen mode.`);
+ } else {
+ console.log('Leaving full-screen mode.');
+ }
+});
+```
+
+その他の例については [Element: fullscreenchange イベント](/ja/docs/Web/API/Element/fullscreenchange_event)を参照してください。
+
+## 仕様書
+
+| 仕様書 | 状態 |
+| ------------------------------------ | -------------------------------- |
+| {{SpecName("Fullscreen")}} | {{Spec2("Fullscreen")}} |
+
+## ブラウザーの互換性
+
+{{Compat("api.Document.fullscreenchange_event")}}
+
+## 関連情報
+
+- {{domxref("Document/fullscreenerror_event", "fullscreenerror")}}
+- {{domxref("Element")}}: {{domxref("Element/fullscreenchange_event", "fullscreenchange")}} イベント
+- [Fullscreen API](/ja/docs/Web/API/Fullscreen_API)
+- [Fullscreen API のガイド](/ja/docs/Web/API/Fullscreen_API/Guide)
diff --git a/files/ja/web/api/document/fullscreenelement/index.html b/files/ja/web/api/document/fullscreenelement/index.html
deleted file mode 100644
index 7b464c3dbd314a..00000000000000
--- a/files/ja/web/api/document/fullscreenelement/index.html
+++ /dev/null
@@ -1,80 +0,0 @@
----
-title: DocumentOrShadowRoot.fullscreenElement
-slug: Web/API/Document/fullscreenElement
-tags:
- - API
- - Document
- - DocumentOrShadowRoot
- - Full-screen
- - Fullscreen API
- - Graphics
- - Property
- - Read-only
- - Reference
- - ShadowRoot
- - fullscreenElement
- - screen
- - グラフィック
- - 全画面
- - 読み取り専用
-translation_of: Web/API/DocumentOrShadowRoot/fullscreenElement
-original_slug: Web/API/DocumentOrShadowRoot/fullscreenElement
----
-
{{ApiRef("Fullscreen API")}}
-
-
DocumentOrShadowRoot.fullscreenElement
プロパティは読み取り専用で、この文書内で現在全画面モードで表示されている {{ domxref("Element") }} を返し、全画面モードを使用していない場合は null
を返します。
-
-
このプロパティは読み取り専用ですが、変更されても (strict モードでも) 例外は発生しません。設定しても何もせず、無視されます。
-
-
構文
-
-
var element = document.fullscreenElement;
-
-
返値
-
-
現在全画面モードになっている {{domxref("Element")}} オブジェクト。全画面モードがこの document
で使用されていない場合、返値は null
です。
-
-
例
-
-
この例は isVideoInFullscreen()
関数を表し、 fullscreenElement
からの返値を調べています。文書が全画面モードで (fullscreenElement
が null
ではなく)、全画面の要素の {{domxref("Node.nodeName", "nodeName")}} が VIDEO
、すなわち {{HTMLElement("video")}} 要素を表す場合、この関数は true
、すなわち動画が全画面モードであることを表します。
-
-
function isVideoInFullscreen() {
- if (document.fullscreenElement && document.fullscreenElement.nodeName == 'VIDEO') {
- return true;
- }
- return false;
-}
-
-
仕様書
-
-
-
-
- 仕様書 |
- 状態 |
- 備考 |
-
-
-
-
- {{SpecName("Fullscreen", "#dom-document-fullscreenelement", "Document.fullscreenElement")}} |
- {{Spec2("Fullscreen")}} |
- 初回定義 |
-
-
-
-
-
ブラウザーの対応
-
-
{{Compat("api.DocumentOrShadowRoot.fullscreenElement")}}
-
-
関連情報
-
-
- - Fullscreen API
- - Fullscreen API ガイド
- - {{ domxref("Element.requestFullscreen()") }}
- - {{ domxref("Document.exitFullscreen()") }}
- - {{ cssxref(":fullscreen") }} and {{cssxref("::backdrop")}}
- - {{HTMLElement("iframe")}} の {{ HTMLAttrXRef("allowfullscreen", "iframe") }} 属性
-
diff --git a/files/ja/web/api/document/fullscreenelement/index.md b/files/ja/web/api/document/fullscreenelement/index.md
new file mode 100644
index 00000000000000..2d5accc2eb38c3
--- /dev/null
+++ b/files/ja/web/api/document/fullscreenelement/index.md
@@ -0,0 +1,69 @@
+---
+title: DocumentOrShadowRoot.fullscreenElement
+slug: Web/API/Document/fullscreenElement
+tags:
+ - API
+ - Document
+ - DocumentOrShadowRoot
+ - Full-screen
+ - Fullscreen API
+ - Graphics
+ - Property
+ - Read-only
+ - Reference
+ - ShadowRoot
+ - fullscreenElement
+ - screen
+ - グラフィック
+ - 全画面
+ - 読み取り専用
+translation_of: Web/API/DocumentOrShadowRoot/fullscreenElement
+original_slug: Web/API/DocumentOrShadowRoot/fullscreenElement
+---
+{{ApiRef("Fullscreen API")}}
+
+**`DocumentOrShadowRoot.fullscreenElement`** プロパティは読み取り専用で、この文書内で現在全画面モードで表示されている {{ domxref("Element") }} を返し、全画面モードを使用していない場合は `null` を返します。
+
+このプロパティは読み取り専用ですが、変更されても (strict モードでも) 例外は発生しません。設定しても何もせず、無視されます。
+
+## 構文
+
+```
+var element = document.fullscreenElement;
+```
+
+### 返値
+
+現在全画面モードになっている {{domxref("Element")}} オブジェクト。全画面モードがこの `document` で使用されていない場合、返値は `null` です。
+
+## 例
+
+この例は `isVideoInFullscreen()` 関数を表し、 `fullscreenElement` からの返値を調べています。文書が全画面モードで (`fullscreenElement` が `null` ではなく)、全画面の要素の {{domxref("Node.nodeName", "nodeName")}} が `VIDEO`、すなわち {{HTMLElement("video")}} 要素を表す場合、この関数は `true`、すなわち動画が全画面モードであることを表します。
+
+```js
+function isVideoInFullscreen() {
+ if (document.fullscreenElement && document.fullscreenElement.nodeName == 'VIDEO') {
+ return true;
+ }
+ return false;
+}
+```
+
+## 仕様書
+
+| 仕様書 | 状態 | 備考 |
+| ------------------------------------------------------------------------------------------------------------------------ | -------------------------------- | -------- |
+| {{SpecName("Fullscreen", "#dom-document-fullscreenelement", "Document.fullscreenElement")}} | {{Spec2("Fullscreen")}} | 初回定義 |
+
+## ブラウザーの互換性
+
+{{Compat("api.DocumentOrShadowRoot.fullscreenElement")}}
+
+## 関連情報
+
+- [Fullscreen API](/ja/docs/Web/API/Fullscreen_API)
+- [Fullscreen API ガイド](/ja/docs/Web/API/Fullscreen_API/Guide)
+- {{ domxref("Element.requestFullscreen()") }}
+- {{ domxref("Document.exitFullscreen()") }}
+- {{ cssxref(":fullscreen") }} and {{cssxref("::backdrop")}}
+- {{HTMLElement("iframe")}} の {{ HTMLAttrXRef("allowfullscreen", "iframe") }} 属性
diff --git a/files/ja/web/api/document/fullscreenenabled/index.html b/files/ja/web/api/document/fullscreenenabled/index.html
deleted file mode 100644
index d0bf3bc632e45c..00000000000000
--- a/files/ja/web/api/document/fullscreenenabled/index.html
+++ /dev/null
@@ -1,77 +0,0 @@
----
-title: Document.fullscreenEnabled
-slug: Web/API/Document/fullscreenEnabled
-tags:
- - API
- - Document
- - Fullscreen API
- - Property
- - Read-only
- - Reference
- - fullscreenEnabled
- - プロパティ
- - 全画面
- - 画面
-translation_of: Web/API/Document/fullscreenEnabled
----
-
{{APIRef("Fullscreen API")}}
-
-
{{domxref("Document")}} インターフェイスの fullscreenEnabled
プロパティは読み取り専用で、全画面モードが使用できるかを示します。全画面モードは文書内にウィンドウ化されたプラグインを含まないページ、および文書内のすべての {{HTMLElement("iframe")}} 要素が {{HTMLAttrXRef("allowfullscreen", "iframe")}} 属性を持つページに限り使用することができます。
-
-
このプロパティは読み取り専用ですが、変更されても (strict モードでも) 例外を投げません。セッターは何もしないので、無視されます。
-
-
構文
-
-
var isFullscreenAvailable = document.fullscreenEnabled;
-
-
-
値
-
-
{{domxref("Boolean")}} 値であり、文書や要素が {{domxref("Element.requestFullscreen()")}} を呼び出すことで全画面モードに移行できるのであれば true
です。全画面モードが利用できないのであれば、値は false
になります。
-
-
例
-
-
この例では、 {{htmlElement("video")}} 要素に全画面モードへの移行を試みる前に fullscreenEnabled
の値をチェックし、利用できない場合には移行を試みないようにします。
-
-
function requestFullScreen() {
- if (document.fullscreenEnabled) {
- videoElement.requestFullScreen();
- } else {
- console.log('現在ブラウザーは全画面モードを使用することができません');
- }
-}
-
-
仕様書
-
-
-
-
- 仕様書 |
- 状態 |
- 備考 |
-
-
-
-
- {{SpecName("Fullscreen", "#dom-document-fullscreenenabled", "Document.fullscreenEnabled")}} |
- {{Spec2("Fullscreen")}} |
- 初回定義 |
-
-
-
-
-
ブラウザーの対応
-
-
{{Compat("api.Document.fullscreenEnabled")}}
-
-
関連情報
-
-
- - Fullscreen API
- - Fullscreen API ガイド
- - {{domxref("Element.requestFullscreen()")}}
- - {{domxref("Document.exitFullscreen()")}}
- - {{domxref("Document.fullscreenElement")}}
- - {{cssxref(":fullscreen")}} および {{cssxref("::backdrop")}}
- - {{HTMLElement("iframe")}} 要素の {{HTMLAttrXRef("allowfullscreen", "iframe")}} 属性
-
diff --git a/files/ja/web/api/document/fullscreenenabled/index.md b/files/ja/web/api/document/fullscreenenabled/index.md
new file mode 100644
index 00000000000000..78f9a7afc57354
--- /dev/null
+++ b/files/ja/web/api/document/fullscreenenabled/index.md
@@ -0,0 +1,65 @@
+---
+title: Document.fullscreenEnabled
+slug: Web/API/Document/fullscreenEnabled
+tags:
+ - API
+ - Document
+ - Fullscreen API
+ - Property
+ - Read-only
+ - Reference
+ - fullscreenEnabled
+ - プロパティ
+ - 全画面
+ - 画面
+translation_of: Web/API/Document/fullscreenEnabled
+---
+{{APIRef("Fullscreen API")}}
+
+{{domxref("Document")}} インターフェイスの **`fullscreenEnabled`** プロパティは読み取り専用で、全画面モードが使用できるかを示します。全画面モードは文書内にウィンドウ化されたプラグインを含まないページ、および文書内のすべての {{HTMLElement("iframe")}} 要素が {{HTMLAttrXRef("allowfullscreen", "iframe")}} 属性を持つページに限り使用することができます。
+
+このプロパティは読み取り専用ですが、変更されても (strict モードでも) 例外を投げません。セッターは何もしないので、無視されます。
+
+## 構文
+
+```
+var isFullscreenAvailable = document.fullscreenEnabled;
+```
+
+### 値
+
+{{domxref("Boolean")}} 値であり、文書や要素が {{domxref("Element.requestFullscreen()")}} を呼び出すことで全画面モードに移行できるのであれば `true` です。全画面モードが利用できないのであれば、値は `false` になります。
+
+## 例
+
+この例では、 {{htmlElement("video")}} 要素に全画面モードへの移行を試みる前に `fullscreenEnabled` の値をチェックし、利用できない場合には移行を試みないようにします。
+
+```js
+function requestFullScreen() {
+ if (document.fullscreenEnabled) {
+ videoElement.requestFullScreen();
+ } else {
+ console.log('現在ブラウザーは全画面モードを使用することができません');
+ }
+}
+```
+
+## 仕様書
+
+| 仕様書 | 状態 | 備考 |
+| ------------------------------------------------------------------------------------------------------------------------ | -------------------------------- | -------- |
+| {{SpecName("Fullscreen", "#dom-document-fullscreenenabled", "Document.fullscreenEnabled")}} | {{Spec2("Fullscreen")}} | 初回定義 |
+
+## ブラウザーの互換性
+
+{{Compat("api.Document.fullscreenEnabled")}}
+
+## 関連情報
+
+- [Fullscreen API](/ja/docs/Web/API/Fullscreen_API)
+- [Fullscreen API ガイド](/ja/docs/Web/API/Fullscreen_API/Guide)
+- {{domxref("Element.requestFullscreen()")}}
+- {{domxref("Document.exitFullscreen()")}}
+- {{domxref("Document.fullscreenElement")}}
+- {{cssxref(":fullscreen")}} および {{cssxref("::backdrop")}}
+- {{HTMLElement("iframe")}} 要素の {{HTMLAttrXRef("allowfullscreen", "iframe")}} 属性
diff --git a/files/ja/web/api/document/fullscreenerror_event/index.html b/files/ja/web/api/document/fullscreenerror_event/index.html
deleted file mode 100644
index 7459024c5d3c9e..00000000000000
--- a/files/ja/web/api/document/fullscreenerror_event/index.html
+++ /dev/null
@@ -1,81 +0,0 @@
----
-title: 'Document: fullscreenerror イベント'
-slug: Web/API/Document/fullscreenerror_event
-tags:
- - API
- - Error
- - Event
- - Fullscreen API
- - Reference
- - fullscreen
- - fullscreenerror
-translation_of: Web/API/Document/fullscreenerror_event
----
-
{{APIRef}}
-
-
fullscreenerror
イベントは、ブラウザーが全画面モードに移行できないときに発生します。
-
-
-
-
- バブリング |
- あり |
-
-
- キャンセル |
- 不可 |
-
-
- インターフェイス |
- {{domxref("Event")}} |
-
-
- イベントハンドラープロパティ |
- {{domxref("Document.onfullscreenerror", "onfullscreenerror")}} |
-
-
-
-
-
{{domxref("Document/fullscreenchange_event", "fullscreenchange")}} イベントと同様、二つの fullscreenerror
イベントが発行されます。一つ目はモード切替に失敗した {{domxref("Element")}} へ送られ、二つ目はその要素を所有する {{domxref("Document")}} へ送られます。
-
-
全画面モードへの切り替えに失敗する理由については、全画面 API のガイドを参照してください。
-
-
例
-
-
const requestor = document.querySelector('div');
-
-document.addEventListener('fullscreenerror', (event) => {
- console.error('an error occurred changing into fullscreen');
- console.log(event);
-});
-
-requestor.requestFullscreen();
-
-
仕様書
-
-
-
-
- 仕様書 |
- 状態 |
-
-
-
-
- {{SpecName("Fullscreen")}} |
- {{Spec2("Fullscreen")}} |
-
-
-
-
-
ブラウザーの互換性
-
-
{{Compat("api.Document.fullscreenerror_event")}}
-
-
関連情報
-
-
diff --git a/files/ja/web/api/document/fullscreenerror_event/index.md b/files/ja/web/api/document/fullscreenerror_event/index.md
new file mode 100644
index 00000000000000..37e3205da8884b
--- /dev/null
+++ b/files/ja/web/api/document/fullscreenerror_event/index.md
@@ -0,0 +1,72 @@
+---
+title: 'Document: fullscreenerror イベント'
+slug: Web/API/Document/fullscreenerror_event
+tags:
+ - API
+ - Error
+ - Event
+ - Fullscreen API
+ - Reference
+ - fullscreen
+ - fullscreenerror
+translation_of: Web/API/Document/fullscreenerror_event
+---
+{{APIRef}}
+
+`fullscreenerror` イベントは、ブラウザーが全画面モードに移行できないときに発生します。
+
+
+
+
+ バブリング |
+ あり |
+
+
+ キャンセル |
+ 不可 |
+
+
+ インターフェイス |
+ {{domxref("Event")}} |
+
+
+ イベントハンドラープロパティ |
+
+ {{domxref("Document.onfullscreenerror", "onfullscreenerror")}}
+ |
+
+
+
+
+{{domxref("Document/fullscreenchange_event", "fullscreenchange")}} イベントと同様、二つの `fullscreenerror` イベントが発行されます。一つ目はモード切替に失敗した {{domxref("Element")}} へ送られ、二つ目はその要素を所有する {{domxref("Document")}} へ送られます。
+
+全画面モードへの切り替えに失敗する理由については、[全画面 API のガイド](/ja/docs/Web/API/Fullscreen_API/Guide)を参照してください。
+
+## 例
+
+```js
+const requestor = document.querySelector('div');
+
+document.addEventListener('fullscreenerror', (event) => {
+ console.error('an error occurred changing into fullscreen');
+ console.log(event);
+});
+
+requestor.requestFullscreen();
+```
+
+## 仕様書
+
+| 仕様書 | 状態 |
+| ------------------------------------ | -------------------------------- |
+| {{SpecName("Fullscreen")}} | {{Spec2("Fullscreen")}} |
+
+## ブラウザーの互換性
+
+{{Compat("api.Document.fullscreenerror_event")}}
+
+## 関連情報
+
+- {{domxref("Document/fullscreenchange_event", "fullscreenchange")}}
+- [Fullscreen API](/ja/docs/Web/API/Fullscreen_API)
+- [Fullscreen API のガイド](/ja/docs/Web/API/Fullscreen_API/Guide)
diff --git a/files/ja/web/api/document/getanimations/index.html b/files/ja/web/api/document/getanimations/index.html
deleted file mode 100644
index a99523a92d9ae1..00000000000000
--- a/files/ja/web/api/document/getanimations/index.html
+++ /dev/null
@@ -1,80 +0,0 @@
----
-title: Document.getAnimations()
-slug: Web/API/Document/getAnimations
-tags:
- - API
- - Animation
- - CSS
- - CSS Animations
- - CSS Transitions
- - Document
- - Experimental
- - Method
- - Reference
- - Transitions
- - Web Animations
- - getAnimations
- - waapi
- - web animations api
-translation_of: Web/API/DocumentOrShadowRoot/getAnimations
-original_slug: Web/API/DocumentOrShadowRoot/getAnimations
----
-
{{ SeeCompatTable() }}{{APIRef("Web Animations")}}
-
-
getAnimations()
メソッドは {{domxref("Document")}} インターフェイスのメソッドで、この文書の配下にあるターゲット要素にあるすべての {{domxref("Animation")}} オブジェクトの配列を返します。この配列には CSS アニメーション, CSS トランジション, ウェブアニメーション が含まれます。
-
-
構文
-
-
var allAnimations = Document.getAnimations();
-
-
-
引数
-
-
なし。
-
-
返値
-
-
{{domxref("Animation")}} オブジェクトの {{jsxref("Array")}} で、それぞれの要素は呼び出された {{domxref("Document")}} の配下にある要素に現在関連付けられているアニメーション1つを表します。
-
-
例
-
-
次のコードスニペットは、ページ上のすべてのアニメーションの {{domxref("Animation.playbackRate")}} を半分にすることで速度をゆっくりにします。
-
-
document.getAnimations().forEach(
- function (animation) {
- animation.playbackRate *= .5;
- }
-);
-
-
仕様書
-
-
-
-
- 仕様書 |
- 状態 |
- 備考 |
-
-
-
-
- {{SpecName('Web Animations', '#dom-documentorshadowroot-getanimations', 'document.getAnimations()' )}} |
- {{Spec2('Web Animations')}} |
- |
-
-
-
-
-
ブラウザーの互換性
-
-
{{Compat("api.Document.getAnimations")}}
-
-
関連情報
-
-
diff --git a/files/ja/web/api/document/getanimations/index.md b/files/ja/web/api/document/getanimations/index.md
new file mode 100644
index 00000000000000..b91d6c7185787f
--- /dev/null
+++ b/files/ja/web/api/document/getanimations/index.md
@@ -0,0 +1,68 @@
+---
+title: Document.getAnimations()
+slug: Web/API/Document/getAnimations
+tags:
+ - API
+ - Animation
+ - CSS
+ - CSS Animations
+ - CSS Transitions
+ - Document
+ - Experimental
+ - Method
+ - Reference
+ - Transitions
+ - Web Animations
+ - getAnimations
+ - waapi
+ - web animations api
+translation_of: Web/API/DocumentOrShadowRoot/getAnimations
+original_slug: Web/API/DocumentOrShadowRoot/getAnimations
+---
+{{ SeeCompatTable() }}{{APIRef("Web Animations")}}
+
+`getAnimations()` メソッドは {{domxref("Document")}} インターフェイスのメソッドで、この文書の配下にあるターゲット要素にあるすべての {{domxref("Animation")}} オブジェクトの配列を返します。この配列には [CSS アニメーション](/ja/docs/Web/CSS/CSS_Animations), [CSS トランジション](/ja/docs/Web/CSS/CSS_Transitions), [ウェブアニメーション](/ja/docs/Web/API/Web_Animations_API) が含まれます。
+
+## 構文
+
+```
+var allAnimations = Document.getAnimations();
+```
+
+### 引数
+
+なし。
+
+### 返値
+
+{{domxref("Animation")}} オブジェクトの {{jsxref("Array")}} で、それぞれの要素は呼び出された {{domxref("Document")}} の配下にある要素に現在関連付けられているアニメーション 1 つを表します。
+
+## 例
+
+次のコードスニペットは、ページ上のすべてのアニメーションの {{domxref("Animation.playbackRate")}} を半分にすることで速度をゆっくりにします。
+
+```js
+document.getAnimations().forEach(
+ function (animation) {
+ animation.playbackRate *= .5;
+ }
+);
+```
+
+## 仕様書
+
+| 仕様書 | 状態 | 備考 |
+| ---------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ | ---- |
+| {{SpecName('Web Animations', '#dom-documentorshadowroot-getanimations', 'document.getAnimations()' )}} | {{Spec2('Web Animations')}} | |
+
+## ブラウザーの互換性
+
+{{Compat("api.Document.getAnimations")}}
+
+## 関連情報
+
+- [ウェブアニメーション API](/ja/docs/Web/API/Web_Animations_API)
+- [CSS アニメーション](/ja/docs/Web/CSS/CSS_Animations)
+- [CSS トランジション](/ja/docs/Web/CSS/CSS_Transitions)
+- {{domxref("Element.getAnimations()")}} - 単一の要素 ({{domxref("Element")}}) とその子孫にあるアニメーションのみを読み取る
+- {{domxref("Animation")}}
diff --git a/files/ja/web/api/document/getelementbyid/index.html b/files/ja/web/api/document/getelementbyid/index.html
deleted file mode 100644
index 6bf6b57b9777f5..00000000000000
--- a/files/ja/web/api/document/getelementbyid/index.html
+++ /dev/null
@@ -1,149 +0,0 @@
----
-title: Document.getElementById()
-slug: Web/API/Document/getElementById
-tags:
- - API
- - DOM
- - Document
- - Elements
- - Method
- - Reference
- - Web
- - getElementById
- - id
-translation_of: Web/API/Document/getElementById
----
-
{{ ApiRef("DOM") }}
-
-
{{domxref("Document")}} の getElementById()
メソッドは、 {{domxref("Element.id", "id")}} プロパティが指定された文字列に一致する要素を表す {{domxref("Element")}} オブジェクトを返します。要素の ID は指定されていれば固有であることが求められているため、特定の要素にすばやくアクセスするには便利な方法です。
-
-
ID を持たない要素にアクセスする必要がある場合は、 {{domxref("Document.querySelector", "querySelector()")}} で何らかの{{Glossary("CSS selector", "セレクター")}}を使用して要素を検索することができます。
-
-
構文
-
-
var element = document.getElementById(id);
-
-
-
引数
-
-
- id
- - 探す要素の ID です。 ID は大文字と小文字の区別がある文字列で、文書内で固有です。指定された ID の要素は一つしかありません。
-
-
-
返値
-
-
指定された ID に一致する DOM 要素オブジェクトを記述した {{domxref("Element")}} オブジェクト、または文書内に一致する要素がなければ null
です。
-
-
例
-
-
HTML
-
-
<html>
-<head>
- <title>getElementById example</title>
-</head>
-<body>
- <p id="para">Some text here</p>
- <button onclick="changeColor('blue');">blue</button>
- <button onclick="changeColor('red');">red</button>
-</body>
-</html>
-
-
JavaScript
-
-
function changeColor(newColor) {
- var elem = document.getElementById('para');
- elem.style.color = newColor;
-}
-
-
結果
-
-
{{ EmbedLiveSample('Example', 250, 100) }}
-
-
使用上のメモ
-
-
コードが機能するためには、メソッドの名前の中の "Id"
は、大文字と小文字を正しく表記しなければなりません。 getElementByID()
は自然に見えますが、妥当ではなく動作しません。
-
-
{{domxref("Document.querySelector()")}} や {{domxref("Document.querySelectorAll()")}} などの他の要素検索メソッドとは異なり、 getElementById()
はグローバルの document
オブジェクトに対してのみ利用可能であり、 DOM のすべての要素オブジェクトのメソッドとしては利用できません。 ID の値は文書全体を通して固有でなければならないため、機能の「ローカル」バージョンは必要ないのです。
-
-
例
-
-
<!doctype html>
-<html>
-<head>
- <meta charset="UTF-8">
- <title>Document</title>
-</head>
-<body>
- <div id="parent-id">
- <p>hello word1</p>
- <p id="test1">hello word2</p>
- <p>hello word3</p>
- <p>hello word4</p>
- </div>
- <script>
- var parentDOM = document.getElementById('parent-id');
- var test1 = parentDOM.getElementById('test1');
- //throw error
- //Uncaught TypeError: parentDOM.getElementById is not a function
- </script>
-</body>
-</html>
-
-
もし指定された id
を持つ要素がなければ、この関数は null
を返します。なお、 id
引数は大文字小文字の区別があるため、 document.getElementById("Main")
は <div id="main">
要素の代わりに null
を返し、これは "M" と "m" がこのメソッドの目的では区別されるためです。
-
-
文書内にない要素 は getElementById()
で検索されません。要素を作成し ID を割り当てたとき、 getElementById()
でアクセスする前に {{domxref("Node.insertBefore()")}} またはそのたぐいのメソッドで、要素を文書ツリーに挿入しておく必要があります。
-
-
var element = document.createElement('div');
-element.id = 'testqq';
-var el = document.getElementById('testqq'); // el は null になります
-
-
-
HTML 以外の文書の場合。 DOM の実装では、どの属性が ID 類であるかを示す情報が必要です。 "id" という名前の属性は、文書の DTD で定義されていない限り ID 類とみなされません。 id
属性は XHTML, XUL などの一般的な場合には ID 類として定義されています。属性が ID 類であるかどうかが分からない実装では、 null
を返すでしょう。
-
-
仕様書
-
-
-
-
- 仕様書 |
- 状態 |
- 備考 |
-
-
-
-
- {{SpecName('DOM1','level-one-html.html#method-getElementById','getElementById')}} |
- {{Spec2('DOM1')}} |
- インターフェイスの初回定義 |
-
-
- {{SpecName('DOM2 Core','core.html#ID-getElBId','getElementById')}} |
- {{Spec2('DOM2 Core')}} |
- DOM 1 の置き換え |
-
-
- {{SpecName('DOM3 Core','core.html#ID-getElBId','getElementById')}} |
- {{Spec2('DOM3 Core')}} |
- DOM 2 の置き換え |
-
-
- {{SpecName('DOM WHATWG','#dom-nonelementparentnode-getelementbyid','getElementById')}} |
- {{Spec2('DOM WHATWG')}} |
- DOM 3 を置き換える予定 |
-
-
-
-
-
ブラウザーの互換性
-
-
{{Compat("api.Document.getElementById")}}
-
-
関連情報
-
-
- - {{domxref("Document")}}: 文書内で要素への参照を取得するために使うことができる他のメソッドやプロパティで使用するための参照。
- - {{domxref("Document.querySelector()")}}:
'div.myclass'
のようなセレクターを通したクエリのためのもの。
- - xml:id -
getElementById()
による XML 文書 (Ajax 呼び出しによって返されるものなど) の 'xml:id' の取得を可能とする便利なメソッドを持つ
-
diff --git a/files/ja/web/api/document/getelementbyid/index.md b/files/ja/web/api/document/getelementbyid/index.md
new file mode 100644
index 00000000000000..7dda8222c66573
--- /dev/null
+++ b/files/ja/web/api/document/getelementbyid/index.md
@@ -0,0 +1,128 @@
+---
+title: Document.getElementById()
+slug: Web/API/Document/getElementById
+tags:
+ - API
+ - DOM
+ - Document
+ - Elements
+ - Method
+ - Reference
+ - Web
+ - getElementById
+ - id
+translation_of: Web/API/Document/getElementById
+---
+{{ ApiRef("DOM") }}
+
+{{domxref("Document")}} の **`getElementById()`** メソッドは、 {{domxref("Element.id", "id")}} プロパティが指定された文字列に一致する要素を表す {{domxref("Element")}} オブジェクトを返します。要素の ID は指定されていれば固有であることが求められているため、特定の要素にすばやくアクセスするには便利な方法です。
+
+ID を持たない要素にアクセスする必要がある場合は、 {{domxref("Document.querySelector", "querySelector()")}} で何らかの{{Glossary("CSS selector", "セレクター")}}を使用して要素を検索することができます。
+
+## 構文
+
+```
+var element = document.getElementById(id);
+```
+
+### 引数
+
+- `id`
+ - : 探す要素の ID です。 ID は大文字と小文字の区別がある文字列で、文書内で固有です。指定された ID の要素は一つしかありません。
+
+### 返値
+
+指定された ID に一致する DOM 要素オブジェクトを記述した {{domxref("Element")}} オブジェクト、または文書内に一致する要素がなければ `null` です。
+
+## 例
+
+### HTML
+
+```html
+
+
+
getElementById example
+
+
+
Some text here
+
+
+
+
+```
+
+### JavaScript
+
+```js
+function changeColor(newColor) {
+ var elem = document.getElementById('para');
+ elem.style.color = newColor;
+}
+```
+
+### 結果
+
+{{ EmbedLiveSample('Example', 250, 100) }}
+
+## 使用上のメモ
+
+コードが機能するためには、メソッドの名前の中の `"Id"` は、大文字と小文字を正しく表記し*なければなりません*。 `getElementByID()` は自然に見えますが、妥当では*なく*動作しません。
+
+{{domxref("Document.querySelector()")}} や {{domxref("Document.querySelectorAll()")}} などの他の要素検索メソッドとは異なり、 `getElementById()` はグローバルの `document` オブジェクトに対してのみ利用可能であり、 DOM のすべての要素オブジェクトのメソッドとしては利用*できません*。 ID の値は文書全体を通して固有でなければならないため、機能の「ローカル」バージョンは必要ないのです。
+
+## 例
+
+```
+
+
+
+
+
Document
+
+
+
+
hello word1
+
hello word2
+
hello word3
+
hello word4
+
+
+
+
+```
+
+もし指定された `id` を持つ要素がなければ、この関数は `null` を返します。なお、 `id` 引数は大文字小文字の区別があるため、 `document.getElementById("Main")` は `
` 要素の代わりに `null` を返し、これは "M" と "m" がこのメソッドの目的では区別されるためです。
+
+**文書内にない要素** は `getElementById()` で検索されません。要素を作成し ID を割り当てたとき、 `getElementById()` でアクセスする前に {{domxref("Node.insertBefore()")}} またはそのたぐいのメソッドで、要素を文書ツリーに挿入しておく必要があります。
+
+```js
+var element = document.createElement('div');
+element.id = 'testqq';
+var el = document.getElementById('testqq'); // el は null になります
+```
+
+**HTML 以外の文書**の場合。 DOM の実装では、どの属性が ID 類であるかを示す情報が必要です。 "id" という名前の属性は、文書の DTD で定義されていない限り ID 類とみなされません。 `id` 属性は [XHTML](/ja/docs/XHTML), [XUL](/ja/docs/XUL) などの一般的な場合には ID 類として定義されています。属性が ID 類であるかどうかが分からない実装では、 `null` を返すでしょう。
+
+## 仕様書
+
+| 仕様書 | 状態 | 備考 |
+| -------------------------------------------------------------------------------------------------------------------- | -------------------------------- | -------------------------- |
+| {{SpecName('DOM1','level-one-html.html#method-getElementById','getElementById')}} | {{Spec2('DOM1')}} | インターフェイスの初回定義 |
+| {{SpecName('DOM2 Core','core.html#ID-getElBId','getElementById')}} | {{Spec2('DOM2 Core')}} | DOM 1 の置き換え |
+| {{SpecName('DOM3 Core','core.html#ID-getElBId','getElementById')}} | {{Spec2('DOM3 Core')}} | DOM 2 の置き換え |
+| {{SpecName('DOM WHATWG','#dom-nonelementparentnode-getelementbyid','getElementById')}} | {{Spec2('DOM WHATWG')}} | DOM 3 を置き換える予定 |
+
+## ブラウザーの互換性
+
+{{Compat("api.Document.getElementById")}}
+
+## 関連情報
+
+- {{domxref("Document")}}: 文書内で要素への参照を取得するために使うことができる他のメソッドやプロパティで使用するための参照。
+- {{domxref("Document.querySelector()")}}: `'div.myclass'` のようなセレクターを通したクエリのためのもの。
+- [xml:id](/ja/docs/xml/xml:id) - `getElementById()` による XML 文書 (Ajax 呼び出しによって返されるものなど) の 'xml:id' の取得を可能とする便利なメソッドを持つ
diff --git a/files/ja/web/api/document/getelementsbyclassname/index.html b/files/ja/web/api/document/getelementsbyclassname/index.html
deleted file mode 100644
index 956a475919062a..00000000000000
--- a/files/ja/web/api/document/getelementsbyclassname/index.html
+++ /dev/null
@@ -1,136 +0,0 @@
----
-title: Document.getElementsByClassName()
-slug: Web/API/Document/getElementsByClassName
-tags:
- - API
- - DOM
- - DOM Element Methods
- - Element
- - HTML5
- - Method
- - Reference
- - メソッド
-translation_of: Web/API/Document/getElementsByClassName
----
-
{{APIRef("DOM")}}
-
-
{{domxref("Document")}} インターフェイスの getElementsByClassName
メソッドは、指定されたクラス名をすべて持つすべての子要素の配列風オブジェクトを返します。 {{domxref("document")}} オブジェクトに対して呼び出したときは、ルートノードを含む文書全体が検索されます。任意の要素に対して {{domxref("Element.getElementsByClassName", "getElementsByClassName()")}} を呼び出すこともできます。その場合は、指定されたルート要素下の指定されたクラス名を持つ要素だけを返します。
-
-
構文
-
-
var elements = document.getElementsByClassName(names); // または
-var elements = rootElement.getElementsByClassName(names);
-
-
- - elements は、見つかった要素の生きた {{domxref("HTMLCollection")}} です。
- - names は文字列で、一致させるクラス名を表します。複数のクラス名はホワイトスペースで区切ります。
- - {{domxref("Element.getElementsByClassName", "getElementsByClassName")}} は、 {{domxref("document")}} だけでなく、任意の要素に対して呼び出すことができます。呼び出した要素が検索のルートとして使われます。
-
-
-
例
-
-
'test' クラスを持つすべての要素を取得します。
-
-
document.getElementsByClassName('test')
-
-
'red' および 'test' クラスを両方持つすべての要素を取得します。
-
-
document.getElementsByClassName('red test')
-
-
'main' という ID を持った要素の中にある、 'text' クラスを持つすべての要素を取得します。
-
-
document.getElementById('main').getElementsByClassName('test')
-
-
'test' クラスを持つ最初の要素を取得し、一致する要素がなければ undefined
になります。
-
-
document.getElementsByClassName('test')[0]
-
-
メソッドの this 値として {{domxref("HTMLCollection")}} を渡すことで、 Array プロトタイプのメソッドを HTMLCollection
で使用することができます。ここでは、 'test' クラスを持つすべての div 要素を検索します。
-
-
var testElements = document.getElementsByClassName('test');
-var testDivs = Array.prototype.filter.call(testElements, function(testElement){
- return testElement.nodeName === 'DIV';
-});
-
-
クラスが 'test' である最初の要素を取得する
-
-
これは最もよく使われる操作のメソッドです。
-
-
<html>
-<body>
- <div id="parent-id">
- <p>hello world 1</p>
- <p class="test">hello world 2</p>
- <p>hello world 3</p>
- <p>hello world 4</p>
- </div>
-
- <script>
- var parentDOM = document.getElementById("parent-id");
-
- var test = parentDOM.getElementsByClassName("test"); // 一致する要素のリストであり、要素自身では*ない*
- console.log(test); //HTMLCollection[1]
-
- var testTarget = parentDOM.getElementsByClassName("test")[0]; // 求める最初の要素
- console.log(testTarget); //<p class="test">hello world 2</p>
- </script>
-</body>
-</html>
-
-
複数のクラスの例
-
-
document.getElementsByClassName
は document.querySelector
や document.querySelectorAll
ととても似た動きをします。指定されたクラス名がすべてある要素のみが選択されます。
-
-
HTML
-
-
<span class="orange fruit">Orange Fruit</span>
-<span class="orange juice">Orange Juice</span>
-<span class="apple juice">Apple Juice</span>
-<span class="foo bar">Something Random</span>
-<textarea id="resultArea" style="width:98%;height:7em"></textarea>
-
-
JavaScript
-
-
// getElementsByClassName は指定された両方のクラスを持つ要素のみを選択する
-var allOrangeJuiceByClass = document.getElementsByClassName('orange juice');
-var result = "document.getElementsByClassName('orange juice')";
-for (var i=0, len=allOrangeJuiceByClass.length|0; i<len; i=i+1|0) {
- result += "\n " + allOrangeJuiceByClass[i].textContent;
-}
-
-
-// querySelector は完全一致で選択する
-var allOrangeJuiceQuery = document.querySelectorAll('.orange.juice');
-result += "\n\ndocument.querySelectorAll('.orange.juice')";
-for (var i=0, len=allOrangeJuiceQuery.length|0; i<len; i=i+1|0) {
- result += "\n " + allOrangeJuiceQuery[i].textContent;
-}
-
-document.getElementById("resultArea").value = result;
-
-
結果
-
-
{{EmbedLiveSample('Multiple_Classes_Example', '100%', 200)}}
-
-
仕様書
-
-
-
-
- 仕様書 |
- 状態 |
- 備考 |
-
-
-
-
- {{SpecName('DOM WHATWG', '#dom-document-getelementsbyclassname', 'document.getElementsByClassName')}} |
- {{Spec2('DOM WHATWG')}} |
- |
-
-
-
-
-
ブラウザーの互換性
-
-
{{Compat("api.Document.getElementsByClassName")}}
diff --git a/files/ja/web/api/document/getelementsbyclassname/index.md b/files/ja/web/api/document/getelementsbyclassname/index.md
new file mode 100644
index 00000000000000..7283791ed6b74a
--- /dev/null
+++ b/files/ja/web/api/document/getelementsbyclassname/index.md
@@ -0,0 +1,139 @@
+---
+title: Document.getElementsByClassName()
+slug: Web/API/Document/getElementsByClassName
+tags:
+ - API
+ - DOM
+ - DOM Element Methods
+ - Element
+ - HTML5
+ - Method
+ - Reference
+ - メソッド
+translation_of: Web/API/Document/getElementsByClassName
+---
+{{APIRef("DOM")}}
+
+{{domxref("Document")}} インターフェイスの **`getElementsByClassName`** メソッドは、指定されたクラス名をすべて持つすべての子要素の配列風オブジェクトを返します。 {{domxref("document")}} オブジェクトに対して呼び出したときは、ルートノードを含む文書全体が検索されます。任意の要素に対して {{domxref("Element.getElementsByClassName", "getElementsByClassName()")}} を呼び出すこともできます。その場合は、指定されたルート要素下の指定されたクラス名を持つ要素だけを返します。
+
+## 構文
+
+```
+var elements = document.getElementsByClassName(names); // または
+var elements = rootElement.getElementsByClassName(names);
+```
+
+- _elements_ は、見つかった要素の生きた {{domxref("HTMLCollection")}} です。
+- _names_ は文字列で、一致させるクラス名を表します。複数のクラス名はホワイトスペースで区切ります。
+- {{domxref("Element.getElementsByClassName", "getElementsByClassName")}} は、 {{domxref("document")}} だけでなく、任意の要素に対して呼び出すことができます。呼び出した要素が検索のルートとして使われます。
+
+## 例
+
+'test' クラスを持つすべての要素を取得します。
+
+```js
+document.getElementsByClassName('test')
+```
+
+'red' および 'test' クラスを両方持つすべての要素を取得します。
+
+```js
+document.getElementsByClassName('red test')
+```
+
+'main' という ID を持った要素の中にある、 'text' クラスを持つすべての要素を取得します。
+
+```js
+document.getElementById('main').getElementsByClassName('test')
+```
+
+'test' クラスを持つ最初の要素を取得し、一致する要素がなければ `undefined` になります。
+
+```js
+document.getElementsByClassName('test')[0]
+```
+
+メソッドの _this_ 値として {{domxref("HTMLCollection")}} を渡すことで、 Array プロトタイプのメソッドを `HTMLCollection` で使用することができます。ここでは、 'test' クラスを持つすべての div 要素を検索します。
+
+```js
+var testElements = document.getElementsByClassName('test');
+var testDivs = Array.prototype.filter.call(testElements, function(testElement){
+ return testElement.nodeName === 'DIV';
+});
+```
+
+### クラスが 'test' である最初の要素を取得する
+
+これは最もよく使われる操作のメソッドです。
+
+```
+
+
+
+
hello world 1
+
hello world 2
+
hello world 3
+
hello world 4
+
+
+
+
+
+```
+
+### 複数のクラスの例
+
+`document.getElementsByClassName` は `document.querySelector` や `document.querySelectorAll` ととても似た動きをします。指定されたクラス名がすべてある要素のみが選択されます。
+
+#### HTML
+
+```html
+
Orange Fruit
+
Orange Juice
+
Apple Juice
+
Something Random
+
+```
+
+#### JavaScript
+
+```js
+// getElementsByClassName は指定された両方のクラスを持つ要素のみを選択する
+var allOrangeJuiceByClass = document.getElementsByClassName('orange juice');
+var result = "document.getElementsByClassName('orange juice')";
+for (var i=0, len=allOrangeJuiceByClass.length|0; i
{{APIRef("DOM")}}
-
-
{{domxref("Document")}} オブジェクトの getElementsByName()
メソッドは、文書内で指定した {{domxref("element.name","name")}} を持つ要素の {{domxref("NodeList")}} コレクションを返します。
-
-
構文
-
-
var elements = document.getElementsByName(name);
-
-
-
- - elements は、生きた {{domxref("NodeList")}} コレクション、つまり文書内で同じ
name
を持った新しい要素が追加されたり削除されたりすると自動的に更新されるものです。
- name
は、要素の name
属性の値です。
-
-
-
例
-
-
<!DOCTYPE html>
-<html lang="en">
-<title>document.getElementsByName の使用例</title>
-
-<input type="hidden" name="up">
-<input type="hidden" name="down">
-
-<script>
- var up_names = document.getElementsByName("up");
- console.log(up_names[0].tagName); // "INPUT" と表示
-</script>
-</html>
-
-
-
メモ
-
-
{{domxref("element.name","name")}} 属性は、(X)HTML 文書にのみ適用可能です。
-
-
返却された {{domxref("NodeList")}} コレクションには、 {{htmlelement("meta")}} や {{htmlelement("object")}} など、それに name
属性にまったく対応していない要素も含め、指定された name
を持つすべての要素が含まれます。
-
-
-
getElementsByName メソッドは、 IE10 以前では動作が異なります。この場合、 getElementsByName()
は指定された id
属性を持つ要素も返します。 name
および id
で同じ文字列を使用しないように注意してください。
-
-
-
-
getElementsByName メソッドは IE では動作が異なります。この場合、 getElementsByName()
は name
属性を許容しない要素 (<span>
など) を返しません。
-
-
-
-
IE および Edge では、 {{domxref("NodeList")}} ではなく {{domxref("HTMLCollection")}} を返します。
-
-
-
仕様書
-
-
-
-
- 仕様書 |
- 状態 |
- 備考 |
-
-
-
-
- {{SpecName('HTML WHATWG', '#dom-document-getelementsbyname', "Document.getElementsByName()")}} |
- {{ Spec2('HTML WHATWG') }} |
- |
-
-
- {{SpecName("DOM2 HTML", "html.html#ID-71555259", "Document.getElementsByName()")}} |
- {{Spec2("DOM2 HTML")}} |
- 初回定義 |
-
-
-
-
-
ブラウザーの対応
-
-
{{Compat("api.Document.getElementsByName")}}
-
-
関連情報
-
-
- - {{domxref("document.getElementById()")}} : 固有の
id
を持つ要素への参照を返す
- - {{domxref("document.getElementsByTagName()")}} : 同じタグ名の要素への参照を返す
- - {{domxref("document.querySelector()")}} :
'div.myclass'
のような CSS セレクターによって要素への参照をかえす
-
diff --git a/files/ja/web/api/document/getelementsbyname/index.md b/files/ja/web/api/document/getelementsbyname/index.md
new file mode 100644
index 00000000000000..a368f1ee1bc207
--- /dev/null
+++ b/files/ja/web/api/document/getelementsbyname/index.md
@@ -0,0 +1,72 @@
+---
+title: Document.getElementsByName()
+slug: Web/API/Document/getElementsByName
+tags:
+ - API
+ - DOM
+ - Document
+ - HTML
+ - Method
+ - Reference
+ - getElementByName
+ - メソッド
+translation_of: Web/API/Document/getElementsByName
+---
+{{APIRef("DOM")}}
+
+{{domxref("Document")}} オブジェクトの **`getElementsByName()`** メソッドは、文書内で指定した {{domxref("element.name","name")}} を持つ要素の {{domxref("NodeList")}} コレクションを返します。
+
+## 構文
+
+```
+var elements = document.getElementsByName(name);
+```
+
+- _elements_ は、生きた {{domxref("NodeList")}} コレクション、つまり文書内で同じ `name` を持った新しい要素が追加されたり削除されたりすると自動的に更新されるものです。
+- `name` は、要素の `name` 属性の値です。
+
+## 例
+
+```html
+
+
+
document.getElementsByName の使用例
+
+
+
+
+
+
+```
+
+## メモ
+
+{{domxref("element.name","name")}} 属性は、(X)HTML 文書にのみ適用可能です。
+
+返却された {{domxref("NodeList")}} コレクションには、 {{htmlelement("meta")}} や {{htmlelement("object")}} など、それに `name` 属性にまったく対応していない要素も含め、指定された `name` を持つ*すべての*要素が含まれます。
+
+> **Warning:** **getElementsByName** メソッドは、 IE10 以前では動作が異なります。この場合、 `getElementsByName()` は指定された [`id` 属性](/ja/docs/Web/HTML/Global_attributes/id)を持つ要素も返します。 `name` および `id` で同じ文字列を使用しないように注意してください。
+
+> **Warning:** **getElementsByName** メソッドは IE では動作が異なります。この場合、 `getElementsByName()` は `name` 属性を許容しない要素 (`
` など) を返しません。
+
+> **Warning:** IE および Edge では、 {{domxref("NodeList")}} ではなく {{domxref("HTMLCollection")}} を返します。
+
+## 仕様書
+
+| 仕様書 | 状態 | 備考 |
+| ---------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ | -------- |
+| {{SpecName('HTML WHATWG', '#dom-document-getelementsbyname', "Document.getElementsByName()")}} | {{ Spec2('HTML WHATWG') }} | |
+| {{SpecName("DOM2 HTML", "html.html#ID-71555259", "Document.getElementsByName()")}} | {{Spec2("DOM2 HTML")}} | 初回定義 |
+
+## ブラウザーの互換性
+
+{{Compat("api.Document.getElementsByName")}}
+
+## 関連情報
+
+- {{domxref("document.getElementById()")}} : 固有の `id` を持つ要素への参照を返す
+- {{domxref("document.getElementsByTagName()")}} : 同じ[タグ名](/ja/docs/Web/API/Element/tagName)の要素への参照を返す
+- {{domxref("document.querySelector()")}} : `'div.myclass'` のような CSS セレクターによって要素への参照をかえす
diff --git a/files/ja/web/api/document/getelementsbytagname/index.html b/files/ja/web/api/document/getelementsbytagname/index.html
deleted file mode 100644
index a17a973739e01b..00000000000000
--- a/files/ja/web/api/document/getelementsbytagname/index.html
+++ /dev/null
@@ -1,126 +0,0 @@
----
-title: Document.getElementsByTagName()
-slug: Web/API/Document/getElementsByTagName
-tags:
- - API
- - DOM
- - Method
- - Reference
-translation_of: Web/API/Document/getElementsByTagName
----
-{{APIRef("DOM")}}
-
-getElementsByTagName
は {{domxref("Document")}} インターフェイスのメソッドで、指定されたタグ名を持つ要素の {{domxref("HTMLCollection")}} を返します。ルートノードを含めた文書全体が検索されます。返された HTMLCollection
は生きたものであり、つまり document.getElementsByTagName()
を再度呼び出さなくても DOM ツリーと同期を取り続けるよう、自動的に自分自身を更新します。.
-
-構文
-
-var elements = document.getElementsByTagName(name);
-
-
- - elements は生きた {{domxref("HTMLCollection")}} であり、見つかった要素がツリーに出現する順に並んでいます (ただし、下記のメモを見てください)。
- - name は文字列で、要素の名前を表します。特殊な文字列 "*" は全ての要素を表します。
-
-
-最新の W3C 仕様書 では
elements
は
HTMLCollection
です。しかし、 WebKit ブラウザーではこのメソッドは {{domxref("NodeList")}} を返します。詳しくは {{bug(14869)}} を見てください。
-
-例
-
-以下の例では、 getElementsByTagName()
は特定の親要素から開始し、その親要素から DOM を上から下へ再帰的に検索し、タグが name
パラメータと一致する子要素を探します。これは document.getElementsByTagName()
と、機能的に同等な {{domxref("Element.getElementsByTagName()")}} は、 DOM ツリー内の特定の要素から検索を始めることを示します。
-
-ボタンをクリックすると getElementsByTagName()
を使用して、特定の親 (文書自体または2つの {{HTMLElement("div")}} 要素の何れかに囲まれたもの) の子孫の段落要素を数えます。
-
-<!DOCTYPE html>
-<html lang="en">
-<head>
- <meta charset="UTF-8" />
- <title>getElementsByTagName example</title>
- <script>
- function getAllParaElems() {
- var allParas = document.getElementsByTagName('p');
- var num = allParas.length;
- alert('この文書には ' + num + ' 個の段落があります');
- }
-
- function div1ParaElems() {
- var div1 = document.getElementById('div1');
- var div1Paras = div1.getElementsByTagName('p');
- var num = div1Paras.length;
- alert('#div1 には ' + num + ' 個の段落があります');
- }
-
- function div2ParaElems() {
- var div2 = document.getElementById('div2');
- var div2Paras = div2.getElementsByTagName('p');
- var num = div2Paras.length;
- alert('#div2 には' + num + ' 個の段落があります');
- }
- </script>
-</head>
-<body style="border: solid green 3px">
- <p>Some outer text</p>
- <p>Some outer text</p>
-
- <div id="div1" style="border: solid blue 3px">
- <p>Some div1 text</p>
- <p>Some div1 text</p>
- <p>Some div1 text</p>
-
- <div id="div2" style="border: solid red 3px">
- <p>Some div2 text</p>
- <p>Some div2 text</p>
- </div>
- </div>
-
- <p>Some outer text</p>
- <p>Some outer text</p>
-
- <button onclick="getAllParaElems();">
- 文書内のすべての p 要素を表示</button><br />
-
- <button onclick="div1ParaElems();">
- div1 要素内のすべての p 要素を表示</button><br />
-
- <button onclick="div2ParaElems();">
- div2 要素内のすべての p 要素を表示</button>
-
-</body>
-</html>
-
-
-注
-
-HTML 文書上で呼び出された場合、 getElementsByTagName()
は処理前に引数を小文字に変換します。これは HTML 文書内のサブツリーにあるキャメルケースの SVG 要素に一致させようとする場合には望ましくありません。この場合は {{Domxref("document.getElementsByTagNameNS()")}} が便利です。 {{Bug(499656)}} を参照してください。
-
-document.getElementsByTagName()
は、検索が文書全体を含むという点以外は {{domxref("Element.getElementsByTagName()")}} と類似しています。
-
-仕様書
-
-
-
-
- 仕様書 |
- 状態 |
- 備考 |
-
-
-
-
- {{SpecName('DOM WHATWG','#dom-document-getelementsbytagname','document.getElementsByTagName')}} |
- {{Spec2('DOM WHATWG')}} |
- |
-
-
-
-
-ブラウザーの互換性
-
-{{Compat("api.Document.getElementsByTagName")}}
-
-関連情報
-
-
- - {{domxref("Element.getElementsByTagName()")}}
- - {{domxref("document.getElementById()")}} :
id
によって検索した要素への参照を返す
- - {{domxref("document.getElementsByName()")}} :
name
によって検索した要素への参照を返す
- - {{domxref("document.querySelector()")}} :
'div.myclass'
のような CSS セレクターによって要素への参照を返す
-
diff --git a/files/ja/web/api/document/getelementsbytagname/index.md b/files/ja/web/api/document/getelementsbytagname/index.md
new file mode 100644
index 00000000000000..7f5a1e3228dcfa
--- /dev/null
+++ b/files/ja/web/api/document/getelementsbytagname/index.md
@@ -0,0 +1,112 @@
+---
+title: Document.getElementsByTagName()
+slug: Web/API/Document/getElementsByTagName
+tags:
+ - API
+ - DOM
+ - Method
+ - Reference
+translation_of: Web/API/Document/getElementsByTagName
+---
+{{APIRef("DOM")}}
+
+**`getElementsByTagName`** は {{domxref("Document")}} インターフェイスのメソッドで、指定されたタグ名を持つ要素の {{domxref("HTMLCollection")}} を返します。ルートノードを含めた文書全体が検索されます。返された `HTMLCollection` は生きたものであり、つまり `document.getElementsByTagName()` を再度呼び出さなくても DOM ツリーと同期を取り続けるよう、自動的に自分自身を更新します。.
+
+## 構文
+
+```
+var elements = document.getElementsByTagName(name);
+```
+
+- _elements_ は生きた {{domxref("HTMLCollection")}} であり、見つかった要素がツリーに出現する順に並んでいます (ただし、下記のメモを見てください)。
+- _name_ は文字列で、要素の名前を表します。特殊な文字列 "\*" は全ての要素を表します。
+
+> **Note:** [最新の W3C 仕様書](https://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html) では `elements` は `HTMLCollection` です。しかし、 WebKit ブラウザーではこのメソッドは {{domxref("NodeList")}} を返します。詳しくは {{bug(14869)}} を見てください。
+
+## 例
+
+以下の例では、 `getElementsByTagName()` は特定の親要素から開始し、その親要素から DOM を上から下へ再帰的に検索し、タグが `name` パラメータと一致する子要素を探します。これは `document.getElementsByTagName()` と、機能的に同等な {{domxref("Element.getElementsByTagName()")}} は、 DOM ツリー内の特定の要素から検索を始めることを示します。
+
+ボタンをクリックすると `getElementsByTagName()` を使用して、特定の親 (文書自体または 2 つの {{HTMLElement("div")}} 要素の何れかに囲まれたもの) の子孫の段落要素を数えます。
+
+```html
+
+
+
+
+ getElementsByTagName example
+
+
+
+ Some outer text
+ Some outer text
+
+
+
Some div1 text
+
Some div1 text
+
Some div1 text
+
+
+
Some div2 text
+
Some div2 text
+
+
+
+ Some outer text
+ Some outer text
+
+
+
+
+
+
+
+
+
+```
+
+## 注
+
+HTML 文書上で呼び出された場合、 `getElementsByTagName()` は処理前に引数を小文字に変換します。これは HTML 文書内のサブツリーにあるキャメルケースの SVG 要素に一致させようとする場合には望ましくありません。この場合は {{Domxref("document.getElementsByTagNameNS()")}} が便利です。 {{Bug(499656)}} を参照してください。
+
+`document.getElementsByTagName()` は、検索が文書全体を含むという点以外は {{domxref("Element.getElementsByTagName()")}} と類似しています。
+
+## 仕様書
+
+| 仕様書 | 状態 | 備考 |
+| -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------- | ---- |
+| {{SpecName('DOM WHATWG','#dom-document-getelementsbytagname','document.getElementsByTagName')}} | {{Spec2('DOM WHATWG')}} | |
+
+## ブラウザーの互換性
+
+{{Compat("api.Document.getElementsByTagName")}}
+
+## 関連情報
+
+- {{domxref("Element.getElementsByTagName()")}}
+- {{domxref("document.getElementById()")}} : `id` によって検索した要素への参照を返す
+- {{domxref("document.getElementsByName()")}} : `name` によって検索した要素への参照を返す
+- {{domxref("document.querySelector()")}} : `'div.myclass'` のような CSS セレクターによって要素への参照を返す
diff --git a/files/ja/web/api/document/getelementsbytagnamens/index.html b/files/ja/web/api/document/getelementsbytagnamens/index.html
deleted file mode 100644
index f082bfb75fbf43..00000000000000
--- a/files/ja/web/api/document/getelementsbytagnamens/index.html
+++ /dev/null
@@ -1,162 +0,0 @@
----
-title: Document.getElementsByTagNameNS()
-slug: Web/API/Document/getElementsByTagNameNS
-tags:
- - API
- - DOM
- - Method
- - NeedsMarkupWork
- - NeedsSpecTable
- - Reference
- - getElementsByTagNameNS
-translation_of: Web/API/Document/getElementsByTagNameNS
----
-{{APIRef("DOM")}}
-
-指定された名前空間の指定されたタグ名を持つ要素のリストを返します。ルートノードを含め、文書全体が検索されます。
-
-構文
-
-elements = document.getElementsByTagNameNS(namespace, name)
-
-
-
- - elements は見つかった要素の生きた {{DOMxRef("NodeList")}} (但し下記のメモを参照) で、ツリーに現れる順です。
- - namespace は検索する要素の名前空間 URI です ({{domxref("Node.namespaceURI", "element.namespaceURI")}} を参照)。
- - name は検索する要素の局所名、またはすべての要素に一致する特殊な値
*
です ({{domxref("Node.localName", "element.localName")}} を参照)。
-
-
-注: W3C の仕様書では elements
は NodeList
であるとされていますが、 Gecko および Internet Explorer ではこのメソッドは {{DOMxRef("HTMLCollection")}} を返します。 Opera は NodeList
を返しますが、 namedItem
メソッドを実装しているので、 HTMLCollection
と同様になります。2012年1月時点で、 WebKit ブラウザーのみが純粋な NodeList
の値を返します。詳しくは bug 14869 を参照してください。
-
-注: 現在、このメソッドの引数は大文字と小文字を区別しますが、 Firefox 3.5 以前は大文字と小文字を区別していませんでした。詳しくは Firefox 3.6 の開発者リリースノートおよび {{domxref("Element.getElementsByTagNameNS")}} のブラウザーの互換性のメモをご覧ください。
-
-例
-
-以下の例では、 getElementsByTagNameNS
は特定の親要素から始め、 DOM 内を親要素から再帰的に通して検索し、タグの name
が引数に一致する子要素を検索します。
-
-なお、 getElementsByTagName
が呼び出されたノードが document
ではない場合、実際には {{domxref("element.getElementsByTagNameNS")}} メソッドが使用されます。
-
-以下の例を使用するには、新しいファイルにそのままコピー&ペーストして、 .xhtml の拡張子で保存してください。
-
-<html xmlns="http://www.w3.org/1999/xhtml">
-
-<head>
-<title>getElementsByTagNameNS example</title>
-
-<script type="text/javascript">
-
-function getAllParaElems()
-{
- var allParas = document.getElementsByTagNameNS("http://www.w3.org/1999/xhtml", "p");
-
- var num = allParas.length;
-
- alert("There are " + num + " <p> elements in this document");
-}
-
-
-function div1ParaElems()
-{
- var div1 = document.getElementById("div1")
- var div1Paras = div1.getElementsByTagNameNS("http://www.w3.org/1999/xhtml", "p");
-
- var num = div1Paras.length;
-
- alert("There are " + num + " <p> elements in div1 element");
-}
-
-
-function div2ParaElems()
-{
- var div2 = document.getElementById("div2")
- var div2Paras = div2.getElementsByTagNameNS("http://www.w3.org/1999/xhtml", "p");
-
- var num = div2Paras.length;
-
- alert("There are " + num + " <p> elements in div2 element");
-}
-
-</script>
-</head>
-
-<body style="border: solid green 3px">
-<p>Some outer text</p>
-<p>Some outer text</p>
-
- <div id="div1" style="border: solid blue 3px">
- <p>Some div1 text</p>
- <p>Some div1 text</p>
- <p>Some div1 text</p>
-
- <div id="div2" style="border: solid red 3px">
- <p>Some div2 text</p>
- <p>Some div2 text</p>
- </div>
- </div>
-
-<p>Some outer text</p>
-<p>Some outer text</p>
-
-<button onclick="getAllParaElems();">
- show all p elements in document</button><br />
-
-<button onclick="div1ParaElems();">
- show all p elements in div1 element</button><br />
-
-<button onclick="div2ParaElems();">
- show all p elements in div2 element</button>
-
-</body>
-</html>
-
-
-対応していないブラウザーでの代替方法
-
-要求されたブラウザーが XPath に対応していない場合、他のアプローチ (DOM のすべての子要素をたどって、すべての @xmlns インスタンスで識別する、など) で要求された局所名および名前空間を持つすべてのタグを検索する必要がありますが、 XPath の方がはるかに高速です。 (Explorer に対応するためには、このラッパークラスのように、以下の関数で XPath の代わりに XPath のラッパーを呼び出すことができます (Explorer は異なる API を持つ XPath に対応しています)。
-
-function getElementsByTagNameNSWrapper (ns, elName, doc, context) {
- if (!doc) {
- doc = document;
- }
- if (!context) {
- context = doc;
- }
-
- var result = doc.evaluate('//*[local-name()="'+elName+'" and namespace-uri() = "'+ns+'"]', context, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
-
- var a = [];
- for(var i = 0; i < result.snapshotLength; i++) {
- a[i] = result.snapshotItem(i);
- }
- return a;
-}
-
-
-仕様書
-
-
-
-
- 仕様書 |
- 状態 |
- 備考 |
-
-
-
-
- {{SpecName('DOM WHATWG', '#dom-document-getelementsbytagnamens', 'document.getElementsByTagNameNS')}} |
- {{Spec2('DOM WHATWG')}} |
- |
-
-
-
-
-ブラウザーの互換性
-
-{{Compat("api.Document.getElementsByTagNameNS")}}
-
-関連情報
-
-
- - {{DOMxRef("Element.getElementsByTagNameNS()")}}
-
diff --git a/files/ja/web/api/document/getelementsbytagnamens/index.md b/files/ja/web/api/document/getelementsbytagnamens/index.md
new file mode 100644
index 00000000000000..d59597cee9f9bc
--- /dev/null
+++ b/files/ja/web/api/document/getelementsbytagnamens/index.md
@@ -0,0 +1,148 @@
+---
+title: Document.getElementsByTagNameNS()
+slug: Web/API/Document/getElementsByTagNameNS
+tags:
+ - API
+ - DOM
+ - Method
+ - NeedsMarkupWork
+ - NeedsSpecTable
+ - Reference
+ - getElementsByTagNameNS
+translation_of: Web/API/Document/getElementsByTagNameNS
+---
+{{APIRef("DOM")}}
+
+指定された名前空間の指定されたタグ名を持つ要素のリストを返します。ルートノードを含め、文書全体が検索されます。
+
+## 構文
+
+```
+elements = document.getElementsByTagNameNS(namespace, name)
+```
+
+- _elements_ は見つかった要素の生きた {{DOMxRef("NodeList")}} (但し下記のメモを参照) で、ツリーに現れる順です。
+- _namespace_ は検索する要素の名前空間 URI です ({{domxref("Node.namespaceURI", "element.namespaceURI")}} を参照)。
+- _name_ は検索する要素の局所名、またはすべての要素に一致する特殊な値 `*` です ({{domxref("Node.localName", "element.localName")}} を参照)。
+
+> **Note:** W3C の仕様書では `elements` は `NodeList` であるとされていますが、 Gecko および Internet Explorer ではこのメソッドは {{DOMxRef("HTMLCollection")}} を返します。 Opera は `NodeList` を返しますが、 `namedItem` メソッドを実装しているので、 `HTMLCollection` と同様になります。2012 年 1 月時点で、 WebKit ブラウザーのみが純粋な `NodeList` の値を返します。詳しくは [bug 14869](https://bugzilla.mozilla.org/show_bug.cgi?id=14869) を参照してください。
+
+> **Note:** 現在、このメソッドの引数は大文字と小文字を区別しますが、 Firefox 3.5 以前は大文字と小文字を区別していませんでした。詳しくは [Firefox 3.6 の開発者リリースノート](/ja/docs/Mozilla/Firefox/Releases/3.6#DOM)および {{domxref("Element.getElementsByTagNameNS")}} のブラウザーの互換性のメモをご覧ください。
+
+## 例
+
+以下の例では、 `getElementsByTagNameNS` は特定の親要素から始め、 DOM 内を親要素から再帰的に通して検索し、タグの `name` が引数に一致する子要素を検索します。
+
+なお、 `getElementsByTagName` が呼び出されたノードが `document` ではない場合、実際には {{domxref("element.getElementsByTagNameNS")}} メソッドが使用されます。
+
+以下の例を使用するには、新しいファイルにそのままコピー&ペーストして、 .xhtml の拡張子で保存してください。
+
+```html
+
+
+
+getElementsByTagNameNS example
+
+
+
+
+
+Some outer text
+Some outer text
+
+
+
Some div1 text
+
Some div1 text
+
Some div1 text
+
+
+
Some div2 text
+
Some div2 text
+
+
+
+Some outer text
+Some outer text
+
+
+
+
+
+
+
+
+
+```
+
+## 対応していないブラウザーでの代替方法
+
+要求されたブラウザーが XPath に対応していない場合、他のアプローチ (DOM のすべての子要素をたどって、すべての @xmlns インスタンスで識別する、など) で要求された局所名および名前空間を持つすべてのタグを検索する必要がありますが、 XPath の方がはるかに高速です。 (Explorer に対応するためには、[このラッパークラス](http://www.davidflanagan.com/javascript5/display.php?n=21-10&f=21/10.js)のように、以下の関数で XPath の代わりに XPath のラッパーを呼び出すことができます (Explorer は異なる API を持つ XPath に対応しています)。
+
+```js
+function getElementsByTagNameNSWrapper (ns, elName, doc, context) {
+ if (!doc) {
+ doc = document;
+ }
+ if (!context) {
+ context = doc;
+ }
+
+ var result = doc.evaluate('//*[local-name()="'+elName+'" and namespace-uri() = "'+ns+'"]', context, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
+
+ var a = [];
+ for(var i = 0; i < result.snapshotLength; i++) {
+ a[i] = result.snapshotItem(i);
+ }
+ return a;
+}
+```
+
+## 仕様書
+
+| 仕様書 | 状態 | 備考 |
+| ---------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------- | ---- |
+| {{SpecName('DOM WHATWG', '#dom-document-getelementsbytagnamens', 'document.getElementsByTagNameNS')}} | {{Spec2('DOM WHATWG')}} | |
+
+## ブラウザーの互換性
+
+{{Compat("api.Document.getElementsByTagNameNS")}}
+
+## 関連情報
+
+- {{DOMxRef("Element.getElementsByTagNameNS()")}}
diff --git a/files/ja/web/api/document/getselection/index.html b/files/ja/web/api/document/getselection/index.html
deleted file mode 100644
index 5e416caf0bace1..00000000000000
--- a/files/ja/web/api/document/getselection/index.html
+++ /dev/null
@@ -1,66 +0,0 @@
----
-title: Document.getSelection()
-slug: Web/API/Document/getSelection
-tags:
- - API
- - Document
- - Method
- - Reference
- - getSelection
-browser-compat: api.Document.getSelection
-translation_of: Web/API/Document/getSelection
-original_slug: Web/API/DocumentOrShadowRoot/getSelection
----
-{{APIRef("DOM")}}
-
-getSelection()
は {{DOMxRef("Document")}} インターフェイスのプロパティで、ユーザーが選択したテキストの範囲、またはキャレットの現在位置を表す {{DOMxRef("Selection")}} オブジェクトを返します。
-
-構文
-
-getSelection()
-
-引数
-
-なし。
-
-返値
-
-{{DOMxRef("Selection")}} オブジェクト。
-
-例
-
-Selection オブジェクトを取得
-
-
-let selection = document.getSelection();
-let selRange = selection.getRangeAt(0);
-// この範囲に対して何かをする
-
-console.log(selection); // Selection オブジェクト
-
-
-Selection オブジェクトの文字列表現
-
-JavaScript では、オブジェクトが文字列を取る関数 ({{DOMxRef("Window.alert()")}} など) に渡された場合、オブジェクトの {{JSxRef("Object.toString", "toString()")}} メソッドが呼び出され、関数にその返値が渡されます。これにより、プロパティやメソッドを持つ実際のオブジェクトであった場合、他の関数に使われると文字列になって現れることがあります。
-
-alert(selection);
-
-ただし、すべての関数で自動的に toString()
が呼び出されるとは限りません。 Selection
オブジェクトを文字列として使用する場合は、 toString()
メソッドを直接呼び出してください。
-
-let selectedText = selection.toString();
-
-
-
-{{domxref("Window.getSelection()")}} を呼び出すと、 Document.getSelection()
と同等の動作をします。
-
-Firefox において現在は getSelection()
は {{htmlelement("input")}} 要素の中では動作しないことに注意してください。 {{domxref("HTMLInputElement.setSelectionRange()")}} を使用することで回避できます。
-
-selection と focus との違いにも注意してください。 {{domxref("Document.activeElement")}} はフォーカスを持つ要素を返します。
-
-仕様書
-
-{{Specifications}}
-
-ブラウザーの互換性
-
-{{Compat}}
diff --git a/files/ja/web/api/document/getselection/index.md b/files/ja/web/api/document/getselection/index.md
new file mode 100644
index 00000000000000..2e1188d5aec5d7
--- /dev/null
+++ b/files/ja/web/api/document/getselection/index.md
@@ -0,0 +1,72 @@
+---
+title: Document.getSelection()
+slug: Web/API/Document/getSelection
+tags:
+ - API
+ - Document
+ - Method
+ - Reference
+ - getSelection
+translation_of: Web/API/Document/getSelection
+original_slug: Web/API/DocumentOrShadowRoot/getSelection
+browser-compat: api.Document.getSelection
+---
+{{APIRef("DOM")}}
+
+**`getSelection()`** は {{DOMxRef("Document")}} インターフェイスのプロパティで、ユーザーが選択したテキストの範囲、またはキャレットの現在位置を表す {{DOMxRef("Selection")}} オブジェクトを返します。
+
+## 構文
+
+```js
+getSelection()
+```
+
+### 引数
+
+なし。
+
+### 返値
+
+{{DOMxRef("Selection")}} オブジェクト。
+
+## 例
+
+### Selection オブジェクトを取得
+
+```js
+let selection = document.getSelection();
+let selRange = selection.getRangeAt(0);
+// この範囲に対して何かをする
+
+console.log(selection); // Selection オブジェクト
+```
+
+### Selection オブジェクトの文字列表現
+
+JavaScript では、オブジェクトが文字列を取る関数 ({{DOMxRef("Window.alert()")}} など) に渡された場合、オブジェクトの {{JSxRef("Object.toString", "toString()")}} メソッドが呼び出され、関数にその返値が渡されます。これにより、プロパティやメソッドを持つ実際のオブジェクトであった場合、他の関数に使われると文字列になって現れることがあります。
+
+```js
+alert(selection);
+```
+
+ただし、すべての関数で自動的に `toString()` が呼び出されるとは限りません。 `Selection` オブジェクトを文字列として使用する場合は、 `toString()` メソッドを直接呼び出してください。
+
+```js
+let selectedText = selection.toString();
+```
+
+## 関連するオブジェクト
+
+{{domxref("Window.getSelection()")}} を呼び出すと、 `Document.getSelection()` と同等の動作をします。
+
+Firefox において現在は `getSelection()` は {{htmlelement("input")}} 要素の中では動作しないことに注意してください。 {{domxref("HTMLInputElement.setSelectionRange()")}} を使用することで回避できます。
+
+_selection_ と _focus_ との違いにも注意してください。 {{domxref("Document.activeElement")}} はフォーカスを持つ要素を返します。
+
+## 仕様書
+
+{{Specifications}}
+
+## ブラウザーの互換性
+
+{{Compat}}
diff --git a/files/ja/web/api/document/hasfocus/index.html b/files/ja/web/api/document/hasfocus/index.html
deleted file mode 100644
index d228acbe5a5e6c..00000000000000
--- a/files/ja/web/api/document/hasfocus/index.html
+++ /dev/null
@@ -1,93 +0,0 @@
----
-title: document.hasFocus()
-slug: Web/API/Document/hasFocus
-tags:
- - API
- - DOM
- - Focus
- - Method
- - Reference
- - フォーカス
- - メソッド
-translation_of: Web/API/Document/hasFocus
----
-{{APIRef}}
-
-hasFocus()
は {{domxref("Document")}} インターフェイスのメソッドで、 {{jsxref("Boolean")}} の値を返し、文書または文書内の何れかの要素がフォーカスを持っているかどうかを示します。このメソッドは、文書内のアクティブな要素がフォーカスを持っているかどうかを特定するために使用することができます。
-
-
-
文書を見ている時、文書内でフォーカスを持つ要素は常にアクティブ要素ですが、アクティブ要素がフォーカスを持っているとは限りません。例えば、フォアグラウンドになっていないポップアップウィンドウ内のアクティブ要素はフォーカスを持ちません。
-
-
-構文
-
-var focused = document.hasFocus();
-
-返値
-
-文書内のアクティブ要素にフォーカスがない場合は false
が、文書内のアクティブ要素にフォーカスがある場合は true
が返ります。
-
-例
-
-この例は、文書がフォーカスを持っているかどうかを300ミリ秒ごとに検査します。 hasFocus()
の機能をテストするために、ボタンを押して新しいウィンドウを開き、二つのページの間を切り替えてみてください。
-
-HTML
-
-<p id="log">Awaiting focus check.</p>
-<button onclick="openWindow()">Open a new window</button>
-
-JavaScript
-
-function checkPageFocus() {
- let body = document.querySelector('body');
- let log = document.getElementById('log');
-
- if (document.hasFocus()) {
- log.textContent = 'This document has the focus.';
- body.style.background = '#fff';
- }
- else {
- log.textContent = 'This document does not have the focus.';
- body.style.background = '#ccc';
- }
-}
-
-function openWindow() {
- window.open('https://developer.mozilla.org/', 'MDN', 'width=640,height=320,left=150,top=150');
-}
-
-// Check page focus every 300 milliseconds
-setInterval(checkPageFocus, 300);
-
-結果
-
-{{EmbedLiveSample("Example")}}
-
-仕様書
-
-
-
-
- 仕様書 |
- 状態 |
- 備考 |
-
-
-
-
- {{SpecName('HTML WHATWG', 'interaction.html#dom-document-hasfocus', 'Document.hasFocus()')}} |
- {{Spec2('HTML WHATWG')}} |
- 初回定義 |
-
-
-
-
-ブラウザーの対応
-
-{{Compat("api.Document.hasFocus")}}
-
-関連情報
-
-
diff --git a/files/ja/web/api/document/hasfocus/index.md b/files/ja/web/api/document/hasfocus/index.md
new file mode 100644
index 00000000000000..1f2706cbb3c969
--- /dev/null
+++ b/files/ja/web/api/document/hasfocus/index.md
@@ -0,0 +1,82 @@
+---
+title: document.hasFocus()
+slug: Web/API/Document/hasFocus
+tags:
+ - API
+ - DOM
+ - Focus
+ - Method
+ - Reference
+ - フォーカス
+ - メソッド
+translation_of: Web/API/Document/hasFocus
+---
+{{APIRef}}
+
+**`hasFocus()`** は {{domxref("Document")}} インターフェイスのメソッドで、 {{jsxref("Boolean")}} の値を返し、文書または文書内の何れかの要素がフォーカスを持っているかどうかを示します。このメソッドは、文書内のアクティブな要素がフォーカスを持っているかどうかを特定するために使用することができます。
+
+> **Note:** 文書を見ている時、文書内でフォーカスを持つ要素は常に[アクティブ要素](/ja/docs/Web/API/DocumentOrShadowRoot/activeElement)ですが、アクティブ要素がフォーカスを持っているとは限りません。例えば、フォアグラウンドになっていないポップアップウィンドウ内のアクティブ要素はフォーカスを持ちません。
+
+## 構文
+
+```
+var focused = document.hasFocus();
+```
+
+### 返値
+
+文書内のアクティブ要素にフォーカスがない場合は `false` が、文書内のアクティブ要素にフォーカスがある場合は `true` が返ります。
+
+## 例
+
+この例は、文書がフォーカスを持っているかどうかを 300 ミリ秒ごとに検査します。 `hasFocus()` の機能をテストするために、ボタンを押して新しいウィンドウを開き、二つのページの間を切り替えてみてください。
+
+### HTML
+
+```html
+Awaiting focus check.
+
+```
+
+### JavaScript
+
+```js
+function checkPageFocus() {
+ let body = document.querySelector('body');
+ let log = document.getElementById('log');
+
+ if (document.hasFocus()) {
+ log.textContent = 'This document has the focus.';
+ body.style.background = '#fff';
+ }
+ else {
+ log.textContent = 'This document does not have the focus.';
+ body.style.background = '#ccc';
+ }
+}
+
+function openWindow() {
+ window.open('https://developer.mozilla.org/', 'MDN', 'width=640,height=320,left=150,top=150');
+}
+
+// Check page focus every 300 milliseconds
+setInterval(checkPageFocus, 300);
+```
+
+### 結果
+
+{{EmbedLiveSample("Example")}}
+
+## 仕様書
+
+| 仕様書 | 状態 | 備考 |
+| ---------------------------------------------------------------------------------------------------------------------------- | -------------------------------- | -------- |
+| {{SpecName('HTML WHATWG', 'interaction.html#dom-document-hasfocus', 'Document.hasFocus()')}} | {{Spec2('HTML WHATWG')}} | 初回定義 |
+
+## ブラウザーの互換性
+
+{{Compat("api.Document.hasFocus")}}
+
+## 関連情報
+
+- [Page Visibility API の使用](/ja/docs/Web/Guide/User_experience/Using_the_Page_Visibility_API)
diff --git a/files/ja/web/api/document/hasstorageaccess/index.html b/files/ja/web/api/document/hasstorageaccess/index.html
deleted file mode 100644
index 54f18a58dea94a..00000000000000
--- a/files/ja/web/api/document/hasstorageaccess/index.html
+++ /dev/null
@@ -1,55 +0,0 @@
----
-title: Document.hasStorageAccess()
-slug: Web/API/Document/hasStorageAccess
-tags:
- - API
- - DOM
- - Document
- - Reference
- - Storage Access API
- - hasStorageAccess
- - メソッド
-translation_of: Web/API/Document/hasStorageAccess
----
-{{APIRef}}{{seecompattable}}
-
-{{domxref("Document")}} インターフェイスの hasStorageAccess()
メソッドは、文書がファーストパーティのストレージへのアクセス権を持っているかどうかを真偽値で解決する {{jsxref("Promise")}} を返します。
-
-詳しくは Storage Access API を参照してください。
-
-構文
-
-var promise = document.hasStorageAccess();
-
-引数
-
-なし。
-
-返値
-
-文書がファーストパーティのストレージへのアクセス権を持っているかどうかを真偽値で解決する {{jsxref("Promise")}} です。
-
-Promise が解決され、関数が最初に呼び出されたときにユーザージェスチャーイベントを処理していた場合、解決ハンドラーはユーザージェスチャーが処理されているかのように実行されるため、ユーザーによるアクティベーションを必要とする API を呼び出すことができます。
-
-例
-
-document.hasStorageAccess().then(hasAccess => {
- if (hasAccess) {
- // ストレージへのアクセスはすでに許可されています。
- } else {
- // ストレージへのアクセスはまだ許可されていません。
- // requestStorageAccess() を呼び出す必要があります。
- }
-});
-
-仕様書
-
-この API はまだ提案段階にあります。 — 標準化プロセスはまだ始まっていません。現在のところ、この API の詳細の仕様書は、アップルのブログ投稿の Introducing Storage Access API、および WHATWG HTML issue 3338 — Proposal: Storage Access API で見ることができます。
-
-ブラウザーの互換性
-
-{{Compat("api.Document.hasStorageAccess")}}
-
-関連情報
-
-Storage Access API
diff --git a/files/ja/web/api/document/hasstorageaccess/index.md b/files/ja/web/api/document/hasstorageaccess/index.md
new file mode 100644
index 00000000000000..6b2eafe936ba94
--- /dev/null
+++ b/files/ja/web/api/document/hasstorageaccess/index.md
@@ -0,0 +1,59 @@
+---
+title: Document.hasStorageAccess()
+slug: Web/API/Document/hasStorageAccess
+tags:
+ - API
+ - DOM
+ - Document
+ - Reference
+ - Storage Access API
+ - hasStorageAccess
+ - メソッド
+translation_of: Web/API/Document/hasStorageAccess
+---
+{{APIRef}}{{seecompattable}}
+
+{{domxref("Document")}} インターフェイスの **`hasStorageAccess()`** メソッドは、文書がファーストパーティのストレージへのアクセス権を持っているかどうかを真偽値で解決する {{jsxref("Promise")}} を返します。
+
+詳しくは [Storage Access API](/ja/docs/Web/API/Storage_Access_API) を参照してください。
+
+## 構文
+
+```
+var promise = document.hasStorageAccess();
+```
+
+### 引数
+
+なし。
+
+### 返値
+
+文書がファーストパーティのストレージへのアクセス権を持っているかどうかを真偽値で解決する {{jsxref("Promise")}} です。
+
+Promise が解決され、関数が最初に呼び出されたときにユーザージェスチャーイベントを処理していた場合、解決ハンドラーはユーザージェスチャーが処理されているかのように実行されるため、ユーザーによるアクティベーションを必要とする API を呼び出すことができます。
+
+## 例
+
+```js
+document.hasStorageAccess().then(hasAccess => {
+ if (hasAccess) {
+ // ストレージへのアクセスはすでに許可されています。
+ } else {
+ // ストレージへのアクセスはまだ許可されていません。
+ // requestStorageAccess() を呼び出す必要があります。
+ }
+});
+```
+
+## 仕様書
+
+この API はまだ提案段階にあります。 — 標準化プロセスはまだ始まっていません。現在のところ、この API の詳細の仕様書は、アップルのブログ投稿の [Introducing Storage Access API](https://webkit.org/blog/8124/introducing-storage-access-api/)、および [WHATWG HTML issue 3338 — Proposal: Storage Access API](https://github.com/whatwg/html/issues/3338) で見ることができます。
+
+## ブラウザーの互換性
+
+{{Compat("api.Document.hasStorageAccess")}}
+
+## 関連情報
+
+[Storage Access API](/ja/docs/Web/API/Storage_Access_API)
diff --git a/files/ja/web/api/document/head/index.html b/files/ja/web/api/document/head/index.html
deleted file mode 100644
index 4d948ce6a064bc..00000000000000
--- a/files/ja/web/api/document/head/index.html
+++ /dev/null
@@ -1,82 +0,0 @@
----
-title: Document.head
-slug: Web/API/Document/head
-tags:
- - API
- - Document
- - HTML DOM
- - Reference
- - head
-translation_of: Web/API/Document/head
----
-{{APIRef("DOM")}}
-
-{{domxref("Document")}} インターフェイスの head
は読み取り専用のプロパティで、現在の文書の {{HTMLElement("head")}} 要素を返します。
-
-構文
-
-var objRef = document.head;
-
-
-値
-
-{{domxref("HTMLHeadElement")}} です。
-
-例
-
-<!doctype html>
-<head id="my-document-head">
- <title>Example: using document.head</title>
-</head>
-
-<script>
- var theHead = document.head;
-
- console.log(theHead.id); // "my-document-head";
-
- console.log( theHead === document.querySelector("head") ); // true
-</script>
-
-
-メモ
-
-document.head
は読取専用です。このプロパティに値を代入した場合は、暗黙に失敗するか、 Strict モードの場合は、 {{jsxref("TypeError")}} を投げます。
-
-仕様書
-
-
-
-
- 仕様書 |
- 状態 |
- 備考 |
-
-
-
-
- {{SpecName('HTML5.1','dom.html#dom-document-head','Document.head')}} |
- {{Spec2('HTML5.1')}} |
- |
-
-
- {{SpecName('HTML5 W3C','dom.html#dom-document-head','Document.head')}} |
- {{Spec2('HTML5 W3C')}} |
- |
-
-
- {{SpecName('HTML WHATWG','dom.html#dom-document-head','Document.head')}} |
- {{Spec2('HTML WHATWG')}} |
- 初回定義 |
-
-
-
-
-ブラウザーの対応
-
-{{Compat("api.Document.head")}}
-
-関連情報
-
-
- - {{domxref("document.body")}}
-
diff --git a/files/ja/web/api/document/head/index.md b/files/ja/web/api/document/head/index.md
new file mode 100644
index 00000000000000..01db117830c5e8
--- /dev/null
+++ b/files/ja/web/api/document/head/index.md
@@ -0,0 +1,61 @@
+---
+title: Document.head
+slug: Web/API/Document/head
+tags:
+ - API
+ - Document
+ - HTML DOM
+ - Reference
+ - head
+translation_of: Web/API/Document/head
+---
+{{APIRef("DOM")}}
+
+{{domxref("Document")}} インターフェイスの **`head`** は読み取り専用のプロパティで、現在の文書の {{HTMLElement("head")}} 要素を返します。
+
+## 構文
+
+```
+var objRef = document.head;
+```
+
+### 値
+
+{{domxref("HTMLHeadElement")}} です。
+
+## 例
+
+```html
+
+
+ Example: using document.head
+
+
+
+```
+
+## メモ
+
+`document.head` は読取専用です。このプロパティに値を代入した場合は、暗黙に失敗するか、 [Strict モード](/ja/docs/Web/JavaScript/Reference/Strict_mode)の場合は、 {{jsxref("TypeError")}} を投げます。
+
+## 仕様書
+
+| 仕様書 | 状態 | 備考 |
+| ------------------------------------------------------------------------------------------------ | -------------------------------- | -------- |
+| {{SpecName('HTML5.1','dom.html#dom-document-head','Document.head')}} | {{Spec2('HTML5.1')}} | |
+| {{SpecName('HTML5 W3C','dom.html#dom-document-head','Document.head')}} | {{Spec2('HTML5 W3C')}} | |
+| {{SpecName('HTML WHATWG','dom.html#dom-document-head','Document.head')}} | {{Spec2('HTML WHATWG')}} | 初回定義 |
+
+## ブラウザーの互換性
+
+{{Compat("api.Document.head")}}
+
+## 関連情報
+
+- {{domxref("document.body")}}
diff --git a/files/ja/web/api/document/hidden/index.html b/files/ja/web/api/document/hidden/index.html
deleted file mode 100644
index 8eba135565826a..00000000000000
--- a/files/ja/web/api/document/hidden/index.html
+++ /dev/null
@@ -1,51 +0,0 @@
----
-title: Document.hidden
-slug: Web/API/Document/hidden
-tags:
- - DOM
- - Document
- - Page Visibility API
- - Property
- - Read-only
- - Reference
- - Web
-translation_of: Web/API/Document/hidden
----
-{{ ApiRef("DOM") }}
-
-Document.hidden
は読み取り専用のプロパティで、ページが非表示になっているとみられるかどうかを示す論理値を返します。
-
-構文
-
-var boolean = document.hidden
-
-例
-
-document.addEventListener("visibilitychange", function() {
- console.log( document.hidden );
- // 振る舞いを修正...
-});
-
-
-仕様書
-
-
-
-
- 仕様書 |
- 状態 |
- 備考 |
-
-
-
-
- {{SpecName('Page Visibility API','#dom-document-hidden', 'Document.hidden')}} |
- {{Spec2('Page Visibility API')}} |
- 初回定義 |
-
-
-
-
-ブラウザーの互換性
-
-{{Compat("api.Document.hidden")}}
diff --git a/files/ja/web/api/document/hidden/index.md b/files/ja/web/api/document/hidden/index.md
new file mode 100644
index 00000000000000..fa0f3565352b59
--- /dev/null
+++ b/files/ja/web/api/document/hidden/index.md
@@ -0,0 +1,41 @@
+---
+title: Document.hidden
+slug: Web/API/Document/hidden
+tags:
+ - DOM
+ - Document
+ - Page Visibility API
+ - Property
+ - Read-only
+ - Reference
+ - Web
+translation_of: Web/API/Document/hidden
+---
+{{ ApiRef("DOM") }}
+
+**`Document.hidden`** は読み取り専用のプロパティで、ページが非表示になっているとみられるかどうかを示す論理値を返します。
+
+## 構文
+
+```
+var boolean = document.hidden
+```
+
+## 例
+
+```js
+document.addEventListener("visibilitychange", function() {
+ console.log( document.hidden );
+ // 振る舞いを修正...
+});
+```
+
+## 仕様書
+
+| 仕様書 | 状態 | 備考 |
+| -------------------------------------------------------------------------------------------------------- | -------------------------------------------- | -------- |
+| {{SpecName('Page Visibility API','#dom-document-hidden', 'Document.hidden')}} | {{Spec2('Page Visibility API')}} | 初回定義 |
+
+## ブラウザーの互換性
+
+{{Compat("api.Document.hidden")}}
diff --git a/files/ja/web/api/document/images/index.html b/files/ja/web/api/document/images/index.html
deleted file mode 100644
index 15835ddf89cebe..00000000000000
--- a/files/ja/web/api/document/images/index.html
+++ /dev/null
@@ -1,38 +0,0 @@
----
-title: document.images
-slug: Web/API/Document/images
-tags:
- - DOM
- - Document
- - Gecko
- - Gecko DOM Reference
-translation_of: Web/API/Document/images
----
-
- {{ApiRef}}
-概要
-document.images
は、現在の HTML 文書の {{domxref("Image")}} のコレクションを返します。
-構文
-var htmlCollection = document.images;
-例
-特定の src 属性値を持つ img 要素が文書中に存在する場合にのみ何らかの処理を行う例を以下に示します。
-var ilist = document.images;
-
-for(var i = 0; i < ilist.length; i++) {
- if(ilist[i].src == "banner.gif") {
- // bunner.gif が存在した場合の処理
- }
-}
-プロパティ
-
- -
-
document.images.length
- -
- 文書中の画像の数を返す
-
-注記
-document.images
は DOM HTML の一部であり、HTML 文書に於いてのみ動作します。
-仕様書
-
diff --git a/files/ja/web/api/document/images/index.md b/files/ja/web/api/document/images/index.md
new file mode 100644
index 00000000000000..9f960dadf42d23
--- /dev/null
+++ b/files/ja/web/api/document/images/index.md
@@ -0,0 +1,48 @@
+---
+title: document.images
+slug: Web/API/Document/images
+tags:
+ - DOM
+ - Document
+ - Gecko
+ - Gecko DOM Reference
+translation_of: Web/API/Document/images
+---
+{{ApiRef}}
+
+## 概要
+
+`document.images` は、現在の HTML 文書の {{domxref("Image")}} のコレクションを返します。
+
+## 構文
+
+```
+var htmlCollection = document.images;
+```
+
+## 例
+
+特定の src 属性値を持つ img 要素が文書中に存在する場合にのみ何らかの処理を行う例を以下に示します。
+
+```js
+var ilist = document.images;
+
+for(var i = 0; i < ilist.length; i++) {
+ if(ilist[i].src == "banner.gif") {
+ // bunner.gif が存在した場合の処理
+ }
+}
+```
+
+## プロパティ
+
+- `document.images.length`
+ - : 文書中の画像の数を返す
+
+## 注記
+
+`document.images` は DOM HTML の一部であり、HTML 文書に於いてのみ動作します。
+
+## 仕様書
+
+- [DOM Level 2 HTML: HTMLDocument.images](http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-90379117)
diff --git a/files/ja/web/api/document/implementation/index.html b/files/ja/web/api/document/implementation/index.html
deleted file mode 100644
index 8e26a0ed8db376..00000000000000
--- a/files/ja/web/api/document/implementation/index.html
+++ /dev/null
@@ -1,66 +0,0 @@
----
-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 に特有のメモ
-
-
- - Gecko 19.0 {{geckoRelease("19.0")}} から、 {{domxref("DOMImplementation.hasFeature","hasFeature")}} メソッドは常に true を返します。
-
diff --git a/files/ja/web/api/document/implementation/index.md b/files/ja/web/api/document/implementation/index.md
new file mode 100644
index 00000000000000..df3b0f732fe9cf
--- /dev/null
+++ b/files/ja/web/api/document/implementation/index.md
@@ -0,0 +1,53 @@
+---
+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;
+```
+
+## 例
+
+```js
+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](http://www.w3.org/TR/DOM-Level-2-Core/introduction.html#ID-Conformance-h2) で入手可能です。
+
+## メモ
+
+W3C's DOM Level 1 勧告では `hasFeature` メソッドのみが定義されているので、ブラウザーが DOM モジュールに対応しているかどうかを判断する方法の一つです。 (上記の例と [What does your user agent claim to support?](http://www.w3.org/2003/02/06-dom-support.html) を参照してください)。利用できるのであれば、 `DOMImplementation` の他のメソッドが、単一文書の外のものを制御するサービスを提供します。例えば、 `DOMImplementation` インターフェイスは `createDocumentType` メソッドを含んでおり、実装によって管理された 1 つ以上の文書に DTD が作成されます。
+
+## 仕様書
+
+| 仕様書 | 状態 | 備考 |
+| ---------------------------------------------------------------------------------------------------------------- | -------------------------------- | ---- |
+| {{SpecName('DOM WHATWG', '#dom-document-implementation', 'document.implementation')}} | {{Spec2('DOM WHATWG')}} | |
+
+## ブラウザーの互換性
+
+{{Compat("api.Document.implementation")}}
+
+### Gecko に特有のメモ
+
+- Gecko 19.0 {{geckoRelease("19.0")}} から、 {{domxref("DOMImplementation.hasFeature","hasFeature")}} メソッドは常に true を返します。
diff --git a/files/ja/web/api/document/lastmodified/index.html b/files/ja/web/api/document/lastmodified/index.html
deleted file mode 100644
index 682e0341ffa867..00000000000000
--- a/files/ja/web/api/document/lastmodified/index.html
+++ /dev/null
@@ -1,94 +0,0 @@
----
-title: Document.lastModified
-slug: Web/API/Document/lastModified
-tags:
- - API
- - Document
- - HTML DOM
- - NeedsSpecTable
- - Property
- - Reference
-translation_of: Web/API/Document/lastModified
----
-{{APIRef("DOM")}}
-
-lastModified
は {{domxref("Document")}} インターフェイスのプロパティで、現在の文書が最後に更新された日付と時刻を含む文字列を返します。
-
-構文
-
-var string = document.lastModified;
-
-
-例
-
-単純な使用
-
-この例では lastModified
の値をアラート表示します。
-
-alert(document.lastModified);
-// 表示内容: Tuesday, December 16, 2017 11:09:42
-
-
-
-
-この例では、 lastModified
を {{jsxref("Date")}} オブジェクトに変換します。object.
-
-let oLastModif = new Date(document.lastModified);
-
-
-
-
-この例では、 lastModified
を地方時の1970年1月1日 00:00:00からの経過ミリ秒数の数値に変換します。
-
-let nLastModif = Date.parse(document.lastModified);
-
-
-注
-
-lastModified
は文字列なので、文書の更新日の比較には簡単には使用できないことに注意してください。こちらはいつページが変更されたかをアラートメッセージで表示する方法の例です (JavaScript cookies API も参照)。
-
-if (Date.parse(document.lastModified) > parseFloat(document.cookie.replace(/(?:(?:^|.*;)\s*last_modif\s*\=\s*([^;]*).*$)|^.*$/, "$1") || "0")) {
- document.cookie = "last_modif=" + Date.now() + "; expires=Fri, 31 Dec 9999 23:59:59 GMT; path=" + location.pathname;
- alert("ページが変更されました。");
-}
-
-…同じ例ですが、最初の訪問をスキップします。
-
-var
- nLastVisit = parseFloat(document.cookie.replace(/(?:(?:^|.*;)\s*last_modif\s*\=\s*([^;]*).*$)|^.*$/, "$1")),
- nLastModif = Date.parse(document.lastModified);
-
-if (isNaN(nLastVisit) || nLastModif > nLastVisit) {
- document.cookie = "last_modif=" + Date.now() + "; expires=Fri, 31 Dec 9999 23:59:59 GMT; path=" + location.pathname;
-
- if (isFinite(nLastVisit)) {
- alert("ページが変更されました。");
- }
-}
-
-
-
-もし外部のページが変更されたかどうかを知りたい場合は、 XMLHttpRequest()
API についてのこの段落をお読みください。
-
-仕様書
-
-
-
-
- Specification |
- Status |
- Comment |
-
-
-
-
- {{SpecName('HTML WHATWG', '#dom-document-lastmodified', 'document.lastModified')}} |
- {{Spec2('HTML WHATWG')}} |
- |
-
-
-
-
-ブラウザーの互換性
-
-{{Compat("api.Document.lastModified")}}
diff --git a/files/ja/web/api/document/lastmodified/index.md b/files/ja/web/api/document/lastmodified/index.md
new file mode 100644
index 00000000000000..f313eddd75d19c
--- /dev/null
+++ b/files/ja/web/api/document/lastmodified/index.md
@@ -0,0 +1,89 @@
+---
+title: Document.lastModified
+slug: Web/API/Document/lastModified
+tags:
+ - API
+ - Document
+ - HTML DOM
+ - NeedsSpecTable
+ - Property
+ - Reference
+translation_of: Web/API/Document/lastModified
+---
+{{APIRef("DOM")}}
+
+**`lastModified`** は {{domxref("Document")}} インターフェイスのプロパティで、現在の文書が最後に更新された日付と時刻を含む文字列を返します。
+
+## 構文
+
+```
+var string = document.lastModified;
+```
+
+## 例
+
+### 単純な使用
+
+この例では `lastModified` の値をアラート表示します。
+
+```js
+alert(document.lastModified);
+// 表示内容: Tuesday, December 16, 2017 11:09:42
+```
+
+### lastModified を Date オブジェクトへ変換
+
+この例では、 `lastModified` を {{jsxref("Date")}} オブジェクトに変換します。object.
+
+```js
+let oLastModif = new Date(document.lastModified);
+```
+
+### lastModified をミリ秒に変換
+
+この例では、 `lastModified` を地方時の 1970 年 1 月 1 日 00:00:00 からの経過ミリ秒数の数値に変換します。
+
+```js
+let nLastModif = Date.parse(document.lastModified);
+```
+
+## 注
+
+`lastModified` は文字列なので、文書の更新日の比較には*簡単には*使用できないことに注意してください。こちらはいつページが変更されたかをアラートメッセージで表示する方法の例です ([JavaScript cookies API](/ja/docs/DOM/document.cookie) も参照)。
+
+```js
+if (Date.parse(document.lastModified) > parseFloat(document.cookie.replace(/(?:(?:^|.*;)\s*last_modif\s*\=\s*([^;]*).*$)|^.*$/, "$1") || "0")) {
+ document.cookie = "last_modif=" + Date.now() + "; expires=Fri, 31 Dec 9999 23:59:59 GMT; path=" + location.pathname;
+ alert("ページが変更されました。");
+}
+```
+
+…同じ例ですが、最初の訪問をスキップします。
+
+```js
+var
+ nLastVisit = parseFloat(document.cookie.replace(/(?:(?:^|.*;)\s*last_modif\s*\=\s*([^;]*).*$)|^.*$/, "$1")),
+ nLastModif = Date.parse(document.lastModified);
+
+if (isNaN(nLastVisit) || nLastModif > nLastVisit) {
+ document.cookie = "last_modif=" + Date.now() + "; expires=Fri, 31 Dec 9999 23:59:59 GMT; path=" + location.pathname;
+
+ if (isFinite(nLastVisit)) {
+ alert("ページが変更されました。");
+ }
+}
+```
+
+> **Note:** WebKit は時刻の文字列を UTC で返します。 Gecko と Internet Explorer はローカルタイムゾーンで時刻を返します。 (参照: [Bug 4363 – document.lastModified returns date in UTC time, but should return it in local time](https://bugs.webkit.org/show_bug.cgi?id=4363))
+
+もし***外部のページ*が変更されたかどうか**を知りたい場合は、 [`XMLHttpRequest()` API についてのこの段落](/ja/docs/Web/API/XMLHttpRequest/Using_XMLHttpRequest#Get_last_modified_date)をお読みください。
+
+## 仕様書
+
+| Specification | Status | Comment |
+| ------------------------------------------------------------------------------------------------------------ | -------------------------------- | ------- |
+| {{SpecName('HTML WHATWG', '#dom-document-lastmodified', 'document.lastModified')}} | {{Spec2('HTML WHATWG')}} | |
+
+## ブラウザーの互換性
+
+{{Compat("api.Document.lastModified")}}
diff --git a/files/ja/web/api/document/linkcolor/index.html b/files/ja/web/api/document/linkcolor/index.html
deleted file mode 100644
index a7aa7249419fe5..00000000000000
--- a/files/ja/web/api/document/linkcolor/index.html
+++ /dev/null
@@ -1,54 +0,0 @@
----
-title: Document.linkColor
-slug: Web/API/Document/linkColor
-tags:
- - API
- - Deprecated
- - Document
- - HTML DOM
- - Property
- - Reference
- - プロパティ
-translation_of: Web/API/Document/linkColor
----
-{{APIRef("DOM")}} {{Deprecated_header}}
-
-Document.linkColor
プロパティは、文書内のリンクの色を取得または設定します。
-
-このプロパティは非推奨です。代替手段として、 CSS の {{cssxref("color")}} プロパティを HTML のアンカーリンク ({{HtmlElement("a")}}) または {{cssxref(":link")}} 疑似クラスで設定することができます。もう一つの代替手段に document.body.link
がありますが、これは HTML 4.01 で非推奨になりました。
-
-構文
-
-color = document.linkColor
-document.linkColor = color
-
-
-引数
-
-
- color
: 色を単語 (例えば red
) または16進値 (例えば #ff0000
) で表す文字列。
-
-
-例
-
-document.linkColor = 'blue';
-
-
-仕様書
-
-HTML5
-
-Document.linkColor
は DOM Level 2 HTML で非推奨になりました。
-
-ブラウザーの対応
-
-{{Compat("api.Document.linkColor")}}
-
-Mozilla Firefox におけるこのプロパティの既定値は、青 (16進数で #0000ee
) です。
-
-関連情報
-
-
- - {{domxref("document.vlinkColor")}}
- - {{domxref("document.alinkColor")}}
-
diff --git a/files/ja/web/api/document/linkcolor/index.md b/files/ja/web/api/document/linkcolor/index.md
new file mode 100644
index 00000000000000..f3afbfddfb497e
--- /dev/null
+++ b/files/ja/web/api/document/linkcolor/index.md
@@ -0,0 +1,52 @@
+---
+title: Document.linkColor
+slug: Web/API/Document/linkColor
+tags:
+ - API
+ - Deprecated
+ - Document
+ - HTML DOM
+ - Property
+ - Reference
+ - プロパティ
+translation_of: Web/API/Document/linkColor
+---
+{{APIRef("DOM")}} {{Deprecated_header}}
+
+**`Document.linkColor`** プロパティは、文書内のリンクの色を取得または設定します。
+
+このプロパティは非推奨です。代替手段として、 CSS の {{cssxref("color")}} プロパティを HTML のアンカーリンク ({{HtmlElement("a")}}) または {{cssxref(":link")}} 疑似クラスで設定することができます。もう一つの代替手段に `document.body.link` がありますが、これは [HTML 4.01 で非推奨になりました](http://www.w3.org/TR/html401/struct/global.html#adef-link)。
+
+## 構文
+
+```
+color = document.linkColor
+document.linkColor = color
+```
+
+### 引数
+
+- `color`: 色を単語 (例えば `red`) または 16 進値 (例えば `#ff0000`) で表す文字列。
+
+## 例
+
+```js
+document.linkColor = 'blue';
+```
+
+## 仕様書
+
+HTML5
+
+`Document.linkColor` は [DOM Level 2 HTML で非推奨になりました](http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-26809268)。
+
+## ブラウザーの互換性
+
+{{Compat("api.Document.linkColor")}}
+
+Mozilla Firefox におけるこのプロパティの既定値は、青 (16 進数で `#0000ee`) です。
+
+## 関連情報
+
+- {{domxref("document.vlinkColor")}}
+- {{domxref("document.alinkColor")}}
diff --git a/files/ja/web/api/document/links/index.html b/files/ja/web/api/document/links/index.html
deleted file mode 100644
index 6394b176a6abed..00000000000000
--- a/files/ja/web/api/document/links/index.html
+++ /dev/null
@@ -1,31 +0,0 @@
----
-title: document.links
-slug: Web/API/Document/links
-tags:
- - DOM
- - Document
- - Gecko
- - Gecko DOM Reference
-translation_of: Web/API/Document/links
----
-
- {{ApiRef}}
-概要
-links
プロパティは、文書中の、 href
属性の値を持つすべての {{htmlelement("area")}} 要素とアンカー要素のコレクションを返します。
-構文
-nodeList = document.links;
-
-例
-var links = document.links;
-
-for(var i = 0; i < links.length; i++) {
- var linkHref = document.createTextNode(links[i].href);
- var lineBreak = document.createElement("br");
-
- document.body.appendChild(linkHref);
- document.body.appendChild(lineBreak);
-}
-仕様書
-
diff --git a/files/ja/web/api/document/links/index.md b/files/ja/web/api/document/links/index.md
new file mode 100644
index 00000000000000..7be3f736c7f7d8
--- /dev/null
+++ b/files/ja/web/api/document/links/index.md
@@ -0,0 +1,39 @@
+---
+title: document.links
+slug: Web/API/Document/links
+tags:
+ - DOM
+ - Document
+ - Gecko
+ - Gecko DOM Reference
+translation_of: Web/API/Document/links
+---
+{{ApiRef}}
+
+## 概要
+
+`links` プロパティは、文書中の、 `href` 属性の値を持つすべての {{htmlelement("area")}} 要素とアンカー要素のコレクションを返します。
+
+## 構文
+
+```
+nodeList = document.links;
+```
+
+## 例
+
+```js
+var links = document.links;
+
+for(var i = 0; i < links.length; i++) {
+ var linkHref = document.createTextNode(links[i].href);
+ var lineBreak = document.createElement("br");
+
+ document.body.appendChild(linkHref);
+ document.body.appendChild(lineBreak);
+}
+```
+
+## 仕様書
+
+- [DOM Level 2 HTML: links](http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-7068919)
diff --git a/files/ja/web/api/document/location/index.html b/files/ja/web/api/document/location/index.html
deleted file mode 100644
index 457028858770d0..00000000000000
--- a/files/ja/web/api/document/location/index.html
+++ /dev/null
@@ -1,71 +0,0 @@
----
-title: Document.location
-slug: Web/API/Document/location
-tags:
- - API
- - Document
- - HTML DOM
- - Property
- - Read-only
- - Reference
- - プロパティ
-translation_of: Web/API/Document/location
----
-{{APIRef("DOM")}}
-
-Document.location
は読み取り専用のプロパティで、この文書の URL に関する情報を持った {{domxref("Location")}} オブジェクトを返します。これはその URL を変更したり他の URL を読み込んだりするためのメソッドも提供しています。
-
-Document.location
は読み取り専用の Location
オブジェクトですが、 {{domxref("DOMString")}} を代入することができます。つまり、 document.location が文字列であるかのように扱うことができます。 document.location = 'http://www.example.com'
は document.location.href = 'http://www.example.com'
の別名です。
-
-URL を文字列として受け取るだけであれば、読み取り専用の {{domxref("document.URL")}} プロパティも利用することができます。
-
-現在の文書が閲覧コンテキスト内にない場合、返値は null
となります。
-
-構文
-
-s
-
-locationObj = document.location
-document.location = 'http://www.mozilla.org' // Equivalent to document.location.href = 'http://www.mozilla.org'
-
-
-例
-
-console.log(document.location);
-// Location オブジェクトをコンソールへ表示
-
-
-仕様書
-
-
-
-
- 仕様書 |
- 状態 |
- 備考 |
-
-
-
-
- {{SpecName('HTML WHATWG', "history.html#the-location-interface", "Document.location")}} |
- {{Spec2('HTML WHATWG')}} |
- {{SpecName("HTML5 W3C")}} から変更なし |
-
-
- {{SpecName('HTML5 W3C', "browsers.html#the-location-interface", "Document.location")}} |
- {{Spec2('HTML5 W3C')}} |
- 初回定義 |
-
-
-
-
-ブラウザーの互換性
-
-{{Compat("api.Document.location")}}
-
-関連情報
-
-
- - 返値のインターフェイスである {{domxref("Location")}}
- - 同様の情報で{{Glossary("browsing context", "閲覧コンテキスト")}}に結びつけられている {{domxref("Window.location")}}
-
diff --git a/files/ja/web/api/document/location/index.md b/files/ja/web/api/document/location/index.md
new file mode 100644
index 00000000000000..75834e43ffec8b
--- /dev/null
+++ b/files/ja/web/api/document/location/index.md
@@ -0,0 +1,54 @@
+---
+title: Document.location
+slug: Web/API/Document/location
+tags:
+ - API
+ - Document
+ - HTML DOM
+ - Property
+ - Read-only
+ - Reference
+ - プロパティ
+translation_of: Web/API/Document/location
+---
+{{APIRef("DOM")}}
+
+**`Document.location`** は読み取り専用のプロパティで、この文書の URL に関する情報を持った {{domxref("Location")}} オブジェクトを返します。これはその URL を変更したり他の URL を読み込んだりするためのメソッドも提供しています。
+
+`Document.location` は*読み取り専用*の `Location` オブジェクトですが、 {{domxref("DOMString")}} を代入することができます。つまり、 document.location が文字列であるかのように扱うことができます。 `document.location = 'http://www.example.com'` は `document.location.href = 'http://www.example.com'` の別名です。
+
+URL を文字列として受け取るだけであれば、読み取り専用の {{domxref("document.URL")}} プロパティも利用することができます。
+
+現在の文書が閲覧コンテキスト内にない場合、返値は `null` となります。
+
+## 構文
+
+s
+
+```
+locationObj = document.location
+document.location = 'http://www.mozilla.org' // Equivalent to document.location.href = 'http://www.mozilla.org'
+```
+
+## 例
+
+```js
+console.log(document.location);
+// Location オブジェクトをコンソールへ表示
+```
+
+## 仕様書
+
+| 仕様書 | 状態 | 備考 |
+| -------------------------------------------------------------------------------------------------------------------- | -------------------------------- | --------------------------------------------- |
+| {{SpecName('HTML WHATWG', "history.html#the-location-interface", "Document.location")}} | {{Spec2('HTML WHATWG')}} | {{SpecName("HTML5 W3C")}} から変更なし |
+| {{SpecName('HTML5 W3C', "browsers.html#the-location-interface", "Document.location")}} | {{Spec2('HTML5 W3C')}} | 初回定義 |
+
+## ブラウザーの互換性
+
+{{Compat("api.Document.location")}}
+
+## 関連情報
+
+- 返値のインターフェイスである {{domxref("Location")}}
+- 同様の情報で{{Glossary("browsing context", "閲覧コンテキスト")}}に結びつけられている {{domxref("Window.location")}}
diff --git a/files/ja/web/api/document/lostpointercapture_event/index.html b/files/ja/web/api/document/lostpointercapture_event/index.html
deleted file mode 100644
index 46e804e914cbdf..00000000000000
--- a/files/ja/web/api/document/lostpointercapture_event/index.html
+++ /dev/null
@@ -1,106 +0,0 @@
----
-title: 'Document: lostpointercapture イベント'
-slug: Web/API/Document/lostpointercapture_event
-tags:
- - API
- - Document
- - Event
- - PointerEvent
- - Reference
- - lostpointercapture
- - イベント
-translation_of: Web/API/Document/lostpointercapture_event
----
-{{APIRef}}
-
-lostpointercapture
イベントは、ポインターのキャプチャが解放されたときに発生します。
-
-
-
-
- バブリング |
- なし |
-
-
- キャンセル可能 |
- いいえ |
-
-
- インターフェイス |
- {{domxref("PointerEvent")}} |
-
-
- イベントハンドラープロパティ |
- {{domxref("GlobalEventHandlers/onlostpointercapture", "onlostpointercapture")}} |
-
-
-
-
-例
-
-この例は lostpointercapture
イベントを待ち受けし、 pointerdown
でその要素のためにポインターをキャプチャします。後でユーザーがポインターを解放したとき、 lostpointercapture
イベントが発生します。
-
-const para = document.querySelector('p');
-
-document.addEventListener('lostpointercapture', () => {
- console.log('I\'ve been released!')
-});
-
-para.addEventListener('pointerdown', (event) => {
- para.setPointerCapture(event.pointerId);
-});
-
-
-同じ例ですが、 onlostpointercapture
イベントハンドラーを使用して行います。
-
-const para = document.querySelector('p');
-
-document.onlostpointercapture = () => {
- console.log('I\'ve been released!')
-};
-
-para.addEventListener('pointerdown', (event) => {
- para.setPointerCapture(event.pointerId);
-});
-
-
-仕様書
-
-
-
-
- 仕様書 |
- 状態 |
-
-
-
-
- {{SpecName('Pointer Events', '#the-lostpointercapture-event')}} |
- {{Spec2('Pointer Events')}} |
-
-
-
-
-ブラウザーの対応
-
-{{Compat("api.Document.lostpointercapture_event")}}
-
-関連情報
-
-
- - 関連イベント
-
- - {{domxref("Document/lostpointercapture_event", "lostpointercapture")}}
- - {{domxref("Document/pointerover_event", "pointerover")}}
- - {{domxref("Document/pointerenter_event", "pointerenter")}}
- - {{domxref("Document/pointerdown_event", "pointerdown")}}
- - {{domxref("Document/pointermove_event", "pointermove")}}
- - {{domxref("Document/pointerup_event", "pointerup")}}
- - {{domxref("Document/pointercancel_event", "pointercancel")}}
- - {{domxref("Document/pointerout_event", "pointerout")}}
- - {{domxref("Document/pointerleave_event", "pointerleave")}}
-
-
- - {{domxref("GlobalEventHandlers.onlostpointercapture")}} イベントハンドラープロパティ
- HTMLElement
を対象としたこのイベント: {{domxref("HTMLElement/lostpointercapture_event", "lostpointercapture")}} イベント
-
diff --git a/files/ja/web/api/document/lostpointercapture_event/index.md b/files/ja/web/api/document/lostpointercapture_event/index.md
new file mode 100644
index 00000000000000..2a88b360642d8e
--- /dev/null
+++ b/files/ja/web/api/document/lostpointercapture_event/index.md
@@ -0,0 +1,96 @@
+---
+title: 'Document: lostpointercapture イベント'
+slug: Web/API/Document/lostpointercapture_event
+tags:
+ - API
+ - Document
+ - Event
+ - PointerEvent
+ - Reference
+ - lostpointercapture
+ - イベント
+translation_of: Web/API/Document/lostpointercapture_event
+---
+{{APIRef}}
+
+**`lostpointercapture`** イベントは、[ポインターのキャプチャ](/ja/docs/Web/API/Pointer_events#Pointer_capture)が解放されたときに発生します。
+
+
+
+
+ バブリング |
+ なし |
+
+
+ キャンセル可能 |
+ いいえ |
+
+
+ インターフェイス |
+ {{domxref("PointerEvent")}} |
+
+
+ イベントハンドラープロパティ |
+
+ {{domxref("GlobalEventHandlers/onlostpointercapture", "onlostpointercapture")}}
+ |
+
+
+
+
+## 例
+
+この例は `lostpointercapture` イベントを待ち受けし、 `pointerdown` でその要素のためにポインターをキャプチャします。後でユーザーがポインターを解放したとき、 `lostpointercapture` イベントが発生します。
+
+```js
+const para = document.querySelector('p');
+
+document.addEventListener('lostpointercapture', () => {
+ console.log('I\'ve been released!')
+});
+
+para.addEventListener('pointerdown', (event) => {
+ para.setPointerCapture(event.pointerId);
+});
+```
+
+同じ例ですが、 `onlostpointercapture` イベントハンドラーを使用して行います。
+
+```js
+const para = document.querySelector('p');
+
+document.onlostpointercapture = () => {
+ console.log('I\'ve been released!')
+};
+
+para.addEventListener('pointerdown', (event) => {
+ para.setPointerCapture(event.pointerId);
+});
+```
+
+## 仕様書
+
+| 仕様書 | 状態 |
+| ------------------------------------------------------------------------------------ | ------------------------------------ |
+| {{SpecName('Pointer Events', '#the-lostpointercapture-event')}} | {{Spec2('Pointer Events')}} |
+
+## ブラウザーの互換性
+
+{{Compat("api.Document.lostpointercapture_event")}}
+
+## 関連情報
+
+- 関連イベント
+
+ - {{domxref("Document/lostpointercapture_event", "lostpointercapture")}}
+ - {{domxref("Document/pointerover_event", "pointerover")}}
+ - {{domxref("Document/pointerenter_event", "pointerenter")}}
+ - {{domxref("Document/pointerdown_event", "pointerdown")}}
+ - {{domxref("Document/pointermove_event", "pointermove")}}
+ - {{domxref("Document/pointerup_event", "pointerup")}}
+ - {{domxref("Document/pointercancel_event", "pointercancel")}}
+ - {{domxref("Document/pointerout_event", "pointerout")}}
+ - {{domxref("Document/pointerleave_event", "pointerleave")}}
+
+- {{domxref("GlobalEventHandlers.onlostpointercapture")}} イベントハンドラープロパティ
+- `HTMLElement` を対象としたこのイベント: {{domxref("HTMLElement/lostpointercapture_event", "lostpointercapture")}} イベント
diff --git a/files/ja/web/api/document/open/index.html b/files/ja/web/api/document/open/index.html
deleted file mode 100644
index a6d2629093ceda..00000000000000
--- a/files/ja/web/api/document/open/index.html
+++ /dev/null
@@ -1,112 +0,0 @@
----
-title: Document.open()
-slug: Web/API/Document/open
-tags:
- - API
- - DOM
- - Document
- - Method
- - Reference
- - open
- - メソッド
-translation_of: Web/API/Document/open
----
-{{APIRef("DOM")}}
-
-Document.open()
メソッドは、{{domxref("Document.write", "書き込み", "", "1")}}のために文書を開きます。
-
-これはいくらかの副作用を招きます。例を挙げます。
-
-
- - 文書、文書内のノード、文書のウィンドウに現在登録されているイベントリスナーがすべて除去されます。
- - すべての既存のノードが文書から除去されます。
-
-
-構文
-
-document.open();
-
-
-引数
-
-なし。
-
-返値
-
-Document
オブジェクトインスタンスです。
-
-例
-
-以下の簡単なコードは、文書を開き、その内容をいくつかの異なる HTML の断片に置き換えてから、再び閉じます。
-
-document.open();
-document.write("<p>Hello world!</p>");
-document.write("<p>I am a fish</p>");
-document.write("<p>The number is 42</p>");
-document.close();
-
-
-注
-
-ページが読み込まれたあとで {{domxref("document.write()")}} が呼び出されると、自動的に document.open()
が呼び出されます。
-
-Firefox や Internet Explorer では何年も前から、すべてのノードの削除に加えて、 JavaScript の変数なども追加で消去していました。今はそうではありません。
-
-Gecko 固有のメモ
-
-Gecko 1.9 以降、このメソッドは他のプロパティと同一オリジンポリシーが同じになるようになり、文書のオリジンを変更しようとした場合に動作しません。
-
-Gecko 1.9.2 以降、 document.open()
はプリンシパルをスタックからフェッチするのではなく、 URI を使用する文書のプリンシパルを使用します。その結果、 wrappedJSObject
を使用しても、 {{domxref("document.write()")}} を{{Glossary("chrome", "クローム")}}からの信頼できない文書に呼び出すことはできません。考え方についてはセキュリティチェックの基本を参照してください。
-
-引数3つの document.open()
-
-あまり知られていませんが、あまり使われていない引数3つ版の document.open()
があり、これは {{domxref("Window.open()")}} のエイリアスです (詳細はそのページを参照してください)。
-
-この呼び出しは、例えば github.com を新しいウィンドウで開き、オープナーは null
に設定してみます。
-
-document.open('https://www.github.com','', 'noopener=true')
-
-引数2つの document.open()
-
-ブラウザーは以下の形で、引数2つの document.open()
に対応してきました。
-
-document.open(type, replace)
-
-type
は書き込もうとしているデータの MIME タイプ (text/html
など) を指定し、 replace が設定されていれば (すなわち "replace" の文字列)、新しい文書の履歴エントリが書き込まれている文書の現在の履歴エントリを置き換えることを指定していました。
-
-この形式は現在では廃止されています。エラーは発生せず、代わりに document.open()
に転送されます (つまり、引数なしで実行した場合と同等です)。 履歴の置換動作は常に行われるようになりました。
-
-仕様書
-
-
-
-
- 仕様書 |
- 状態 |
- 備考 |
-
-
-
-
- {{SpecName("HTML WHATWG", "#dom-document-open", "document.open()")}} |
- {{Spec2("HTML WHATWG")}} |
- |
-
-
- {{SpecName("DOM2 HTML", "html.html#ID-72161170", "document.open()")}} |
- {{Spec2("DOM2 HTML")}} |
- |
-
-
-
-
-ブラウザーの互換性
-
-{{Compat("api.Document.open")}}
-
-See also
-
-
- - {{domxref("Document")}}
- - {{domxref("Window.open()")}}
-
diff --git a/files/ja/web/api/document/open/index.md b/files/ja/web/api/document/open/index.md
new file mode 100644
index 00000000000000..f440a8b1a964de
--- /dev/null
+++ b/files/ja/web/api/document/open/index.md
@@ -0,0 +1,97 @@
+---
+title: Document.open()
+slug: Web/API/Document/open
+tags:
+ - API
+ - DOM
+ - Document
+ - Method
+ - Reference
+ - open
+ - メソッド
+translation_of: Web/API/Document/open
+---
+{{APIRef("DOM")}}
+
+**`Document.open()`** メソッドは、{{domxref("Document.write", "書き込み", "", "1")}}のために文書を開きます。
+
+これはいくらかの副作用を招きます。例を挙げます。
+
+- 文書、文書内のノード、文書のウィンドウに現在登録されているイベントリスナーがすべて除去されます。
+- すべての既存のノードが文書から除去されます。
+
+## 構文
+
+```
+document.open();
+```
+
+### 引数
+
+なし。
+
+### 返値
+
+`Document` オブジェクトインスタンスです。
+
+## 例
+
+以下の簡単なコードは、文書を開き、その内容をいくつかの異なる HTML の断片に置き換えてから、再び閉じます。
+
+```js
+document.open();
+document.write("Hello world!
");
+document.write("I am a fish
");
+document.write("The number is 42
");
+document.close();
+```
+
+## 注
+
+ページが読み込まれたあとで {{domxref("document.write()")}} が呼び出されると、自動的に `document.open()` が呼び出されます。
+
+Firefox や Internet Explorer では何年も前から、すべてのノードの削除に加えて、 JavaScript の変数なども追加で消去していました。今はそうではありません。document non-spec'ed parameters to document.open
+
+### Gecko 固有のメモ
+
+Gecko 1.9 以降、このメソッドは他のプロパティと同一オリジンポリシーが同じになるようになり、文書のオリジンを変更しようとした場合に動作しません。
+
+Gecko 1.9.2 以降、 `document.open()` は[プリンシパル](/ja/docs/Security_check_basics)をスタックからフェッチするのではなく、 URI を使用する文書のプリンシパルを使用します。その結果、 [`wrappedJSObject`](/ja/wrappedJSObject) を使用しても、 {{domxref("document.write()")}} を{{Glossary("chrome", "クローム")}}からの信頼できない文書に呼び出すことはできません。考え方については[セキュリティチェックの基本](/ja/Security_check_basics)を参照してください。
+
+## 引数 3 つの document.open()
+
+あまり知られていませんが、あまり使われていない引数 3 つ版の `document.open()` があり、これは {{domxref("Window.open()")}} のエイリアスです (詳細はそのページを参照してください)。
+
+この呼び出しは、例えば github.com を新しいウィンドウで開き、オープナーは `null` に設定してみます。
+
+```js
+document.open('https://www.github.com','', 'noopener=true')
+```
+
+## 引数 2 つの document.open()
+
+ブラウザーは以下の形で、引数 2 つの `document.open()` に対応してきました。
+
+```js
+document.open(type, replace)
+```
+
+`type` は書き込もうとしているデータの MIME タイプ (`text/html` など) を指定し、 replace が設定されていれば (すなわち "replace" の文字列)、新しい文書の履歴エントリが書き込まれている文書の現在の履歴エントリを置き換えることを指定していました。
+
+この形式は現在では廃止されています。エラーは発生せず、代わりに `document.open()` に転送されます (つまり、引数なしで実行した場合と同等です)。 履歴の置換動作は常に行われるようになりました。
+
+## 仕様書
+
+| 仕様書 | 状態 | 備考 |
+| -------------------------------------------------------------------------------------------- | -------------------------------- | ---- |
+| {{SpecName("HTML WHATWG", "#dom-document-open", "document.open()")}} | {{Spec2("HTML WHATWG")}} | |
+| {{SpecName("DOM2 HTML", "html.html#ID-72161170", "document.open()")}} | {{Spec2("DOM2 HTML")}} | |
+
+## ブラウザーの互換性
+
+{{Compat("api.Document.open")}}
+
+## See also
+
+- {{domxref("Document")}}
+- {{domxref("Window.open()")}}
diff --git a/files/ja/web/api/document/paste_event/index.html b/files/ja/web/api/document/paste_event/index.html
deleted file mode 100644
index f9a0a3f9fb7828..00000000000000
--- a/files/ja/web/api/document/paste_event/index.html
+++ /dev/null
@@ -1,74 +0,0 @@
----
-title: 'Document: paste イベント'
-slug: Web/API/Document/paste_event
-tags:
- - API
- - Document
- - Event
- - Reference
- - Web
- - paste
- - イベント
-translation_of: Web/API/Document/paste_event
----
-{{APIRef}}
-
-paste
イベントは、ユーザーがブラウザーのユーザーインターフェイスから「貼り付け」操作を実行したときに発生します。
-
-
-
-
- バブリング |
- あり |
-
-
- キャンセル |
- 可 |
-
-
- インターフェイス |
- {{domxref("ClipboardEvent")}} |
-
-
- イベントハンドラープロパティ |
- {{domxref("HTMLElement/onpaste", "onpaste")}} |
-
-
-
-
-このイベントの本来の対象は、貼り付け操作を意図する対象である {{domxref("Element")}} です。このイベントを {{domxref("Document")}} インターフェイス上で待ち受けし、キャプチャやバブリングの局面で処理することができます。このイベントの局面について完全な詳細は、 Element: paste イベントを参照してください。
-
-例
-
-document.addEventListener('paste', (event) => {
- console.log('paste action initiated')
-});
-
-仕様書
-
-
-
-
- 仕様書 |
- 状態 |
-
-
-
-
- {{SpecName('Clipboard API', '#clipboard-event-paste')}} |
- {{Spec2('Clipboard API')}} |
-
-
-
-
-ブラウザーの互換性
-
-{{Compat("api.Document.paste_event")}}
-
-関連情報
-
-
- - 関連イベント: {{domxref("Document/cut_event", "cut")}}, {{domxref("Document/copy_event", "copy")}}
- - {{domxref("Element")}} を対象としたこのイベント: {{domxref("Element/paste_event", "paste")}}
- - {{domxref("Window")}} を対象としたこのイベント: {{domxref("Window/paste_event", "paste")}}
-
diff --git a/files/ja/web/api/document/paste_event/index.md b/files/ja/web/api/document/paste_event/index.md
new file mode 100644
index 00000000000000..5b636021ea3fb1
--- /dev/null
+++ b/files/ja/web/api/document/paste_event/index.md
@@ -0,0 +1,63 @@
+---
+title: 'Document: paste イベント'
+slug: Web/API/Document/paste_event
+tags:
+ - API
+ - Document
+ - Event
+ - Reference
+ - Web
+ - paste
+ - イベント
+translation_of: Web/API/Document/paste_event
+---
+{{APIRef}}
+
+**`paste`** イベントは、ユーザーがブラウザーのユーザーインターフェイスから「貼り付け」操作を実行したときに発生します。
+
+
+
+
+ バブリング |
+ あり |
+
+
+ キャンセル |
+ 可 |
+
+
+ インターフェイス |
+ {{domxref("ClipboardEvent")}} |
+
+
+ イベントハンドラープロパティ |
+ {{domxref("HTMLElement/onpaste", "onpaste")}} |
+
+
+
+
+このイベントの本来の対象は、貼り付け操作を意図する対象である {{domxref("Element")}} です。このイベントを {{domxref("Document")}} インターフェイス上で待ち受けし、キャプチャやバブリングの局面で処理することができます。このイベントの局面について完全な詳細は、 [Element: paste イベント](/ja/docs/Web/API/Element/paste_event)を参照してください。
+
+## 例
+
+```js
+document.addEventListener('paste', (event) => {
+ console.log('paste action initiated')
+});
+```
+
+## 仕様書
+
+| 仕様書 | 状態 |
+| ------------------------------------------------------------------------ | ------------------------------------ |
+| {{SpecName('Clipboard API', '#clipboard-event-paste')}} | {{Spec2('Clipboard API')}} |
+
+## ブラウザーの互換性
+
+{{Compat("api.Document.paste_event")}}
+
+## 関連情報
+
+- 関連イベント: {{domxref("Document/cut_event", "cut")}}, {{domxref("Document/copy_event", "copy")}}
+- {{domxref("Element")}} を対象としたこのイベント: {{domxref("Element/paste_event", "paste")}}
+- {{domxref("Window")}} を対象としたこのイベント: {{domxref("Window/paste_event", "paste")}}
diff --git a/files/ja/web/api/document/plugins/index.html b/files/ja/web/api/document/plugins/index.html
deleted file mode 100644
index fa63d0552d3c34..00000000000000
--- a/files/ja/web/api/document/plugins/index.html
+++ /dev/null
@@ -1,55 +0,0 @@
----
-title: Document.plugins
-slug: Web/API/Document/plugins
-tags:
- - API
- - Document
- - Plugins
- - Property
- - Reference
- - embed
- - プロパティ
-translation_of: Web/API/Document/plugins
----
-{{APIRef("DOM")}}
-
-{{domxref("Document")}} インターフェイスの plugins
プロパティは読み取り専用で、現在の文書内にある {{HTMLElement("embed")}} 要素を表す1つ以上の {{domxref("HTMLEmbedElement")}} を含んだ {{domxref("HTMLCollection")}} オブジェクトを返します。
-
-インストールされているプラグインの一覧には、このメソッドでなく {{domxref("window.navigator.plugins")}} を使用してください。
-
-構文
-
-embedArrayObj = document.plugins
-
-値
-
-{{domxref("HTMLCollection")}}、または文書内に embed がなければ null
です。
-
-仕様書
-
-
-
-
- 仕様書 |
- 状態 |
- 備考 |
-
-
-
-
- {{SpecName('HTML WHATWG', '#dom-document-plugins', 'Document.plugins')}} |
- {{ Spec2('HTML WHATWG') }} |
- |
-
-
-
-
-ブラウザーの対応
-
-{{Compat("api.Document.plugins")}}
-
-関連情報
-
-
diff --git a/files/ja/web/api/document/plugins/index.md b/files/ja/web/api/document/plugins/index.md
new file mode 100644
index 00000000000000..a8a46bea9dc3e9
--- /dev/null
+++ b/files/ja/web/api/document/plugins/index.md
@@ -0,0 +1,42 @@
+---
+title: Document.plugins
+slug: Web/API/Document/plugins
+tags:
+ - API
+ - Document
+ - Plugins
+ - Property
+ - Reference
+ - embed
+ - プロパティ
+translation_of: Web/API/Document/plugins
+---
+{{APIRef("DOM")}}
+
+{{domxref("Document")}} インターフェイスの **`plugins`** プロパティは読み取り専用で、現在の文書内にある {{HTMLElement("embed")}} 要素を表す 1 つ以上の {{domxref("HTMLEmbedElement")}} を含んだ {{domxref("HTMLCollection")}} オブジェクトを返します。
+
+> **Note:** インストールされているプラグインの一覧には、このメソッドでなく {{domxref("window.navigator.plugins")}} を使用してください。
+
+## 構文
+
+```
+embedArrayObj = document.plugins
+```
+
+### 値
+
+{{domxref("HTMLCollection")}}、または文書内に embed がなければ `null` です。
+
+## 仕様書
+
+| 仕様書 | 状態 | 備考 |
+| ------------------------------------------------------------------------------------------------ | ------------------------------------ | ---- |
+| {{SpecName('HTML WHATWG', '#dom-document-plugins', 'Document.plugins')}} | {{ Spec2('HTML WHATWG') }} | |
+
+## ブラウザーの互換性
+
+{{Compat("api.Document.plugins")}}
+
+## 関連情報
+
+- [MSDN documentation]()
diff --git a/files/ja/web/api/document/pointercancel_event/index.html b/files/ja/web/api/document/pointercancel_event/index.html
deleted file mode 100644
index 00cc76a46264d5..00000000000000
--- a/files/ja/web/api/document/pointercancel_event/index.html
+++ /dev/null
@@ -1,105 +0,0 @@
----
-title: 'Document: pointercancel イベント'
-slug: Web/API/Document/pointercancel_event
-tags:
- - API
- - Document
- - Event
- - PointerEvent
- - onpointercancel
- - pointercancel
- - イベント
-translation_of: Web/API/Document/pointercancel_event
----
-{{APIRef}}
-
-pointercancel
イベントは、ブラウザーがもうポインターイベントが存在しないと判断したとき、または {{event("pointerdown")}} イベントが発生した後で、ポインターがビューポートのパン、ズーム、スクロールを操作するために使用されたときに発生します。
-
-
-
-
- バブリング |
- あり |
-
-
- キャンセル可能 |
- いいえ |
-
-
- インターフェイス |
- {{domxref("PointerEvent")}} |
-
-
- イベントハンドラープロパティ |
- {{domxref("GlobalEventHandlers/onpointercancel", "onpointercancel")}} |
-
-
-
-
-pointercancel
イベントが発生する状況の例をいくつか示します。
-
-
- - ポインターの操作を中止するハードウェアイベントが発生した場合。例えば、アプリケーションスイッチャーインターフェイスやモバイル端末の「ホーム」ボタンを使用してアプリケーションを切り替えた場合などです。
- - ポインターが活動中に端末の画面の向きが変化した場合。
- - ユーザーが突然、ポインターの入力を始めたとブラウザーが判断した場合。これが発生するのは、例えば、スタイラスを使用中に画面上で手が反応するのを防ぐために掌を除外して予期せずイベントを起動することを防ぐことに、ハードウェアが対応している場合などです。
- - CSS の {{cssxref("touch-action")}} プロパティが、入力の継続を防止している場合。
-
-
-
-
pointercancel
イベントの発生後、ブラウザーは {{event("pointerout")}} イベントと、続いて {{event("pointerleave")}} イベントを送信します。
-
-
-例
-
-addEventListener()
の使用例:
-
-document.addEventListener('pointercancel', (event) => {
- console.log('Pointer event cancelled')
-});
-
-onpointercancel
イベントハンドラープロパティの使用例:
-
-document.onpointercancel = (event) => {
- console.log('Pointer event cancelled')
-};
-
-仕様書
-
-
-
-
- 仕様書 |
- 状態 |
-
-
-
-
- {{SpecName('Pointer Events', '#the-pointercancel-event')}} |
- {{Spec2('Pointer Events')}} |
-
-
-
-
-ブラウザーの対応
-
-{{Compat("api.Document.pointercancel_event")}}
-
-関連情報
-
-
- - 関連イベント
-
- - {{domxref("Document/gotpointercapture_event", "gotpointercapture")}}
- - {{domxref("Document/lostpointercapture_event", "lostpointercapture")}}
- - {{domxref("Document/pointerover_event", "pointerover")}}
- - {{domxref("Document/pointerenter_event", "pointerenter")}}
- - {{domxref("Document/pointerdown_event", "pointerdown")}}
- - {{domxref("Document/pointermove_event", "pointermove")}}
- - {{domxref("Document/pointerup_event", "pointerup")}}
- - {{domxref("Document/pointerout_event", "pointerout")}}
- - {{domxref("Document/pointerleave_event", "pointerleave")}}
-
-
- - {{domxref("GlobalEventHandlers.onpointercancel")}} イベントハンドラープロパティ
- HTMLElement
を対象としたこのイベント: {{domxref("HTMLElement/pointercancel_event", "pointercancel")}} イベント
-
diff --git a/files/ja/web/api/document/pointercancel_event/index.md b/files/ja/web/api/document/pointercancel_event/index.md
new file mode 100644
index 00000000000000..976dddb2235d42
--- /dev/null
+++ b/files/ja/web/api/document/pointercancel_event/index.md
@@ -0,0 +1,93 @@
+---
+title: 'Document: pointercancel イベント'
+slug: Web/API/Document/pointercancel_event
+tags:
+ - API
+ - Document
+ - Event
+ - PointerEvent
+ - onpointercancel
+ - pointercancel
+ - イベント
+translation_of: Web/API/Document/pointercancel_event
+---
+{{APIRef}}
+
+**`pointercancel`** イベントは、ブラウザーがもうポインターイベントが存在しないと判断したとき、または {{event("pointerdown")}} イベントが発生した後で、ポインターがビューポートのパン、ズーム、スクロールを操作するために使用されたときに発生します。
+
+
+
+
+ バブリング |
+ あり |
+
+
+ キャンセル可能 |
+ いいえ |
+
+
+ インターフェイス |
+ {{domxref("PointerEvent")}} |
+
+
+ イベントハンドラープロパティ |
+
+ {{domxref("GlobalEventHandlers/onpointercancel", "onpointercancel")}}
+ |
+
+
+
+
+`pointercancel` イベントが発生する状況の例をいくつか示します。
+
+- ポインターの操作を中止するハードウェアイベントが発生した場合。例えば、アプリケーションスイッチャーインターフェイスやモバイル端末の「ホーム」ボタンを使用してアプリケーションを切り替えた場合などです。
+- ポインターが活動中に端末の画面の向きが変化した場合。
+- ユーザーが突然、ポインターの入力を始めたとブラウザーが判断した場合。これが発生するのは、例えば、スタイラスを使用中に画面上で手が反応するのを防ぐために掌を除外して予期せずイベントを起動することを防ぐことに、ハードウェアが対応している場合などです。
+- CSS の {{cssxref("touch-action")}} プロパティが、入力の継続を防止している場合。
+
+> **Note:** `pointercancel` イベントの発生後、ブラウザーは {{event("pointerout")}} イベントと、続いて {{event("pointerleave")}} イベントを送信します。
+
+## 例
+
+`addEventListener()` の使用例:
+
+```js
+document.addEventListener('pointercancel', (event) => {
+ console.log('Pointer event cancelled')
+});
+```
+
+`onpointercancel` イベントハンドラープロパティの使用例:
+
+```js
+document.onpointercancel = (event) => {
+ console.log('Pointer event cancelled')
+};
+```
+
+## 仕様書
+
+| 仕様書 | 状態 |
+| ---------------------------------------------------------------------------- | ------------------------------------ |
+| {{SpecName('Pointer Events', '#the-pointercancel-event')}} | {{Spec2('Pointer Events')}} |
+
+## ブラウザーの互換性
+
+{{Compat("api.Document.pointercancel_event")}}
+
+## 関連情報
+
+- 関連イベント
+
+ - {{domxref("Document/gotpointercapture_event", "gotpointercapture")}}
+ - {{domxref("Document/lostpointercapture_event", "lostpointercapture")}}
+ - {{domxref("Document/pointerover_event", "pointerover")}}
+ - {{domxref("Document/pointerenter_event", "pointerenter")}}
+ - {{domxref("Document/pointerdown_event", "pointerdown")}}
+ - {{domxref("Document/pointermove_event", "pointermove")}}
+ - {{domxref("Document/pointerup_event", "pointerup")}}
+ - {{domxref("Document/pointerout_event", "pointerout")}}
+ - {{domxref("Document/pointerleave_event", "pointerleave")}}
+
+- {{domxref("GlobalEventHandlers.onpointercancel")}} イベントハンドラープロパティ
+- `HTMLElement` を対象としたこのイベント: {{domxref("HTMLElement/pointercancel_event", "pointercancel")}} イベント
diff --git a/files/ja/web/api/document/pointerdown_event/index.html b/files/ja/web/api/document/pointerdown_event/index.html
deleted file mode 100644
index c71597b18e8ba7..00000000000000
--- a/files/ja/web/api/document/pointerdown_event/index.html
+++ /dev/null
@@ -1,80 +0,0 @@
----
-title: 'Document: pointerdown イベント'
-slug: Web/API/Document/pointerdown_event
-tags:
- - API
- - Document
- - Event
- - PointerEvent
- - Reference
- - onpointerdown
- - pointerdown
- - イベント
-translation_of: Web/API/Document/pointerdown_event
----
-{{APIRef}}
-
-pointerdown
イベントは、ポインターがアクティブになったときに発生します。マウスでは、端末がボタンが押されていない状態から一つ以上のボタンが押されている状態に遷移したときに発生します。タッチ操作では、デジタイザーに物理的な接触が行われたときに発生します。ペンでは、スタイラスがデジタイザーに物理的に接触したときに発生します。
-
-
-
-
- バブリング |
- あり |
-
-
- キャンセル可能 |
- はい |
-
-
- インターフェイス |
- {{domxref("PointerEvent")}} |
-
-
- イベントハンドラープロパティ |
- {{domxref("GlobalEventHandlers/onpointerdown", "onpointerdown")}} |
-
-
-
-
-例
-
-addEventListener()
の使用例:
-
-document.addEventListener('pointerdown', (event) => {
- console.log('Pointer down event');
-});
-
-onpointerdown
イベントハンドラープロパティの使用例:
-
-document.onpointerdown = (event) => {
- console.log('Pointer down event');
-};
-
-仕様書
-
-
-
-
- 仕様書 |
- 状態 |
-
-
-
-
- {{SpecName('Pointer Events', '#the-pointerdown-event')}} |
- {{Spec2('Pointer Events')}} |
-
-
-
-
-ブラウザーの対応
-
-{{Compat("api.Document.pointerdown_event")}}
-
-関連情報
-
-
- - {{domxref("GlobalEventHandlers/onpointerdown", "onpointerdown")}} イベントハンドラープロパティ
- HTMLElement
を対象としたこのイベント: {{domxref("HTMLElement/pointerdown_event", "pointerdown")}} イベント
-
diff --git a/files/ja/web/api/document/pointerdown_event/index.md b/files/ja/web/api/document/pointerdown_event/index.md
new file mode 100644
index 00000000000000..aa43d369d564aa
--- /dev/null
+++ b/files/ja/web/api/document/pointerdown_event/index.md
@@ -0,0 +1,73 @@
+---
+title: 'Document: pointerdown イベント'
+slug: Web/API/Document/pointerdown_event
+tags:
+ - API
+ - Document
+ - Event
+ - PointerEvent
+ - Reference
+ - onpointerdown
+ - pointerdown
+ - イベント
+translation_of: Web/API/Document/pointerdown_event
+---
+{{APIRef}}
+
+`pointerdown` イベントは、ポインターがアクティブになったときに発生します。マウスでは、端末がボタンが押されていない状態から一つ以上のボタンが押されている状態に遷移したときに発生します。タッチ操作では、デジタイザーに物理的な接触が行われたときに発生します。ペンでは、スタイラスがデジタイザーに物理的に接触したときに発生します。
+
+
+
+
+ バブリング |
+ あり |
+
+
+ キャンセル可能 |
+ はい |
+
+
+ インターフェイス |
+ {{domxref("PointerEvent")}} |
+
+
+ イベントハンドラープロパティ |
+
+ {{domxref("GlobalEventHandlers/onpointerdown", "onpointerdown")}}
+ |
+
+
+
+
+## 例
+
+`addEventListener()` の使用例:
+
+```js
+document.addEventListener('pointerdown', (event) => {
+ console.log('Pointer down event');
+});
+```
+
+`onpointerdown` イベントハンドラープロパティの使用例:
+
+```js
+document.onpointerdown = (event) => {
+ console.log('Pointer down event');
+};
+```
+
+## 仕様書
+
+| 仕様書 | 状態 |
+| ---------------------------------------------------------------------------- | ------------------------------------ |
+| {{SpecName('Pointer Events', '#the-pointerdown-event')}} | {{Spec2('Pointer Events')}} |
+
+## ブラウザーの互換性
+
+{{Compat("api.Document.pointerdown_event")}}
+
+## 関連情報
+
+- {{domxref("GlobalEventHandlers/onpointerdown", "onpointerdown")}} イベントハンドラープロパティ
+- `HTMLElement` を対象としたこのイベント: {{domxref("HTMLElement/pointerdown_event", "pointerdown")}} イベント
diff --git a/files/ja/web/api/document/pointerenter_event/index.html b/files/ja/web/api/document/pointerenter_event/index.html
deleted file mode 100644
index 9336e5da595d22..00000000000000
--- a/files/ja/web/api/document/pointerenter_event/index.html
+++ /dev/null
@@ -1,89 +0,0 @@
----
-title: 'Document: pointerenter イベント'
-slug: Web/API/Document/pointerenter_event
-tags:
- - API
- - Document
- - Event
- - PointerEvent
- - Reference
- - onpointerenter
- - pointerenter
- - イベント
-translation_of: Web/API/Document/pointerenter_event
----
-{{APIRef}}
-
-pointerenter
イベントは、ポインティングデバイスが要素またはその子孫のヒットテスト領域に入ったときに発生します。ホバーに対応していない機器では {{domxref("Document/pointerdown_event", "pointerdown")}} イベントの結果として移動した場合も含みます ({{domxref("Document/pointerdown_event", "pointerdown")}} を参照)。
-
-
-
-
- バブリング |
- なし |
-
-
- キャンセル可能 |
- いいえ |
-
-
- インターフェイス |
- {{domxref("PointerEvent")}} |
-
-
- イベントハンドラープロパティ |
- {{domxref("GlobalEventHandlers/onpointerenter", "onpointerenter")}} |
-
-
-
-
-例
-
-addEventListener()
の使用例:
-
-document.addEventListener('pointerenter', (event) => {
- console.log('Pointer entered element');
-});
-
-onpointerenter
イベントハンドラープロパティの使用例:
-
-document.onpointerenter = (event) => {
- console.log('Pointer entered element');
-};
-
-仕様書
-
-
-
-
- 仕様書 |
- 状態 |
-
-
-
-
- {{SpecName('Pointer Events', '#the-pointerenter-event')}} |
- {{Spec2('Pointer Events')}} |
-
-
-
-
-ブラウザーの対応
-
-{{Compat("api.Document.pointerenter_event")}}
-
-関連情報
-
-
- - {{domxref("Document/gotpointercapture_event", "gotpointercapture")}}
- - {{domxref("Document/lostpointercapture_event", "lostpointercapture")}}
- - {{domxref("Document/pointerover_event", "pointerover")}}
- - {{domxref("Document/pointerdown_event", "pointerdown")}}
- - {{domxref("Document/pointermove_event", "pointermove")}}
- - {{domxref("Document/pointerup_event", "pointerup")}}
- - {{domxref("Document/pointercancel_event", "pointercancel")}}
- - {{domxref("Document/pointerout_event", "pointerout")}}
- - {{domxref("Document/pointerleave_event", "pointerleave")}}
- - {{domxref("GlobalEventHandlers/onpointerenter", "onpointerenter")}} イベントハンドラープロパティ
- HTMLElement
を対象としたこのイベント: {{domxref("HTMLElement/pointerenter_event", "pointerenter")}} イベント
-
diff --git a/files/ja/web/api/document/pointerenter_event/index.md b/files/ja/web/api/document/pointerenter_event/index.md
new file mode 100644
index 00000000000000..da05849941466c
--- /dev/null
+++ b/files/ja/web/api/document/pointerenter_event/index.md
@@ -0,0 +1,82 @@
+---
+title: 'Document: pointerenter イベント'
+slug: Web/API/Document/pointerenter_event
+tags:
+ - API
+ - Document
+ - Event
+ - PointerEvent
+ - Reference
+ - onpointerenter
+ - pointerenter
+ - イベント
+translation_of: Web/API/Document/pointerenter_event
+---
+{{APIRef}}
+
+`pointerenter` イベントは、ポインティングデバイスが要素またはその子孫のヒットテスト領域に入ったときに発生します。ホバーに対応していない機器では {{domxref("Document/pointerdown_event", "pointerdown")}} イベントの結果として移動した場合も含みます ({{domxref("Document/pointerdown_event", "pointerdown")}} を参照)。
+
+
+
+
+ バブリング |
+ なし |
+
+
+ キャンセル可能 |
+ いいえ |
+
+
+ インターフェイス |
+ {{domxref("PointerEvent")}} |
+
+
+ イベントハンドラープロパティ |
+
+ {{domxref("GlobalEventHandlers/onpointerenter", "onpointerenter")}}
+ |
+
+
+
+
+## 例
+
+`addEventListener()` の使用例:
+
+```js
+document.addEventListener('pointerenter', (event) => {
+ console.log('Pointer entered element');
+});
+```
+
+`onpointerenter` イベントハンドラープロパティの使用例:
+
+```js
+document.onpointerenter = (event) => {
+ console.log('Pointer entered element');
+};
+```
+
+## 仕様書
+
+| 仕様書 | 状態 |
+| ---------------------------------------------------------------------------- | ------------------------------------ |
+| {{SpecName('Pointer Events', '#the-pointerenter-event')}} | {{Spec2('Pointer Events')}} |
+
+## ブラウザーの互換性
+
+{{Compat("api.Document.pointerenter_event")}}
+
+## 関連情報
+
+- {{domxref("Document/gotpointercapture_event", "gotpointercapture")}}
+- {{domxref("Document/lostpointercapture_event", "lostpointercapture")}}
+- {{domxref("Document/pointerover_event", "pointerover")}}
+- {{domxref("Document/pointerdown_event", "pointerdown")}}
+- {{domxref("Document/pointermove_event", "pointermove")}}
+- {{domxref("Document/pointerup_event", "pointerup")}}
+- {{domxref("Document/pointercancel_event", "pointercancel")}}
+- {{domxref("Document/pointerout_event", "pointerout")}}
+- {{domxref("Document/pointerleave_event", "pointerleave")}}
+- {{domxref("GlobalEventHandlers/onpointerenter", "onpointerenter")}} イベントハンドラープロパティ
+- `HTMLElement` を対象としたこのイベント: {{domxref("HTMLElement/pointerenter_event", "pointerenter")}} イベント
diff --git a/files/ja/web/api/document/pointerleave_event/index.html b/files/ja/web/api/document/pointerleave_event/index.html
deleted file mode 100644
index 0a4e2826081c39..00000000000000
--- a/files/ja/web/api/document/pointerleave_event/index.html
+++ /dev/null
@@ -1,89 +0,0 @@
----
-title: 'Document: pointerleave イベント'
-slug: Web/API/Document/pointerleave_event
-tags:
- - API
- - Document
- - Event
- - PointerEvent
- - Reference
- - onpointerleave
- - pointerleave
- - イベント
-translation_of: Web/API/Document/pointerleave_event
----
-{{APIRef}}
-
-pointerleave
イベントは、ポインティングデバイスが要素のヒットテスト領域を出たときに発生します。ペンデバイスでは、このイベントはデジタイザーが検出可能なホバー範囲をスタイラスが離れたときに発生します。
-
-
-
-
- バブリング |
- なし |
-
-
- キャンセル可能 |
- いいえ |
-
-
- インターフェイス |
- {{domxref("PointerEvent")}} |
-
-
- イベントハンドラープロパティ |
- {{domxref("GlobalEventHandlers/onpointerleave", "onpointerleave")}} |
-
-
-
-
-例
-
-addEventListener()
の使用例:
-
-document.addEventListener('pointerleave', (event) => {
- console.log('Pointer left element');
-});
-
-onpointerleave
イベントハンドラープロパティの使用例:
-
-document.onpointerleave = (event) => {
- console.log('Pointer left element');
-};
-
-仕様書
-
-
-
-
- 仕様書 |
- 状態 |
-
-
-
-
- {{SpecName('Pointer Events', '#the-pointerleave-event')}} |
- {{Spec2('Pointer Events')}} |
-
-
-
-
-ブラウザーの対応
-
-{{Compat("api.Document.pointerleave_event")}}
-
-関連情報
-
-
- - {{domxref("Document/gotpointercapture_event", "gotpointercapture")}}
- - {{domxref("Document/lostpointercapture_event", "lostpointercapture")}}
- - {{domxref("Document/pointerover_event", "pointerover")}}
- - {{domxref("Document/pointerenter_event", "pointerenter")}}
- - {{domxref("Document/pointerdown_event", "pointerdown")}}
- - {{domxref("Document/pointermove_event", "pointermove")}}
- - {{domxref("Document/pointerup_event", "pointerup")}}
- - {{domxref("Document/pointercancel_event", "pointercancel")}}
- - {{domxref("Document/pointerout_event", "pointerout")}}
- - {{domxref("GlobalEventHandlers/onpointerleave", "onpointerleave")}} イベントハンドラープロパティ
- HTMLElement
を対象としたこのイベント: {{domxref("HTMLElement/pointerleave_event", "pointerleave")}} イベント
-
diff --git a/files/ja/web/api/document/pointerleave_event/index.md b/files/ja/web/api/document/pointerleave_event/index.md
new file mode 100644
index 00000000000000..effda6db2a7c89
--- /dev/null
+++ b/files/ja/web/api/document/pointerleave_event/index.md
@@ -0,0 +1,82 @@
+---
+title: 'Document: pointerleave イベント'
+slug: Web/API/Document/pointerleave_event
+tags:
+ - API
+ - Document
+ - Event
+ - PointerEvent
+ - Reference
+ - onpointerleave
+ - pointerleave
+ - イベント
+translation_of: Web/API/Document/pointerleave_event
+---
+{{APIRef}}
+
+`pointerleave` イベントは、ポインティングデバイスが要素のヒットテスト領域を出たときに発生します。ペンデバイスでは、このイベントはデジタイザーが検出可能なホバー範囲をスタイラスが離れたときに発生します。
+
+
+
+
+ バブリング |
+ なし |
+
+
+ キャンセル可能 |
+ いいえ |
+
+
+ インターフェイス |
+ {{domxref("PointerEvent")}} |
+
+
+ イベントハンドラープロパティ |
+
+ {{domxref("GlobalEventHandlers/onpointerleave", "onpointerleave")}}
+ |
+
+
+
+
+## 例
+
+`addEventListener()` の使用例:
+
+```js
+document.addEventListener('pointerleave', (event) => {
+ console.log('Pointer left element');
+});
+```
+
+`onpointerleave` イベントハンドラープロパティの使用例:
+
+```js
+document.onpointerleave = (event) => {
+ console.log('Pointer left element');
+};
+```
+
+## 仕様書
+
+| 仕様書 | 状態 |
+| ---------------------------------------------------------------------------- | ------------------------------------ |
+| {{SpecName('Pointer Events', '#the-pointerleave-event')}} | {{Spec2('Pointer Events')}} |
+
+## ブラウザーの互換性
+
+{{Compat("api.Document.pointerleave_event")}}
+
+## 関連情報
+
+- {{domxref("Document/gotpointercapture_event", "gotpointercapture")}}
+- {{domxref("Document/lostpointercapture_event", "lostpointercapture")}}
+- {{domxref("Document/pointerover_event", "pointerover")}}
+- {{domxref("Document/pointerenter_event", "pointerenter")}}
+- {{domxref("Document/pointerdown_event", "pointerdown")}}
+- {{domxref("Document/pointermove_event", "pointermove")}}
+- {{domxref("Document/pointerup_event", "pointerup")}}
+- {{domxref("Document/pointercancel_event", "pointercancel")}}
+- {{domxref("Document/pointerout_event", "pointerout")}}
+- {{domxref("GlobalEventHandlers/onpointerleave", "onpointerleave")}} イベントハンドラープロパティ
+- `HTMLElement` を対象としたこのイベント: {{domxref("HTMLElement/pointerleave_event", "pointerleave")}} イベント
diff --git a/files/ja/web/api/document/pointerlockchange_event/index.html b/files/ja/web/api/document/pointerlockchange_event/index.html
deleted file mode 100644
index 73414a87c6d48d..00000000000000
--- a/files/ja/web/api/document/pointerlockchange_event/index.html
+++ /dev/null
@@ -1,78 +0,0 @@
----
-title: 'Document: pointerlockchange イベント'
-slug: Web/API/Document/pointerlockchange_event
-tags:
- - Document
- - Event
- - Reference
- - Web
- - pointerlockchange
- - イベント
- - ウェブ
-translation_of: Web/API/Document/pointerlockchange_event
----
-{{APIRef}}
-
-pointerlockchange
イベントは、ポインターがロックされたり解除されたりしたときに発行されます。
-
-
-
-
- バブリング |
- あり |
-
-
- キャンセル可能 |
- いいえ |
-
-
- インターフェイス |
- {{domxref("Event")}} |
-
-
- イベントハンドラープロパティ |
- {{domxref("Document/onpointerlockchange", "onpointerlockchange")}} |
-
-
-
-
-例
-
-addEventListener()
を使用した場合
-
-document.addEventListener('pointerlockchange', (event) => {
- console.log('Pointer lock changed');
-});
-
-onpointerlockerror
イベントハンドラープロパティを使用した場合
-
-document.onpointerlockchange = (event) => {
- console.log('Pointer lock changed');
-};
-
-仕様書
-
-
-
-
- 仕様書 |
- 状態 |
-
-
-
-
- {{SpecName('Pointer Lock', '#pointerlockchange-and-pointerlockerror-events')}} |
- {{Spec2('Pointer Lock')}} |
-
-
-
-
-ブラウザーの対応
-
-{{Compat("api.Document.pointerlockchange_event")}}
-
-関連情報
-
-
diff --git a/files/ja/web/api/document/pointerlockchange_event/index.md b/files/ja/web/api/document/pointerlockchange_event/index.md
new file mode 100644
index 00000000000000..2314b71a206589
--- /dev/null
+++ b/files/ja/web/api/document/pointerlockchange_event/index.md
@@ -0,0 +1,71 @@
+---
+title: 'Document: pointerlockchange イベント'
+slug: Web/API/Document/pointerlockchange_event
+tags:
+ - Document
+ - Event
+ - Reference
+ - Web
+ - pointerlockchange
+ - イベント
+ - ウェブ
+translation_of: Web/API/Document/pointerlockchange_event
+---
+{{APIRef}}
+
+`pointerlockchange` イベントは、ポインターがロックされたり解除されたりしたときに発行されます。
+
+
+
+
+ バブリング |
+ あり |
+
+
+ キャンセル可能 |
+ いいえ |
+
+
+ インターフェイス |
+ {{domxref("Event")}} |
+
+
+ イベントハンドラープロパティ |
+
+ {{domxref("Document/onpointerlockchange", "onpointerlockchange")}}
+ |
+
+
+
+
+## 例
+
+`addEventListener()` を使用した場合
+
+```js
+document.addEventListener('pointerlockchange', (event) => {
+ console.log('Pointer lock changed');
+});
+```
+
+`onpointerlockerror` イベントハンドラープロパティを使用した場合
+
+```js
+document.onpointerlockchange = (event) => {
+ console.log('Pointer lock changed');
+};
+```
+
+## 仕様書
+
+| 仕様書 | 状態 |
+| -------------------------------------------------------------------------------------------------------- | -------------------------------- |
+| {{SpecName('Pointer Lock', '#pointerlockchange-and-pointerlockerror-events')}} | {{Spec2('Pointer Lock')}} |
+
+## ブラウザーの互換性
+
+{{Compat("api.Document.pointerlockchange_event")}}
+
+## 関連情報
+
+- [Pointer Lock API の使用](/ja/docs/API/Pointer_Lock_API)
diff --git a/files/ja/web/api/document/pointerlockelement/index.html b/files/ja/web/api/document/pointerlockelement/index.html
deleted file mode 100644
index e4ed1f4052b9b0..00000000000000
--- a/files/ja/web/api/document/pointerlockelement/index.html
+++ /dev/null
@@ -1,59 +0,0 @@
----
-title: DocumentOrShadowRoot.pointerLockElement
-slug: Web/API/Document/pointerLockElement
-tags:
- - API
- - DOM
- - Document
- - Property
- - Reference
- - ShadowRoot
- - mouse lock
- - プロパティ
- - マウスロック
-translation_of: Web/API/DocumentOrShadowRoot/pointerLockElement
-original_slug: Web/API/DocumentOrShadowRoot/pointerLockElement
----
-{{APIRef("DOM")}}
-
-pointerLockElement
は {{domxref("Document")}} および {{domxref("ShadowRoot")}} インターフェイスのプロパティで、要素をポインターがロックされている間のマウスイベントの対象として設定します。ロック待ち状態の場合、ポインターがロックされていない場合、対象が他の文書にある場合は null
になります。
-
-構文
-
-var element = document.pointerLockElement;
-
-
-返値
-
-{{domxref("Element")}} または null
。
-
-仕様書
-
-
-
-
- 仕様書 |
- 状態 |
- 備考 |
-
-
-
-
- {{SpecName('Pointer Lock','#extensions-to-the-documentorshadowroot-mixin','pointerLockElement')}} |
- {{Spec2('Pointer Lock')}} |
- Document インターフェイスを拡張 |
-
-
-
-
-ブラウザーの互換性
-
-{{Compat("api.DocumentOrShadowRoot.pointerLockElement")}}
-
-関連情報
-
-
- - {{ domxref("Document.exitPointerLock()") }}
- - {{ domxref("Element.requestPointerLock()") }}
- - Pointer Lock
-
diff --git a/files/ja/web/api/document/pointerlockelement/index.md b/files/ja/web/api/document/pointerlockelement/index.md
new file mode 100644
index 00000000000000..7360d7f66b6f4a
--- /dev/null
+++ b/files/ja/web/api/document/pointerlockelement/index.md
@@ -0,0 +1,45 @@
+---
+title: DocumentOrShadowRoot.pointerLockElement
+slug: Web/API/Document/pointerLockElement
+tags:
+ - API
+ - DOM
+ - Document
+ - Property
+ - Reference
+ - ShadowRoot
+ - mouse lock
+ - プロパティ
+ - マウスロック
+translation_of: Web/API/DocumentOrShadowRoot/pointerLockElement
+original_slug: Web/API/DocumentOrShadowRoot/pointerLockElement
+---
+{{APIRef("DOM")}}
+
+**`pointerLockElement`** は {{domxref("Document")}} および {{domxref("ShadowRoot")}} インターフェイスのプロパティで、要素をポインターがロックされている間のマウスイベントの対象として設定します。ロック待ち状態の場合、ポインターがロックされていない場合、対象が他の文書にある場合は `null` になります。
+
+## 構文
+
+```
+var element = document.pointerLockElement;
+```
+
+### 返値
+
+{{domxref("Element")}} または `null`。
+
+## 仕様書
+
+| 仕様書 | 状態 | 備考 |
+| -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------- | --------------------------------- |
+| {{SpecName('Pointer Lock','#extensions-to-the-documentorshadowroot-mixin','pointerLockElement')}} | {{Spec2('Pointer Lock')}} | `Document` インターフェイスを拡張 |
+
+## ブラウザーの互換性
+
+{{Compat("api.DocumentOrShadowRoot.pointerLockElement")}}
+
+## 関連情報
+
+- {{ domxref("Document.exitPointerLock()") }}
+- {{ domxref("Element.requestPointerLock()") }}
+- [Pointer Lock](/ja/docs/WebAPI/Pointer_Lock)
diff --git a/files/ja/web/api/document/pointerlockerror_event/index.html b/files/ja/web/api/document/pointerlockerror_event/index.html
deleted file mode 100644
index 59ebb5b607fb71..00000000000000
--- a/files/ja/web/api/document/pointerlockerror_event/index.html
+++ /dev/null
@@ -1,81 +0,0 @@
----
-title: 'Document: pointerlockerror イベント'
-slug: Web/API/Document/pointerlockerror_event
-tags:
- - Document
- - Event
- - Reference
- - Web
- - pointerlockerror
- - イベント
- - ウェブ
- - ポインター
-translation_of: Web/API/Document/pointerlockerror_event
----
-{{APIRef}}
-
-pointerlockerror
イベントは、 (技術的な理由、またはパーミッションが拒否されたために) ポインターのロックに失敗したときに発生します。
-
-
-
-
- バブリング |
- あり |
-
-
- キャンセル可能 |
- いいえ |
-
-
- インターフェイス |
- {{domxref("Event")}} |
-
-
- イベントハンドラープロパティ |
- {{domxref("Document/onpointerlockchange", "onpointerlockerror")}} |
-
-
-
-
-例
-
-addEventListener()
を使用した場合
-
-const para = document.querySelector('p');
-
-document.addEventListener('pointerlockerror', (event) => {
- console.log('Error locking pointer');
-});
-
-onpointerlockerror
イベントハンドラープロパティを使用した場合
-
-document.onpointerlockerror = (event) => {
- console.log('Error locking pointer');
-};
-
-仕様書
-
-
-
-
- 仕様書 |
- 状態 |
-
-
-
-
- {{SpecName('Pointer Lock', '#pointerlockchange-and-pointerlockerror-events')}} |
- {{Spec2('Pointer Lock')}} |
-
-
-
-
-ブラウザーの対応
-
-{{Compat("api.Document.pointerlockerror_event")}}
-
-関連情報
-
-
diff --git a/files/ja/web/api/document/pointerlockerror_event/index.md b/files/ja/web/api/document/pointerlockerror_event/index.md
new file mode 100644
index 00000000000000..6f9ea45edfd17c
--- /dev/null
+++ b/files/ja/web/api/document/pointerlockerror_event/index.md
@@ -0,0 +1,74 @@
+---
+title: 'Document: pointerlockerror イベント'
+slug: Web/API/Document/pointerlockerror_event
+tags:
+ - Document
+ - Event
+ - Reference
+ - Web
+ - pointerlockerror
+ - イベント
+ - ウェブ
+ - ポインター
+translation_of: Web/API/Document/pointerlockerror_event
+---
+{{APIRef}}
+
+`pointerlockerror` イベントは、 (技術的な理由、またはパーミッションが拒否されたために) ポインターのロックに失敗したときに発生します。
+
+
+
+
+ バブリング |
+ あり |
+
+
+ キャンセル可能 |
+ いいえ |
+
+
+ インターフェイス |
+ {{domxref("Event")}} |
+
+
+ イベントハンドラープロパティ |
+
+ {{domxref("Document/onpointerlockchange", "onpointerlockerror")}}
+ |
+
+
+
+
+## 例
+
+`addEventListener()` を使用した場合
+
+```js
+const para = document.querySelector('p');
+
+document.addEventListener('pointerlockerror', (event) => {
+ console.log('Error locking pointer');
+});
+```
+
+`onpointerlockerror` イベントハンドラープロパティを使用した場合
+
+```js
+document.onpointerlockerror = (event) => {
+ console.log('Error locking pointer');
+};
+```
+
+## 仕様書
+
+| 仕様書 | 状態 |
+| -------------------------------------------------------------------------------------------------------- | -------------------------------- |
+| {{SpecName('Pointer Lock', '#pointerlockchange-and-pointerlockerror-events')}} | {{Spec2('Pointer Lock')}} |
+
+## ブラウザーの互換性
+
+{{Compat("api.Document.pointerlockerror_event")}}
+
+## 関連情報
+
+- [Pointer Lock API の使用](/ja/docs/API/Pointer_Lock_API)
diff --git a/files/ja/web/api/document/pointermove_event/index.html b/files/ja/web/api/document/pointermove_event/index.html
deleted file mode 100644
index 573a3a9d03f123..00000000000000
--- a/files/ja/web/api/document/pointermove_event/index.html
+++ /dev/null
@@ -1,91 +0,0 @@
----
-title: 'Document: pointermove イベント'
-slug: Web/API/Document/pointermove_event
-tags:
- - Document
- - Event
- - PointerEvent
- - Reference
- - Web
- - pointer
- - pointermove
- - イベント
- - ウェブ
- - ポインター
-translation_of: Web/API/Document/pointermove_event
----
-{{APIRef}}
-
-pointermove
はポインターの座標が変化し、かつブラウザーのタッチ操作によってポインターがキャンセルされていないときに発生します。
-
-
-
-
- バブリング |
- あり |
-
-
- キャンセル可能 |
- はい |
-
-
- インターフェイス |
- {{domxref("PointerEvent")}} |
-
-
- イベントハンドラープロパティ |
- {{domxref("GlobalEventHandlers/onpointermove", "onpointermove")}} |
-
-
-
-
-例
-
-addEventListener()
を使用した場合
-
-document.addEventListener('pointermove', (event) => {
- console.log('Pointer moved');
-});
-
-onpointermove
イベントハンドラープロパティを使用した場合
-
-document.onpointermove = (event) => {
- console.log('Pointer moved');
-};
-
-仕様書
-
-
-
-
- 仕様書 |
- 状態 |
-
-
-
-
- {{SpecName('Pointer Events', '#the-pointermove-event')}} |
- {{Spec2('Pointer Events')}} |
-
-
-
-
-ブラウザーの対応
-
-{{Compat("api.Document.pointermove_event")}}
-
-関連情報
-
-
- - {{domxref("Document/gotpointercapture_event", "gotpointercapture")}}
- - {{domxref("Document/lostpointercapture_event", "lostpointercapture")}}
- - {{domxref("Document/pointerover_event", "pointerover")}}
- - {{domxref("Document/pointerenter_event", "pointerenter")}}
- - {{domxref("Document/pointerdown_event", "pointerdown")}}
- - {{domxref("Document/pointerup_event", "pointerup")}}
- - {{domxref("Document/pointercancel_event", "pointercancel")}}
- - {{domxref("Document/pointerout_event", "pointerout")}}
- - {{domxref("Document/pointerleave_event", "pointerleave")}}
- - {{domxref("GlobalEventHandlers/onpointerout", "onpointerout")}} イベントハンドラープロパティ
- HTMLElement
を対象としたこのイベント: {{domxref("HTMLElement/pointermove_event", "pointermove")}} イベント
-
diff --git a/files/ja/web/api/document/pointermove_event/index.md b/files/ja/web/api/document/pointermove_event/index.md
new file mode 100644
index 00000000000000..46c475c560cbec
--- /dev/null
+++ b/files/ja/web/api/document/pointermove_event/index.md
@@ -0,0 +1,84 @@
+---
+title: 'Document: pointermove イベント'
+slug: Web/API/Document/pointermove_event
+tags:
+ - Document
+ - Event
+ - PointerEvent
+ - Reference
+ - Web
+ - pointer
+ - pointermove
+ - イベント
+ - ウェブ
+ - ポインター
+translation_of: Web/API/Document/pointermove_event
+---
+{{APIRef}}
+
+`pointermove` はポインターの座標が変化し、かつブラウザーの[タッチ操作](/ja/docs/Web/CSS/touch-action)によってポインターが[キャンセル](/ja/docs/Web/Events/pointercancel)されていないときに発生します。
+
+
+
+
+ バブリング |
+ あり |
+
+
+ キャンセル可能 |
+ はい |
+
+
+ インターフェイス |
+ {{domxref("PointerEvent")}} |
+
+
+ イベントハンドラープロパティ |
+
+ {{domxref("GlobalEventHandlers/onpointermove", "onpointermove")}}
+ |
+
+
+
+
+## 例
+
+`addEventListener()` を使用した場合
+
+```js
+document.addEventListener('pointermove', (event) => {
+ console.log('Pointer moved');
+});
+```
+
+`onpointermove` イベントハンドラープロパティを使用した場合
+
+```js
+document.onpointermove = (event) => {
+ console.log('Pointer moved');
+};
+```
+
+## 仕様書
+
+| 仕様書 | 状態 |
+| ---------------------------------------------------------------------------- | ------------------------------------ |
+| {{SpecName('Pointer Events', '#the-pointermove-event')}} | {{Spec2('Pointer Events')}} |
+
+## ブラウザーの互換性
+
+{{Compat("api.Document.pointermove_event")}}
+
+## 関連情報
+
+- {{domxref("Document/gotpointercapture_event", "gotpointercapture")}}
+- {{domxref("Document/lostpointercapture_event", "lostpointercapture")}}
+- {{domxref("Document/pointerover_event", "pointerover")}}
+- {{domxref("Document/pointerenter_event", "pointerenter")}}
+- {{domxref("Document/pointerdown_event", "pointerdown")}}
+- {{domxref("Document/pointerup_event", "pointerup")}}
+- {{domxref("Document/pointercancel_event", "pointercancel")}}
+- {{domxref("Document/pointerout_event", "pointerout")}}
+- {{domxref("Document/pointerleave_event", "pointerleave")}}
+- {{domxref("GlobalEventHandlers/onpointerout", "onpointerout")}} イベントハンドラープロパティ
+- `HTMLElement` を対象としたこのイベント: {{domxref("HTMLElement/pointermove_event", "pointermove")}} イベント
diff --git a/files/ja/web/api/document/pointerout_event/index.html b/files/ja/web/api/document/pointerout_event/index.html
deleted file mode 100644
index f6261665ffe558..00000000000000
--- a/files/ja/web/api/document/pointerout_event/index.html
+++ /dev/null
@@ -1,89 +0,0 @@
----
-title: 'Document: pointerout イベント'
-slug: Web/API/Document/pointerout_event
-tags:
- - Document
- - Event
- - PointerEvent
- - Reference
- - Web
- - onpointerout
- - pointerout
- - イベント
-translation_of: Web/API/Document/pointerout_event
----
-{{APIRef}}
-
-pointerout
イベントはいくつかの理由で発生します。ポインティングデバイスが要素のヒットテスト境界を出たとき、ホバーに対応していない端末で {{domxref("Document/pointerup_event", "pointerup")}} イベントが発生したとき ({{domxref("Document/pointerup_event", "pointerup")}} を参照)、 {{domxref("Document/pointercancel_event", "pointercancel")}} イベントが発生した後 ({{domxref("Document/pointercancel_event", "pointercancel")}} を参照)、スタイラスペンがデジタイザーで検出可能なホバー範囲を離れたとき、などです。
-
-
-
-
- バブリング |
- あり |
-
-
- キャンセル可能 |
- はい |
-
-
- インターフェイス |
- {{domxref("PointerEvent")}} |
-
-
- イベントハンドラープロパティ |
- {{domxref("GlobalEventHandlers/onpointerout", "onpointerout")}} |
-
-
-
-
-例
-
-addEventListener()
を使用した場合
-
-document.addEventListener('pointerout', (event) => {
- console.log('Pointer moved out');
-});
-
-onpointerout
イベントハンドラープロパティを使用した場合
-
-document.onpointerout = (event) => {
- console.log('Pointer moved out');
-};
-
-仕様書
-
-
-
-
- 仕様書 |
- 状態 |
-
-
-
-
- {{SpecName('Pointer Events', '#the-pointerout-event')}} |
- {{Spec2('Pointer Events')}} |
-
-
-
-
-ブラウザーの対応
-
-{{Compat("api.Document.pointerout_event")}}
-
-関連情報
-
-
- - {{domxref("Document/gotpointercapture_event", "gotpointercapture")}}
- - {{domxref("Document/lostpointercapture_event", "lostpointercapture")}}
- - {{domxref("Document/pointerover_event", "pointerover")}}
- - {{domxref("Document/pointerenter_event", "pointerenter")}}
- - {{domxref("Document/pointerdown_event", "pointerdown")}}
- - {{domxref("Document/pointermove_event", "pointermove")}}
- - {{domxref("Document/pointerup_event", "pointerup")}}
- - {{domxref("Document/pointercancel_event", "pointercancel")}}
- - {{domxref("Document/pointerleave_event", "pointerleave")}}
- - {{domxref("GlobalEventHandlers/onpointerout", "onpointerout")}} event handler property
- HTMLElement
を対象としたこのイベント: {{domxref("HTMLElement/pointerout_event", "pointerout")}} event
-
diff --git a/files/ja/web/api/document/pointerout_event/index.md b/files/ja/web/api/document/pointerout_event/index.md
new file mode 100644
index 00000000000000..4f345f2bf8fb10
--- /dev/null
+++ b/files/ja/web/api/document/pointerout_event/index.md
@@ -0,0 +1,82 @@
+---
+title: 'Document: pointerout イベント'
+slug: Web/API/Document/pointerout_event
+tags:
+ - Document
+ - Event
+ - PointerEvent
+ - Reference
+ - Web
+ - onpointerout
+ - pointerout
+ - イベント
+translation_of: Web/API/Document/pointerout_event
+---
+{{APIRef}}
+
+`pointerout` イベントはいくつかの理由で発生します。ポインティングデバイスが要素の*ヒットテスト*境界を出たとき、ホバーに対応していない端末で {{domxref("Document/pointerup_event", "pointerup")}} イベントが発生したとき ({{domxref("Document/pointerup_event", "pointerup")}} を参照)、 {{domxref("Document/pointercancel_event", "pointercancel")}} イベントが発生した後 ({{domxref("Document/pointercancel_event", "pointercancel")}} を参照)、スタイラスペンがデジタイザーで検出可能なホバー範囲を離れたとき、などです。
+
+
+
+
+ バブリング |
+ あり |
+
+
+ キャンセル可能 |
+ はい |
+
+
+ インターフェイス |
+ {{domxref("PointerEvent")}} |
+
+
+ イベントハンドラープロパティ |
+
+ {{domxref("GlobalEventHandlers/onpointerout", "onpointerout")}}
+ |
+
+
+
+
+## 例
+
+`addEventListener()` を使用した場合
+
+```js
+document.addEventListener('pointerout', (event) => {
+ console.log('Pointer moved out');
+});
+```
+
+`onpointerout` イベントハンドラープロパティを使用した場合
+
+```js
+document.onpointerout = (event) => {
+ console.log('Pointer moved out');
+};
+```
+
+## 仕様書
+
+| 仕様書 | 状態 |
+| ------------------------------------------------------------------------ | ------------------------------------ |
+| {{SpecName('Pointer Events', '#the-pointerout-event')}} | {{Spec2('Pointer Events')}} |
+
+## ブラウザーの互換性
+
+{{Compat("api.Document.pointerout_event")}}
+
+## 関連情報
+
+- {{domxref("Document/gotpointercapture_event", "gotpointercapture")}}
+- {{domxref("Document/lostpointercapture_event", "lostpointercapture")}}
+- {{domxref("Document/pointerover_event", "pointerover")}}
+- {{domxref("Document/pointerenter_event", "pointerenter")}}
+- {{domxref("Document/pointerdown_event", "pointerdown")}}
+- {{domxref("Document/pointermove_event", "pointermove")}}
+- {{domxref("Document/pointerup_event", "pointerup")}}
+- {{domxref("Document/pointercancel_event", "pointercancel")}}
+- {{domxref("Document/pointerleave_event", "pointerleave")}}
+- {{domxref("GlobalEventHandlers/onpointerout", "onpointerout")}} event handler property
+- `HTMLElement` を対象としたこのイベント: {{domxref("HTMLElement/pointerout_event", "pointerout")}} event
diff --git a/files/ja/web/api/document/pointerover_event/index.html b/files/ja/web/api/document/pointerover_event/index.html
deleted file mode 100644
index 3d63f73b5b8eae..00000000000000
--- a/files/ja/web/api/document/pointerover_event/index.html
+++ /dev/null
@@ -1,91 +0,0 @@
----
-title: 'Document: pointerover イベント'
-slug: Web/API/Document/pointerover_event
-tags:
- - API
- - Document
- - Event
- - PointerEvent
- - Reference
- - Web
- - onpointerover
- - pointer
- - pointerover
- - イベント
- - ポインター
-translation_of: Web/API/Document/pointerover_event
----
-{{APIRef}}
-
-pointerover
イベントは、ポインティングデバイスが要素のヒットテスト境界内に移動したときに発生します。
-
-
-
-
- バブリング |
- あり |
-
-
- キャンセル可能 |
- はい |
-
-
- インターフェイス |
- {{domxref("PointerEvent")}} |
-
-
- イベントハンドラープロパティ |
- {{domxref("GlobalEventHandlers/onpointerover", "onpointerover")}} |
-
-
-
-
-例
-
-addEventListener()
を使用した場合
-
-document.addEventListener('pointerover', (event) => {
- console.log('Pointer moved in');
-});
-
-onpointerover
イベントハンドラープロパティを使用した場合
-
-document.onpointerover = (event) => {
- console.log('Pointer moved in');
-};
-
-仕様書
-
-
-
-
- 仕様書 |
- 状態 |
-
-
-
-
- {{SpecName('Pointer Events', '#the-pointerover-event')}} |
- {{Spec2('Pointer Events')}} |
-
-
-
-
-ブラウザーの対応
-
-{{Compat("api.Document.pointerover_event")}}
-
-関連情報
-
-
- - {{domxref("Document/gotpointercapture_event", "gotpointercapture")}}
- - {{domxref("Document/lostpointercapture_event", "lostpointercapture")}}
- - {{domxref("Document/pointerenter_event", "pointerenter")}}
- - {{domxref("Document/pointerdown_event", "pointerdown")}}
- - {{domxref("Document/pointermove_event", "pointermove")}}
- - {{domxref("Document/pointercancel_event", "pointercancel")}}
- - {{domxref("Document/pointerout_event", "pointerout")}}
- - {{domxref("Document/pointerleave_event", "pointerleave")}}
- - {{domxref("GlobalEventHandlers/onpointerover", "onpointerover")}} event handler property
- HTMLElement
を対象としたこのイベント: {{domxref("HTMLElement/pointerover_event", "pointerover")}} イベント
-
diff --git a/files/ja/web/api/document/pointerover_event/index.md b/files/ja/web/api/document/pointerover_event/index.md
new file mode 100644
index 00000000000000..9004ee8b6e1fc8
--- /dev/null
+++ b/files/ja/web/api/document/pointerover_event/index.md
@@ -0,0 +1,84 @@
+---
+title: 'Document: pointerover イベント'
+slug: Web/API/Document/pointerover_event
+tags:
+ - API
+ - Document
+ - Event
+ - PointerEvent
+ - Reference
+ - Web
+ - onpointerover
+ - pointer
+ - pointerover
+ - イベント
+ - ポインター
+translation_of: Web/API/Document/pointerover_event
+---
+{{APIRef}}
+
+`pointerover` イベントは、ポインティングデバイスが要素のヒットテスト境界内に移動したときに発生します。
+
+
+
+
+ バブリング |
+ あり |
+
+
+ キャンセル可能 |
+ はい |
+
+
+ インターフェイス |
+ {{domxref("PointerEvent")}} |
+
+
+ イベントハンドラープロパティ |
+
+ {{domxref("GlobalEventHandlers/onpointerover", "onpointerover")}}
+ |
+
+
+
+
+## 例
+
+`addEventListener()` を使用した場合
+
+```js
+document.addEventListener('pointerover', (event) => {
+ console.log('Pointer moved in');
+});
+```
+
+`onpointerover` イベントハンドラープロパティを使用した場合
+
+```js
+document.onpointerover = (event) => {
+ console.log('Pointer moved in');
+};
+```
+
+## 仕様書
+
+| 仕様書 | 状態 |
+| ---------------------------------------------------------------------------- | ------------------------------------ |
+| {{SpecName('Pointer Events', '#the-pointerover-event')}} | {{Spec2('Pointer Events')}} |
+
+## ブラウザーの互換性
+
+{{Compat("api.Document.pointerover_event")}}
+
+## 関連情報
+
+- {{domxref("Document/gotpointercapture_event", "gotpointercapture")}}
+- {{domxref("Document/lostpointercapture_event", "lostpointercapture")}}
+- {{domxref("Document/pointerenter_event", "pointerenter")}}
+- {{domxref("Document/pointerdown_event", "pointerdown")}}
+- {{domxref("Document/pointermove_event", "pointermove")}}
+- {{domxref("Document/pointercancel_event", "pointercancel")}}
+- {{domxref("Document/pointerout_event", "pointerout")}}
+- {{domxref("Document/pointerleave_event", "pointerleave")}}
+- {{domxref("GlobalEventHandlers/onpointerover", "onpointerover")}} event handler property
+- `HTMLElement` を対象としたこのイベント: {{domxref("HTMLElement/pointerover_event", "pointerover")}} イベント
diff --git a/files/ja/web/api/document/pointerup_event/index.html b/files/ja/web/api/document/pointerup_event/index.html
deleted file mode 100644
index fa1ecc28fc8a09..00000000000000
--- a/files/ja/web/api/document/pointerup_event/index.html
+++ /dev/null
@@ -1,91 +0,0 @@
----
-title: 'Document: pointerup event'
-slug: Web/API/Document/pointerup_event
-tags:
- - API
- - Document
- - Event
- - PointerEvent
- - Reference
- - Web
- - onpointerup
- - pointerup
- - イベント
- - ポインター
-translation_of: Web/API/Document/pointerup_event
----
-{{APIRef}}
-
-pointerup
イベントは、ポインターがアクティブではなくなったときに発生します。
-
-
-
-
- バブリング |
- あり |
-
-
- キャンセル可能 |
- はい |
-
-
- インターフェイス |
- {{domxref("PointerEvent")}} |
-
-
- イベントハンドラープロパティ |
- {{domxref("GlobalEventHandlers/onpointerup", "onpointerup")}} |
-
-
-
-
-例
-
-addEventListener()
を使用した場合
-
-document.addEventListener('pointerup', (event) => {
- console.log('Pointer up');
-});
-
-onpointerup
イベントハンドラープロパティを使用した場合
-
-document.onpointerup = (event) => {
- console.log('Pointer up');
-};
-
-仕様書
-
-
-
-
- 仕様書 |
- 状態 |
-
-
-
-
- {{SpecName('Pointer Events', '#the-pointerup-event')}} |
- {{Spec2('Pointer Events')}} |
-
-
-
-
-ブラウザーの対応
-
-{{Compat("api.Document.pointerup_event")}}
-
-関連情報
-
-
- - {{domxref("Document/gotpointercapture_event", "gotpointercapture")}}
- - {{domxref("Document/lostpointercapture_event", "lostpointercapture")}}
- - {{domxref("Document/pointerover_event", "pointerover")}}
- - {{domxref("Document/pointerenter_event", "pointerenter")}}
- - {{domxref("Document/pointerdown_event", "pointerdown")}}
- - {{domxref("Document/pointermove_event", "pointermove")}}
- - {{domxref("Document/pointercancel_event", "pointercancel")}}
- - {{domxref("Document/pointerout_event", "pointerout")}}
- - {{domxref("Document/pointerleave_event", "pointerleave")}}
- - {{domxref("GlobalEventHandlers/onpointerup", "onpointerup")}} イベントハンドラープロパティ
- HTMLElement
を対象としたこのイベント: {{domxref("HTMLElement/pointerup_event", "pointerup")}} イベント
-
diff --git a/files/ja/web/api/document/pointerup_event/index.md b/files/ja/web/api/document/pointerup_event/index.md
new file mode 100644
index 00000000000000..ed8ed421ae7b04
--- /dev/null
+++ b/files/ja/web/api/document/pointerup_event/index.md
@@ -0,0 +1,84 @@
+---
+title: 'Document: pointerup event'
+slug: Web/API/Document/pointerup_event
+tags:
+ - API
+ - Document
+ - Event
+ - PointerEvent
+ - Reference
+ - Web
+ - onpointerup
+ - pointerup
+ - イベント
+ - ポインター
+translation_of: Web/API/Document/pointerup_event
+---
+{{APIRef}}
+
+`pointerup` イベントは、ポインターがアクティブではなくなったときに発生します。
+
+
+
+
+ バブリング |
+ あり |
+
+
+ キャンセル可能 |
+ はい |
+
+
+ インターフェイス |
+ {{domxref("PointerEvent")}} |
+
+
+ イベントハンドラープロパティ |
+
+ {{domxref("GlobalEventHandlers/onpointerup", "onpointerup")}}
+ |
+
+
+
+
+## 例
+
+`addEventListener()` を使用した場合
+
+```js
+document.addEventListener('pointerup', (event) => {
+ console.log('Pointer up');
+});
+```
+
+`onpointerup` イベントハンドラープロパティを使用した場合
+
+```js
+document.onpointerup = (event) => {
+ console.log('Pointer up');
+};
+```
+
+## 仕様書
+
+| 仕様書 | 状態 |
+| ------------------------------------------------------------------------ | ------------------------------------ |
+| {{SpecName('Pointer Events', '#the-pointerup-event')}} | {{Spec2('Pointer Events')}} |
+
+## ブラウザーの互換性
+
+{{Compat("api.Document.pointerup_event")}}
+
+## 関連情報
+
+- {{domxref("Document/gotpointercapture_event", "gotpointercapture")}}
+- {{domxref("Document/lostpointercapture_event", "lostpointercapture")}}
+- {{domxref("Document/pointerover_event", "pointerover")}}
+- {{domxref("Document/pointerenter_event", "pointerenter")}}
+- {{domxref("Document/pointerdown_event", "pointerdown")}}
+- {{domxref("Document/pointermove_event", "pointermove")}}
+- {{domxref("Document/pointercancel_event", "pointercancel")}}
+- {{domxref("Document/pointerout_event", "pointerout")}}
+- {{domxref("Document/pointerleave_event", "pointerleave")}}
+- {{domxref("GlobalEventHandlers/onpointerup", "onpointerup")}} イベントハンドラープロパティ
+- `HTMLElement` を対象としたこのイベント: {{domxref("HTMLElement/pointerup_event", "pointerup")}} イベント
diff --git a/files/ja/web/api/document/readystatechange_event/index.html b/files/ja/web/api/document/readystatechange_event/index.html
deleted file mode 100644
index 83c86bbc0c7de6..00000000000000
--- a/files/ja/web/api/document/readystatechange_event/index.html
+++ /dev/null
@@ -1,142 +0,0 @@
----
-title: 'Document: readystatechange イベント'
-slug: Web/API/Document/readystatechange_event
-tags:
- - Event
- - Reference
- - XMLHttpRequest
- - interactive
-translation_of: Web/API/Document/readystatechange_event
----
-{{APIRef}}
-
-readystatechange
eventは、文書の {{domxref("Document.readyState", "readyState")}} 属性が変化したときに発生します。
-
-
-
-
- バブリング |
- なし |
-
-
- キャンセル |
- 不可 |
-
-
- インターフェイス |
- {{domxref("Event")}} |
-
-
- イベントハンドラープロパティ |
- onreadystatechange |
-
-
-
-
-例
-
-ライブデモ
-
-HTML
-
-<div class="controls">
- <button id="reload" type="button">Reload</button>
-</div>
-
-<div class="event-log">
- <label>Event log:</label>
- <textarea readonly class="event-log-contents" rows="8" cols="30"></textarea>
-</div>
-
-
-
CSS
-
-
body {
- display: grid;
- grid-template-areas: "control log";
-}
-
-.controls {
- grid-area: control;
- display: flex;
- align-items: center;
- justify-content: center;
-}
-
-.event-log {
- grid-area: log;
-}
-
-.event-log-contents {
- resize: none;
-}
-
-label, button {
- display: block;
-}
-
-#reload {
- height: 2rem;
-}
-
-
-
-
-JS
-
-const log = document.querySelector('.event-log-contents');
-const reload = document.querySelector('#reload');
-
-reload.addEventListener('click', () => {
- log.textContent ='';
- window.setTimeout(() => {
- window.location.reload(true);
- }, 200);
-});
-
-window.addEventListener('load', (event) => {
- log.textContent = log.textContent + 'load\n';
-});
-
-document.addEventListener('readystatechange', (event) => {
- log.textContent = log.textContent + `readystate: ${document.readyState}\n`;
-});
-
-document.addEventListener('DOMContentLoaded', (event) => {
- log.textContent = log.textContent + `DOMContentLoaded\n`;
-});
-
-
-
-結果
-
-{{ EmbedLiveSample('Live_example', '100%', '160px') }}
-
-仕様書
-
-
-
-
- 仕様書 |
- 状態 |
- 備考 |
-
-
-
-
- {{SpecName("HTML WHATWG", "indices.html#event-readystatechange", "readystatechange")}} |
- {{Spec2("HTML WHATWG")}} |
- |
-
-
-
-
-ブラウザーの互換性
-
-{{Compat("api.Document.readystatechange_event")}}
-
-関連情報
-
-
- - 関連イベント: {{domxref("Document/DOMContentLoaded_event", "DOMContentLoaded")}}, {{domxref("Window/load_event", "load")}}, {{domxref("Window/beforeunload_event", "beforeunload")}}, {{domxref("Window/unload_event", "unload")}}
-
diff --git a/files/ja/web/api/document/readystatechange_event/index.md b/files/ja/web/api/document/readystatechange_event/index.md
new file mode 100644
index 00000000000000..bb4197f388723e
--- /dev/null
+++ b/files/ja/web/api/document/readystatechange_event/index.md
@@ -0,0 +1,125 @@
+---
+title: 'Document: readystatechange イベント'
+slug: Web/API/Document/readystatechange_event
+tags:
+ - Event
+ - Reference
+ - XMLHttpRequest
+ - interactive
+translation_of: Web/API/Document/readystatechange_event
+---
+{{APIRef}}
+
+**`readystatechange`** event は、文書の {{domxref("Document.readyState", "readyState")}} 属性が変化したときに発生します。
+
+
+
+
+ バブリング |
+ なし |
+
+
+ キャンセル |
+ 不可 |
+
+
+ インターフェイス |
+ {{domxref("Event")}} |
+
+
+ イベントハンドラープロパティ |
+ onreadystatechange |
+
+
+
+
+## 例
+
+### ライブデモ
+
+#### HTML
+
+```html
+
+
+
+
+
+
+
+
+```
+
+```css hidden
+body {
+ display: grid;
+ grid-template-areas: "control log";
+}
+
+.controls {
+ grid-area: control;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+
+.event-log {
+ grid-area: log;
+}
+
+.event-log-contents {
+ resize: none;
+}
+
+label, button {
+ display: block;
+}
+
+#reload {
+ height: 2rem;
+}
+```
+
+#### JS
+
+```js
+const log = document.querySelector('.event-log-contents');
+const reload = document.querySelector('#reload');
+
+reload.addEventListener('click', () => {
+ log.textContent ='';
+ window.setTimeout(() => {
+ window.location.reload(true);
+ }, 200);
+});
+
+window.addEventListener('load', (event) => {
+ log.textContent = log.textContent + 'load\n';
+});
+
+document.addEventListener('readystatechange', (event) => {
+ log.textContent = log.textContent + `readystate: ${document.readyState}\n`;
+});
+
+document.addEventListener('DOMContentLoaded', (event) => {
+ log.textContent = log.textContent + `DOMContentLoaded\n`;
+});
+```
+
+#### 結果
+
+{{ EmbedLiveSample('Live_example', '100%', '160px') }}
+
+## 仕様書
+
+| 仕様書 | 状態 | 備考 |
+| -------------------------------------------------------------------------------------------------------------------- | -------------------------------- | ---- |
+| {{SpecName("HTML WHATWG", "indices.html#event-readystatechange", "readystatechange")}} | {{Spec2("HTML WHATWG")}} | |
+
+## ブラウザーの互換性
+
+{{Compat("api.Document.readystatechange_event")}}
+
+## 関連情報
+
+- 関連イベント: {{domxref("Document/DOMContentLoaded_event", "DOMContentLoaded")}}, {{domxref("Window/load_event", "load")}}, {{domxref("Window/beforeunload_event", "beforeunload")}}, {{domxref("Window/unload_event", "unload")}}
diff --git a/files/ja/web/api/document/referrer/index.html b/files/ja/web/api/document/referrer/index.html
deleted file mode 100644
index 9d4d65a59915ed..00000000000000
--- a/files/ja/web/api/document/referrer/index.html
+++ /dev/null
@@ -1,50 +0,0 @@
----
-title: Document.referrer
-slug: Web/API/Document/referrer
-tags:
- - API
- - Document
- - HTML DOM
- - Property
- - Reference
- - referrer
- - プロパティ
-translation_of: Web/API/Document/referrer
----
-{{APIRef("DOM")}}
-
-Document.referrer
プロパティは、このページへリンクしていたページの URI を返します。
-
-構文
-
-var referrer = document.referrer;
-
-
-値
-
-この値は、ユーザーが (リンクではなく、例えばブックマークから) ページに直接移動した場合は空文字列になります。プロパティはただ文字列を返すものであるため、参照先のページの DOM アクセスを提供するものではありません。
-
-{{HTMLElement("iframe")}} の中では、 Document.referrer
は最初、親ウィンドウの {{domxref("Window/location", "Window.location")}} の {{domxref("HTMLHyperlinkElementUtils/href", "href")}} と同じ値が設定されます。
-
-仕様書
-
-
-
-
- 仕様書 |
- 状態 |
- 備考 |
-
-
-
-
- {{SpecName('HTML WHATWG', '#dom-document-referrer-dev', 'document.referrer')}} |
- {{Spec2('HTML WHATWG')}} |
- |
-
-
-
-
-ブラウザーの互換性
-
-{{Compat("api.Document.referrer")}}
diff --git a/files/ja/web/api/document/referrer/index.md b/files/ja/web/api/document/referrer/index.md
new file mode 100644
index 00000000000000..15e2f250b5097f
--- /dev/null
+++ b/files/ja/web/api/document/referrer/index.md
@@ -0,0 +1,38 @@
+---
+title: Document.referrer
+slug: Web/API/Document/referrer
+tags:
+ - API
+ - Document
+ - HTML DOM
+ - Property
+ - Reference
+ - referrer
+ - プロパティ
+translation_of: Web/API/Document/referrer
+---
+{{APIRef("DOM")}}
+
+**`Document.referrer`** プロパティは、このページへリンクしていたページの [URI](http://www.w3.org/Addressing/#background) を返します。
+
+## 構文
+
+```
+var referrer = document.referrer;
+```
+
+### 値
+
+この値は、ユーザーが (リンクではなく、例えばブックマークから) ページに直接移動した場合は空文字列になります。プロパティはただ文字列を返すものであるため、参照先のページの DOM アクセスを提供するものではありません。
+
+{{HTMLElement("iframe")}} の中では、 `Document.referrer` は最初、親ウィンドウの {{domxref("Window/location", "Window.location")}} の {{domxref("HTMLHyperlinkElementUtils/href", "href")}} と同じ値が設定されます。
+
+## 仕様書
+
+| 仕様書 | 状態 | 備考 |
+| -------------------------------------------------------------------------------------------------------- | -------------------------------- | ---- |
+| {{SpecName('HTML WHATWG', '#dom-document-referrer-dev', 'document.referrer')}} | {{Spec2('HTML WHATWG')}} | |
+
+## ブラウザーの互換性
+
+{{Compat("api.Document.referrer")}}
diff --git a/files/ja/web/api/document/releasecapture/index.md b/files/ja/web/api/document/releasecapture/index.md
index c37b29c2d0017a..c86f3385d0e9f2 100644
--- a/files/ja/web/api/document/releasecapture/index.md
+++ b/files/ja/web/api/document/releasecapture/index.md
@@ -39,7 +39,7 @@ releaseCapture()
Internet Explorer の実装に基づく。
-## ブラウザーの対応
+## ブラウザーの互換性
{{Compat}}
diff --git a/files/ja/web/api/document/scripts/index.html b/files/ja/web/api/document/scripts/index.html
deleted file mode 100644
index 1f62f7940fd907..00000000000000
--- a/files/ja/web/api/document/scripts/index.html
+++ /dev/null
@@ -1,59 +0,0 @@
----
-title: Document.scripts
-slug: Web/API/Document/scripts
-tags:
- - API
- - Document
- - HTML DOM
- - Property
- - Reference
- - Script
- - プロパティ
-translation_of: Web/API/Document/scripts
----
-{{APIRef("DOM")}}
-
-{{domxref("Document")}} インターフェイスの scripts
プロパティは、文書中の {{HTMLElement("script")}} 要素のリストを返します。返されるオブジェクトは単一の {{domxref("HTMLCollection")}} オブジェクトです。
-
-構文
-
-var scriptList = document.scripts;
-
-
-値
-
-{{domxref("HTMLCollection")}} です。これを使用して、リスト中のすべての要素を配列のように取得することができます。
-
-例
-
-ページ内の {{HTMLElement("script")}} 要素の存在を確認する例を以下に示します。
-
-let scripts = document.scripts;
-
-if (scripts.length) {
- alert("このページには script 要素があります。");
-}
-
-
-仕様書
-
-
-
-
- 仕様書 |
- 状態 |
- 備考 |
-
-
-
-
- {{SpecName('HTML WHATWG', '#dom-document-scripts', 'Document.scripts')}} |
- {{ Spec2('HTML WHATWG') }} |
- |
-
-
-
-
-ブラウザーの対応
-
-{{Compat("api.Document.scripts")}}
diff --git a/files/ja/web/api/document/scripts/index.md b/files/ja/web/api/document/scripts/index.md
new file mode 100644
index 00000000000000..2a349dd0857cb2
--- /dev/null
+++ b/files/ja/web/api/document/scripts/index.md
@@ -0,0 +1,48 @@
+---
+title: Document.scripts
+slug: Web/API/Document/scripts
+tags:
+ - API
+ - Document
+ - HTML DOM
+ - Property
+ - Reference
+ - Script
+ - プロパティ
+translation_of: Web/API/Document/scripts
+---
+{{APIRef("DOM")}}
+
+{{domxref("Document")}} インターフェイスの **`scripts`** プロパティは、文書中の {{HTMLElement("script")}} 要素のリストを返します。返されるオブジェクトは単一の {{domxref("HTMLCollection")}} オブジェクトです。
+
+## 構文
+
+```
+var scriptList = document.scripts;
+```
+
+### 値
+
+{{domxref("HTMLCollection")}} です。これを使用して、リスト中のすべての要素を配列のように取得することができます。
+
+## 例
+
+ページ内の {{HTMLElement("script")}} 要素の存在を確認する例を以下に示します。
+
+```js
+let scripts = document.scripts;
+
+if (scripts.length) {
+ alert("このページには script 要素があります。");
+}
+```
+
+## 仕様書
+
+| 仕様書 | 状態 | 備考 |
+| ------------------------------------------------------------------------------------------------ | ------------------------------------ | ---- |
+| {{SpecName('HTML WHATWG', '#dom-document-scripts', 'Document.scripts')}} | {{ Spec2('HTML WHATWG') }} | |
+
+## ブラウザーの互換性
+
+{{Compat("api.Document.scripts")}}
diff --git a/files/ja/web/api/document/scroll_event/index.html b/files/ja/web/api/document/scroll_event/index.html
deleted file mode 100644
index 2363837779931d..00000000000000
--- a/files/ja/web/api/document/scroll_event/index.html
+++ /dev/null
@@ -1,100 +0,0 @@
----
-title: 'Document: scroll event'
-slug: Web/API/Document/scroll_event
-tags:
- - API
- - DOM
- - Document
- - Event
- - Reference
- - Scroll
- - UIEvent
-translation_of: Web/API/Document/scroll_event
----
-{{APIRef}}
-
-scroll
イベントは、ドキュメントのビューまたは要素がスクロールされたときに生じます。
-
-
-
-
-
-
- バブリング |
- はい |
-
-
- キャンセル可能 |
- いいえ |
-
-
- インターフェイス |
- {{DOMxRef("Event")}} |
-
-
- イベントハンドラープロパティ |
- {{DOMxRef("GlobalEventHandlers.onscroll", "onscroll")}} |
-
-
-
-
-
-
注: iOS UIWebViews では、スクロールされている最中は scroll
イベントは生じません。スクロールが完了したあとにのみ生じます。 詳しくは Bootstrap issue #16202 をご覧ください。 Safari と WKWebViews ではこのバグは起きません。
-
-
-例
-
-
-
-scroll
イベントは高い確率で生じることができるため、イベントハンドラーは DOM の変更といった計算上の処理コストの高い操作を実行すべきではありません。その代わり、次のように、 {{DOMxRef("Window.requestAnimationFrame()", "requestAnimationFrame()")}} や、 {{DOMxRef("WindowOrWorkerGlobalScope.setTimeout()", "setTimeout()")}} 、または {{DOMxRef("CustomEvent")}} を使ってイベントを抑制することが推奨されます。
-
-ただし、インプットイベントやアニメーションフレームは同じような確率で生じ、そのため下記のような最適化は不要の場合が多いことに注意してください。 この例では requestAnimationFrame
の scroll
を最適化しています。
-
-// Reference: http://www.html5rocks.com/en/tutorials/speed/animations/
-
-let last_known_scroll_position = 0;
-let ticking = false;
-
-function doSomething(scroll_pos) {
- // Do something with the scroll position
-}
-
-window.addEventListener('scroll', function(e) {
- last_known_scroll_position = window.scrollY;
-
- if (!ticking) {
- window.requestAnimationFrame(function() {
- doSomething(last_known_scroll_position);
- ticking = false;
- });
-
- ticking = true;
- }
-});
-
-その他の類似の例を見るには、 resize
イベントページをご覧ください。
-
-仕様
-
-
-
-
- 仕様書 |
- 策定状況 |
-
-
- {{SpecName('CSSOM View', '#scrolling-events')}} |
- {{Spec2('CSSOM View')}} |
-
-
-
-
-ブラウザー実装状況
-
-{{Compat("api.Document.scroll_event")}}
-
-関連情報
-
-
diff --git a/files/ja/web/api/document/scroll_event/index.md b/files/ja/web/api/document/scroll_event/index.md
new file mode 100644
index 00000000000000..520d70600016de
--- /dev/null
+++ b/files/ja/web/api/document/scroll_event/index.md
@@ -0,0 +1,90 @@
+---
+title: 'Document: scroll event'
+slug: Web/API/Document/scroll_event
+tags:
+ - API
+ - DOM
+ - Document
+ - Event
+ - Reference
+ - Scroll
+ - UIEvent
+translation_of: Web/API/Document/scroll_event
+---
+{{APIRef}}
+
+**`scroll`** イベントは、ドキュメントのビューまたは要素がスクロールされたときに生じます。
+
+
+
+
+
+ バブリング |
+ はい |
+
+
+ キャンセル可能 |
+ いいえ |
+
+
+ インターフェイス |
+ {{DOMxRef("Event")}} |
+
+
+ イベントハンドラープロパティ |
+
+ {{DOMxRef("GlobalEventHandlers.onscroll", "onscroll")}}
+ |
+
+
+
+
+> **Note:** iOS UIWebViews では、スクロールされている最中は `scroll` イベントは生じません。スクロールが完了したあとにのみ生じます。 詳しくは [Bootstrap issue #16202](https://github.com/twbs/bootstrap/issues/16202) をご覧ください。 Safari と WKWebViews ではこのバグは起きません。
+
+## 例
+
+### スクロールイベントを抑制する
+
+`scroll` イベントは高い確率で生じることができるため、イベントハンドラーは DOM の変更といった計算上の処理コストの高い操作を実行すべきではありません。その代わり、次のように、 {{DOMxRef("Window.requestAnimationFrame()", "requestAnimationFrame()")}} や、 {{DOMxRef("WindowOrWorkerGlobalScope.setTimeout()", "setTimeout()")}} 、または {{DOMxRef("CustomEvent")}} を使ってイベントを抑制することが推奨されます。
+
+ただし、インプットイベントやアニメーションフレームは同じような確率で生じ、そのため下記のような最適化は不要の場合が多いことに注意してください。 この例では `requestAnimationFrame` の `scroll` を最適化しています。
+
+```js
+// Reference: http://www.html5rocks.com/en/tutorials/speed/animations/
+
+let last_known_scroll_position = 0;
+let ticking = false;
+
+function doSomething(scroll_pos) {
+ // Do something with the scroll position
+}
+
+window.addEventListener('scroll', function(e) {
+ last_known_scroll_position = window.scrollY;
+
+ if (!ticking) {
+ window.requestAnimationFrame(function() {
+ doSomething(last_known_scroll_position);
+ ticking = false;
+ });
+
+ ticking = true;
+ }
+});
+```
+
+その他の類似の例を見るには、 [`resize`](/ja/docs/Web/API/Document/defaultView/resize_event) イベントページをご覧ください。
+
+## 仕様
+
+| 仕様書 | 策定状況 |
+| ---------------------------------------------------------------- | -------------------------------- |
+| {{SpecName('CSSOM View', '#scrolling-events')}} | {{Spec2('CSSOM View')}} |
+
+## ブラウザーの互換性
+
+{{Compat("api.Document.scroll_event")}}
+
+## 関連情報
+
+- [Element: `scroll` event](/ja/docs/Web/API/Element/scroll_event)
diff --git a/files/ja/web/api/document/scrollingelement/index.html b/files/ja/web/api/document/scrollingelement/index.html
deleted file mode 100644
index e44315b2521f59..00000000000000
--- a/files/ja/web/api/document/scrollingelement/index.html
+++ /dev/null
@@ -1,59 +0,0 @@
----
-title: Document.scrollingElement
-slug: Web/API/Document/scrollingElement
-tags:
- - API
- - Document
- - Property
- - Reference
- - scrollingElement
-translation_of: Web/API/Document/scrollingElement
----
-{{APIRef("DOM")}}
-
-
-
-scrollingElement
は、{{domxref("Document")}} インターフェースの読み込み専用プロパティです。
-
-スクロール可能な {{domxref("Element")}} の参照を返します。
-
-スタンダードモードでは、ドキュメントのルート要素である {{domxref("document.documentElement")}} になります。
-
-
-
-後方互換モードでは、scrollingElement
はHTMLの body
要素を返します。
-
-body
要素が存在しないか、それが
スクロール可能 な場合は null を返します。
-
-構文
-
-var element = document.scrollingElement;
-
-例
-
-var scrollElm = document.scrollingElement;
-scrollElm.scrollTop = 0;
-
-
-仕様
-
-
-
-
- 仕様書 |
- 策定状況 |
- コメント |
-
-
- {{SpecName('CSSOM View','#dom-document-scrollingelement','scrollingElement')}} |
- {{Spec2('CSSOM View')}} |
- Initial definition |
-
-
-
-
-ブラウザー実装状況
-
-
-
-{{Compat("api.Document.scrollingElement")}}
diff --git a/files/ja/web/api/document/scrollingelement/index.md b/files/ja/web/api/document/scrollingelement/index.md
new file mode 100644
index 00000000000000..318499dcc9cf01
--- /dev/null
+++ b/files/ja/web/api/document/scrollingelement/index.md
@@ -0,0 +1,35 @@
+---
+title: Document.scrollingElement
+slug: Web/API/Document/scrollingElement
+tags:
+ - API
+ - Document
+ - Property
+ - Reference
+ - scrollingElement
+translation_of: Web/API/Document/scrollingElement
+---
+{{APIRef("DOM")}}**`scrollingElement`** は、{{domxref("Document")}} インターフェースの読み込み専用プロパティです。スクロール可能な {{domxref("Element")}} の参照を返します。スタンダードモードでは、ドキュメントのルート要素である {{domxref("document.documentElement")}} になります。後方互換モードでは、`scrollingElement` は HTML の `body` 要素を返します。`body` 要素が存在しないか、それが [スクロール可能](https://drafts.csswg.org/cssom-view/#potentially-scrollable) な場合は null を返します。
+
+## 構文
+
+```
+var element = document.scrollingElement;
+```
+
+## 例
+
+```js
+var scrollElm = document.scrollingElement;
+scrollElm.scrollTop = 0;
+```
+
+## 仕様
+
+| 仕様書 | 策定状況 | コメント |
+| -------------------------------------------------------------------------------------------------------- | -------------------------------- | ------------------ |
+| {{SpecName('CSSOM View','#dom-document-scrollingelement','scrollingElement')}} | {{Spec2('CSSOM View')}} | Initial definition |
+
+## ブラウザーの互換性
+
+{{Compat("api.Document.scrollingElement")}}
diff --git a/files/ja/web/api/document/selectionchange_event/index.html b/files/ja/web/api/document/selectionchange_event/index.html
deleted file mode 100644
index c255bf8328cb0f..00000000000000
--- a/files/ja/web/api/document/selectionchange_event/index.html
+++ /dev/null
@@ -1,81 +0,0 @@
----
-title: 'Document: selectionchange イベント'
-slug: Web/API/Document/selectionchange_event
-tags:
- - Event
- - Reference
- - Selection
- - Selection API
- - selectionchange
-translation_of: Web/API/Document/selectionchange_event
----
-{{APIRef}}
-
-
-
selectionchange
イベントは Selection API の一部で、文書における現在のテキストの選択が変更された際に発生します。
-
-
-
-
-
- バブリング |
- なし |
-
-
- キャンセル |
- 不可 |
-
-
- インターフェイス |
- {{domxref("Event")}} |
-
-
- イベントハンドラープロパティ |
- {{domxref("GlobalEventHandlers.onselectionchange", "onselectionchange")}} |
-
-
-
-
-例
-
-// addEventListener version
-document.addEventListener('selectionchange', () => {
- console.log(document.getSelection());
-});
-
-// onselectionchange version
-document.onselectionchange = () => {
- console.log(document.getSelection());
-};
-
-
-仕様書
-
-
-
-
- 仕様書 |
- 状態 |
- 備考 |
-
-
-
-
- {{SpecName('Selection API', '#selectionchange-event', 'selectionchange')}} |
- {{Spec2('Selection API')}} |
- 初回定義 |
-
-
-
-
-ブラウザーの互換性
-
-{{Compat("api.Document.selectionchange_event")}}
-
-関連情報
-
-
- - {{domxref("Document/selectstart_event", "selectstart")}}
- - {{domxref("Document/getSelection", "Document.getSelection")}}
- - {{domxref("Selection", "Selection")}}
-
diff --git a/files/ja/web/api/document/selectionchange_event/index.md b/files/ja/web/api/document/selectionchange_event/index.md
new file mode 100644
index 00000000000000..bf1b44c604547c
--- /dev/null
+++ b/files/ja/web/api/document/selectionchange_event/index.md
@@ -0,0 +1,67 @@
+---
+title: 'Document: selectionchange イベント'
+slug: Web/API/Document/selectionchange_event
+tags:
+ - Event
+ - Reference
+ - Selection
+ - Selection API
+ - selectionchange
+translation_of: Web/API/Document/selectionchange_event
+---
+{{APIRef}}
+
+**`selectionchange`** イベントは [Selection API](/ja/docs/Web/API/Selection_API) の一部で、文書における現在のテキストの選択が変更された際に発生します。
+
+
+
+
+ バブリング |
+ なし |
+
+
+ キャンセル |
+ 不可 |
+
+
+ インターフェイス |
+ {{domxref("Event")}} |
+
+
+ イベントハンドラープロパティ |
+
+ {{domxref("GlobalEventHandlers.onselectionchange", "onselectionchange")}}
+ |
+
+
+
+
+## 例
+
+```js
+// addEventListener version
+document.addEventListener('selectionchange', () => {
+ console.log(document.getSelection());
+});
+
+// onselectionchange version
+document.onselectionchange = () => {
+ console.log(document.getSelection());
+};
+```
+
+## 仕様書
+
+| 仕様書 | 状態 | 備考 |
+| ---------------------------------------------------------------------------------------------------- | ------------------------------------ | -------- |
+| {{SpecName('Selection API', '#selectionchange-event', 'selectionchange')}} | {{Spec2('Selection API')}} | 初回定義 |
+
+## ブラウザーの互換性
+
+{{Compat("api.Document.selectionchange_event")}}
+
+## 関連情報
+
+- {{domxref("Document/selectstart_event", "selectstart")}}
+- {{domxref("Document/getSelection", "Document.getSelection")}}
+- {{domxref("Selection", "Selection")}}
diff --git a/files/ja/web/api/document/selectstart_event/index.html b/files/ja/web/api/document/selectstart_event/index.html
deleted file mode 100644
index 3c07388e502ccb..00000000000000
--- a/files/ja/web/api/document/selectstart_event/index.html
+++ /dev/null
@@ -1,73 +0,0 @@
----
-title: 'Document: selectstart event'
-slug: Web/API/Document/selectstart_event
-translation_of: Web/API/Document/selectstart_event
----
-{{APIRef}}
-
-
-
Selection API の selectstart
イベントは新しい選択範囲をユーザが指定した際に発火します。
-
-
イベントがキャンセルされた場合、選択範囲は変更されません。
-
-
-
-
-
- Bubbles |
- 有効 |
-
-
- Cancelable |
- 有効 |
-
-
- Interface |
- {{domxref("Event")}} |
-
-
- Event handler property |
- {{domxref("GlobalEventHandlers.onselectstart", "onselectstart")}} |
-
-
-
-
-例
-
-// addEventListener version
-document.addEventListener('selectstart', () => {
- console.log('Selection started');
-});
-
-// onselectstart version
-document.onselectstart = () => {
- console.log('Selection changed.');
-};
-
-
-仕様
-
-
-
-
- Specification |
- Status |
- Comment |
-
-
- {{SpecName('Selection API', '#selectstart-event', 'selectstart')}} |
- {{Spec2('Selection API')}} |
- Initial definition. |
-
-
-
-
-ブラウザ互換性
-
-{{Compat("api.Document.selectstart_event")}}
-
-参照
-
-
- - {{domxref("Document/selectionchange_event", "selectionchange")}}
-
diff --git a/files/ja/web/api/document/selectstart_event/index.md b/files/ja/web/api/document/selectstart_event/index.md
new file mode 100644
index 00000000000000..0b78883adc5271
--- /dev/null
+++ b/files/ja/web/api/document/selectstart_event/index.md
@@ -0,0 +1,61 @@
+---
+title: 'Document: selectstart event'
+slug: Web/API/Document/selectstart_event
+translation_of: Web/API/Document/selectstart_event
+---
+{{APIRef}}
+
+[Selection API](/ja/docs/Web/API/Selection) の **`selectstart`** イベントは新しい選択範囲をユーザが指定した際に発火します。
+
+イベントがキャンセルされた場合、選択範囲は変更されません。
+
+
+
+
+ Bubbles |
+ 有効 |
+
+
+ Cancelable |
+ 有効 |
+
+
+ Interface |
+ {{domxref("Event")}} |
+
+
+ Event handler property |
+
+ {{domxref("GlobalEventHandlers.onselectstart", "onselectstart")}}
+ |
+
+
+
+
+## 例
+
+```js
+// addEventListener version
+document.addEventListener('selectstart', () => {
+ console.log('Selection started');
+});
+
+// onselectstart version
+document.onselectstart = () => {
+ console.log('Selection changed.');
+};
+```
+
+## 仕様
+
+| Specification | Status | Comment |
+| ---------------------------------------------------------------------------------------- | ------------------------------------ | ------------------- |
+| {{SpecName('Selection API', '#selectstart-event', 'selectstart')}} | {{Spec2('Selection API')}} | Initial definition. |
+
+## ブラウザ互換性
+
+{{Compat("api.Document.selectstart_event")}}
+
+## 参照
+
+- {{domxref("Document/selectionchange_event", "selectionchange")}}
diff --git a/files/ja/web/api/document/stylesheets/index.html b/files/ja/web/api/document/stylesheets/index.html
deleted file mode 100644
index ad0db7ce39ca2d..00000000000000
--- a/files/ja/web/api/document/stylesheets/index.html
+++ /dev/null
@@ -1,62 +0,0 @@
----
-title: DocumentOrShadowRoot.styleSheets
-slug: Web/API/Document/styleSheets
-tags:
- - API
- - Document
- - DocumentOrShadowRoot
- - Property
- - Reference
- - ShadowRoot
- - Stylesheets
- - shadow dom
-translation_of: Web/API/DocumentOrShadowRoot/styleSheets
-original_slug: Web/API/DocumentOrShadowRoot/styleSheets
----
-{{SeeCompatTable}}{{APIRef("Shadow DOM")}}
-
-{{domxref("DocumentOrShadowRoot")}} インターフェイスの styleSheets
読み取り専用プロパティは、 {{domxref('CSSStyleSheet')}} オブジェクトの {{domxref('StyleSheetList')}} を返します。ドキュメントに明示的にリンクまたは埋め込まれたスタイルシートの場合。
-
-例
-
-function getStyleSheet(unique_title) {
- for (var i=0; i<document.styleSheets.length; i++) {
- var sheet = document.styleSheets[i];
- if (sheet.title == unique_title) {
- return sheet;
- }
- }
-}
-
-
-Notes
-
-返されるリストは次の順序で並べられます:
-
-
- - {{htmlelement("link")}} ヘッダから取得したスタイルシートが最初に配置され、ヘッダ順に並べ替えられます。
- - DOM から取得したスタイルシートは、ツリー順にソートされた後に配置されます。
-
-
-仕様
-
-
-
-
- 仕様 |
- ステータス |
- 備考 |
-
-
- {{SpecName('Shadow DOM','#extensions-to-the-documentorshadowroot-mixin','DocumentOrShadowRoot')}} |
- {{Spec2('Shadow DOM')}} |
- 初回定義 |
-
-
-
-
-ブラウザー実装状況
-
-
-
-{{Compat("api.DocumentOrShadowRoot.styleSheets")}}
diff --git a/files/ja/web/api/document/stylesheets/index.md b/files/ja/web/api/document/stylesheets/index.md
new file mode 100644
index 00000000000000..fe9f4ed8d876da
--- /dev/null
+++ b/files/ja/web/api/document/stylesheets/index.md
@@ -0,0 +1,48 @@
+---
+title: DocumentOrShadowRoot.styleSheets
+slug: Web/API/Document/styleSheets
+tags:
+ - API
+ - Document
+ - DocumentOrShadowRoot
+ - Property
+ - Reference
+ - ShadowRoot
+ - Stylesheets
+ - shadow dom
+translation_of: Web/API/DocumentOrShadowRoot/styleSheets
+original_slug: Web/API/DocumentOrShadowRoot/styleSheets
+---
+{{SeeCompatTable}}{{APIRef("Shadow DOM")}}
+
+{{domxref("DocumentOrShadowRoot")}} インターフェイスの **`styleSheets`** 読み取り専用プロパティは、 {{domxref('CSSStyleSheet')}} オブジェクトの {{domxref('StyleSheetList')}} を返します。ドキュメントに明示的にリンクまたは埋め込まれたスタイルシートの場合。
+
+## 例
+
+```js
+function getStyleSheet(unique_title) {
+ for (var i=0; i{{APIRef("DOM")}}
-
-