| 4 |
<span class=secno>$1 </span>$2 界面 |
<span class=secno>$1 </span>$2 界面 |
| 5 |
|
|
| 6 |
#en |
#en |
| 7 |
The <code><a href="#htmlcollection0">HTMLCollection</a></code> interface |
The <code><a href=#htmlcollection-0>HTMLCollection</a></code> interface |
| 8 |
represents a generic <a href="#collections0" |
represents a generic <a href=#collections-0 |
| 9 |
title=collections>collection</a> of elements. |
title=collections>collection</a> of elements. |
| 10 |
#ja |
#ja |
| 11 |
<code><a href="#htmlcollection0">HTMLCollection</a></code> |
<code><a href=#htmlcollection-0>HTMLCollection</a></code> |
| 12 |
界面は、一般的な要素の<a href="#collections0" |
界面は、一般的な要素の<a href=#collections-0 |
| 13 |
title=collections>集成</a>を表します。 |
title=collections>集成</a>を表します。 |
| 14 |
|
|
| 15 |
#en |
#en |
| 16 |
The <dfn id=length |
The <dfn id=dom-htmlcollection-length |
| 17 |
title=dom-HTMLCollection-length><code>length</code></dfn> attribute must |
title=dom-HTMLCollection-length><code>length</code></dfn> attribute must |
| 18 |
return the number of nodes <a href="#represents">represented by the |
return the number of nodes <a href=#represented-by-the-collection>represented by the |
| 19 |
collection</a>. |
collection</a>. |
| 20 |
#ja |
#ja |
| 21 |
<dfn id=length |
<dfn id=dom-htmlcollection-length |
| 22 |
title=dom-HTMLCollection-length><code>length</code></dfn> |
title=dom-HTMLCollection-length><code>length</code></dfn> |
| 23 |
属性は<a href="#represents">集成が表現</a>する節点の数を返さなければ[[MUST:なりません]]。 |
属性は<a href=#represented-by-the-collection>集成が表現</a>する節点の数を返さなければ[[MUST:なりません]]。 |
| 24 |
|
|
| 25 |
#en |
#en |
| 26 |
The <dfn id=itemindex title=dom-HTMLCollection-item><code>item(<var |
The <dfn id=dom-htmlcollection-item title=dom-HTMLCollection-item><code>item(<var |
| 27 |
title="">index</var>)</code></dfn> method must return the <var |
title="">index</var>)</code></dfn> method must return the <var |
| 28 |
title="">index</var>th node in the collection. If there is no <var |
title="">index</var>th node in the collection. If there is no <var |
| 29 |
title="">index</var>th node in the collection, then the method must return |
title="">index</var>th node in the collection, then the method must return |
| 30 |
null. |
null. |
| 31 |
#ja |
#ja |
| 32 |
<dfn id=itemindex title=dom-HTMLCollection-item><code>item(<var |
<dfn id=dom-htmlcollection-item title=dom-HTMLCollection-item><code>item(<var |
| 33 |
title="">index</var>)</code></dfn> メソッドは集成中の <var |
title="">index</var>)</code></dfn> メソッドは集成中の <var |
| 34 |
title="">index</var> 番目の節点を返さなければ[[MUST:なりません]]。 |
title="">index</var> 番目の節点を返さなければ[[MUST:なりません]]。 |
| 35 |
集成中の <var |
集成中の <var |
| 37 |
メソッドは null を返さなければなりません。 |
メソッドは null を返さなければなりません。 |
| 38 |
|
|
| 39 |
#en |
#en |
| 40 |
The <dfn id=nameditem |
The <dfn id=dom-htmlcollection-nameditem |
| 41 |
title=dom-HTMLCollection-namedItem><code>namedItem(<var |
title=dom-HTMLCollection-namedItem><code>namedItem(<var |
| 42 |
title="">key</var>)</code></dfn> method must return the first node in the |
title="">key</var>)</code></dfn> method must return the first node in the |
| 43 |
collection that matches the following requirements: |
collection that matches the following requirements: |
| 44 |
#ja |
#ja |
| 45 |
<dfn id=nameditem |
<dfn id=dom-htmlcollection-nameditem |
| 46 |
title=dom-HTMLCollection-namedItem><code>namedItem(<var |
title=dom-HTMLCollection-namedItem><code>namedItem(<var |
| 47 |
title="">key</var>)</code></dfn> メソッドは、 |
title="">key</var>)</code></dfn> メソッドは、 |
| 48 |
集成中で次のいずれかの要件に一致する最初の節点を返さなければ[[MUST:なりません]]。 |
集成中で次のいずれかの要件に一致する最初の節点を返さなければ[[MUST:なりません]]。 |
| 49 |
|
|
| 50 |
#en |
#en |
| 51 |
It is an <code><a href="#a">a</a></code>, <code><a |
It is an <code><a href=#the-a-element>a</a></code>, <code><a |
| 52 |
href="#applet">applet</a></code>, <code><a href="#area">area</a></code>, |
href=#the-applet-element>applet</a></code>, <code><a href=#the-area-element>area</a></code>, |
| 53 |
<code>form</code>, <code><a href="#img">img</a></code>, or <code><a |
<code>form</code>, <code><a href=#the-img-element>img</a></code>, or <code><a |
| 54 |
href="#object">object</a></code> element with a <code |
href=#the-object-element>object</a></code> element with a <code |
| 55 |
title=attr-name>name</code> attribute equal to <var title="">key</var>, |
title=attr-name>name</code> attribute equal to <var title="">key</var>, |
| 56 |
or, |
or, |
| 57 |
#ja |
#ja |
| 58 |
<code><a href="#a">a</a></code>、<code><a |
<code><a href=#the-a-element>a</a></code>、<code><a |
| 59 |
href="#applet">applet</a></code>、<code><a href="#area">area</a></code>、 |
href=#the-applet-element>applet</a></code>、<code><a href=#the-area-element>area</a></code>、 |
| 60 |
<code>form</code>、 <code><a href="#img">img</a></code>、 <code><a |
<code>form</code>、 <code><a href=#the-img-element>img</a></code>、 <code><a |
| 61 |
href="#object">object</a></code> のいずれかの要素であって、 <code |
href=#the-object-element>object</a></code> のいずれかの要素であって、 <code |
| 62 |
title=attr-name>name</code> 属性が <var title="">key</var> |
title=attr-name>name</code> 属性が <var title="">key</var> |
| 63 |
と等しいもの |
と等しいもの |
| 64 |
|
|
| 65 |
#en |
#en |
| 66 |
It is an <a href="#html-elements" title="HTML elements">HTML |
It is an <a href=#html-elements title="HTML elements">HTML |
| 67 |
element</a> of any kind with an <code title=attr-id><a |
element</a> of any kind with an <code title=attr-id><a |
| 68 |
href="#id">id</a></code> attribute equal to <var title="">key</var>. |
href=#the-id-attribute>id</a></code> attribute equal to <var title="">key</var>. |
| 69 |
(Non-HTML elements, even if they have IDs, are not searched for the |
(Non-HTML elements, even if they have IDs, are not searched for the |
| 70 |
purposes of <code title=dom-HTMLCollection-namedItem><a |
purposes of <code title=dom-HTMLCollection-namedItem><a |
| 71 |
href="#nameditem">namedItem()</a></code>.) |
href=#dom-htmlcollection-nameditem>namedItem()</a></code>.) |
| 72 |
#ja |
#ja |
| 73 |
任意の種類の <a href="#html-elements" title="HTML elements">HTML |
任意の種類の <a href=#html-elements title="HTML elements">HTML |
| 74 |
要素</a>であって、 <code title=attr-id><a |
要素</a>であって、 <code title=attr-id><a |
| 75 |
href="#id">id</a></code> 属性が <var title="">key</var> |
href=#the-id-attribute>id</a></code> 属性が <var title="">key</var> |
| 76 |
と等しいもの。 (非 HTML 要素は、 ID を有していたとしても、 |
と等しいもの。 (非 HTML 要素は、 ID を有していたとしても、 |
| 77 |
<code title=dom-HTMLCollection-namedItem><a |
<code title=dom-HTMLCollection-namedItem><a |
| 78 |
href="#nameditem">namedItem()</a></code> では検索されません。) |
href=#dom-htmlcollection-nameditem>namedItem()</a></code> では検索されません。) |
| 79 |
|
|
| 80 |
#en |
#en |
| 81 |
If no such elements are found, then the method must return null. |
If no such elements are found, then the method must return null. |
| 85 |
|
|
| 86 |
#en |
#en |
| 87 |
The <code><a |
The <code><a |
| 88 |
href="#htmlformcontrolscollection0">HTMLFormControlsCollection</a></code> |
href=#htmlformcontrolscollection-0>HTMLFormControlsCollection</a></code> |
| 89 |
interface represents a <a href="#collections0" |
interface represents a <a href=#collections-0 |
| 90 |
title=collections>collection</a> of form controls. |
title=collections>collection</a> of form controls. |
| 91 |
#ja |
#ja |
| 92 |
<code><a |
<code><a |
| 93 |
href="#htmlformcontrolscollection0">HTMLFormControlsCollection</a></code> |
href=#htmlformcontrolscollection-0>HTMLFormControlsCollection</a></code> |
| 94 |
界面はフォーム制御子の<a href="#collections0" |
界面はフォーム制御子の<a href=#collections-0 |
| 95 |
title=collections>集成</a>を表します。 |
title=collections>集成</a>を表します。 |
| 96 |
|
|
| 97 |
#en |
#en |
| 98 |
The <dfn id=length0 |
The <dfn id=dom-htmlformcontrolscollection-length |
| 99 |
title=dom-HTMLFormControlsCollection-length><code>length</code></dfn> |
title=dom-HTMLFormControlsCollection-length><code>length</code></dfn> |
| 100 |
attribute must return the number of nodes <a |
attribute must return the number of nodes <a |
| 101 |
href="#represents">represented by the collection</a>. |
href=#represented-by-the-collection>represented by the collection</a>. |
| 102 |
#ja |
#ja |
| 103 |
<dfn id=length0 |
<dfn id=dom-htmlformcontrolscollection-length |
| 104 |
title=dom-HTMLFormControlsCollection-length><code>length</code></dfn> |
title=dom-HTMLFormControlsCollection-length><code>length</code></dfn> |
| 105 |
属性は<a |
属性は<a |
| 106 |
href="#represents">集成が表現</a>する節点の数を返さなければ[[MUST:なりません]]。 |
href=#represented-by-the-collection>集成が表現</a>する節点の数を返さなければ[[MUST:なりません]]。 |
| 107 |
|
|
| 108 |
#en |
#en |
| 109 |
The <dfn id=itemindex0 |
The <dfn id=dom-htmlformcontrolscollection-item |
| 110 |
title=dom-HTMLFormControlsCollection-item><code>item(<var |
title=dom-HTMLFormControlsCollection-item><code>item(<var |
| 111 |
title="">index</var>)</code></dfn> method must return the <var |
title="">index</var>)</code></dfn> method must return the <var |
| 112 |
title="">index</var>th node in the collection. If there is no <var |
title="">index</var>th node in the collection. If there is no <var |
| 113 |
title="">index</var>th node in the collection, then the method must return |
title="">index</var>th node in the collection, then the method must return |
| 114 |
null. |
null. |
| 115 |
#ja |
#ja |
| 116 |
<dfn id=itemindex0 |
<dfn id=dom-htmlformcontrolscollection-item |
| 117 |
title=dom-HTMLFormControlsCollection-item><code>item(<var |
title=dom-HTMLFormControlsCollection-item><code>item(<var |
| 118 |
title="">index</var>)</code></dfn> メソッドは集成中の <var |
title="">index</var>)</code></dfn> メソッドは集成中の <var |
| 119 |
title="">index</var> 番目の節点を返さなければ[[MUST:なりません]]。集成中に |
title="">index</var> 番目の節点を返さなければ[[MUST:なりません]]。集成中に |
| 122 |
を返さなければなりません。 |
を返さなければなりません。 |
| 123 |
|
|
| 124 |
#en |
#en |
| 125 |
The <dfn id=nameditem0 |
The <dfn id=dom-htmlformcontrolscollection-nameditem |
| 126 |
title=dom-HTMLFormControlsCollection-namedItem><code>namedItem(<var |
title=dom-HTMLFormControlsCollection-namedItem><code>namedItem(<var |
| 127 |
title="">key</var>)</code></dfn> method must act according to the |
title="">key</var>)</code></dfn> method must act according to the |
| 128 |
following algorithm: |
following algorithm: |
| 129 |
#ja |
#ja |
| 130 |
<dfn id=nameditem0 |
<dfn id=dom-htmlformcontrolscollection-nameditem |
| 131 |
title=dom-HTMLFormControlsCollection-namedItem><code>namedItem(<var |
title=dom-HTMLFormControlsCollection-namedItem><code>namedItem(<var |
| 132 |
title="">key</var>)</code></dfn> メソッドは次の算法に従って動作しなければ[[MUST:なりません]]。 |
title="">key</var>)</code></dfn> メソッドは次の算法に従って動作しなければ[[MUST:なりません]]。 |
| 133 |
|
|
| 134 |
#en |
#en |
| 135 |
If, at the time the method is called, there is exactly one node in the |
If, at the time the method is called, there is exactly one node in the |
| 136 |
collection that has either an <code title=attr-id><a |
collection that has either an <code title=attr-id><a |
| 137 |
href="#id">id</a></code> attribute or a <code title=attr-name>name</code> |
href=#the-id-attribute>id</a></code> attribute or a <code title=attr-name>name</code> |
| 138 |
attribute equal to <var title="">key</var>, then return that node and |
attribute equal to <var title="">key</var>, then return that node and |
| 139 |
stop the algorithm. |
stop the algorithm. |
| 140 |
#ja |
#ja |
| 141 |
メソッド呼び出しの時点において、集成中に <code title=attr-id><a |
メソッド呼び出しの時点において、集成中に <code title=attr-id><a |
| 142 |
href="#id">id</a></code> 属性または <code title=attr-name>name</code> |
href=#the-id-attribute>id</a></code> 属性または <code title=attr-name>name</code> |
| 143 |
属性のいずれかが <var title="">key</var> と等しい節点が丁度1つ存在するなら、 |
属性のいずれかが <var title="">key</var> と等しい節点が丁度1つ存在するなら、 |
| 144 |
その節点を返し、算法を停止します。 |
その節点を返し、算法を停止します。 |
| 145 |
|
|
| 146 |
#en |
#en |
| 147 |
Otherwise, if there are no nodes in the collection that have either an |
Otherwise, if there are no nodes in the collection that have either an |
| 148 |
<code title=attr-id><a href="#id">id</a></code> attribute or a <code |
<code title=attr-id><a href=#the-id-attribute>id</a></code> attribute or a <code |
| 149 |
title=attr-name>name</code> attribute equal to <var title="">key</var>, |
title=attr-name>name</code> attribute equal to <var title="">key</var>, |
| 150 |
then return null and stop the algorithm. |
then return null and stop the algorithm. |
| 151 |
#ja |
#ja |
| 152 |
それ以外の場合で、集成中に <code title=attr-id><a href="#id">id</a></code> |
それ以外の場合で、集成中に <code title=attr-id><a href=#the-id-attribute>id</a></code> |
| 153 |
属性または <code |
属性または <code |
| 154 |
title=attr-name>name</code> 属性が <var title="">key</var> |
title=attr-name>name</code> 属性が <var title="">key</var> |
| 155 |
と等しい節点が存在しない場合は、 null を返し、算法を停止します。 |
と等しい節点が存在しない場合は、 null を返し、算法を停止します。 |
| 157 |
#en |
#en |
| 158 |
Otherwise, create a <code>NodeList</code> object representing a live |
Otherwise, create a <code>NodeList</code> object representing a live |
| 159 |
view of the <code><a |
view of the <code><a |
| 160 |
href="#htmlformcontrolscollection0">HTMLFormControlsCollection</a></code> |
href=#htmlformcontrolscollection-0>HTMLFormControlsCollection</a></code> |
| 161 |
|
|
| 162 |
object, further filtered so that the only nodes in the |
object, further filtered so that the only nodes in the |
| 163 |
<code>NodeList</code> object are those that have either an <code |
<code>NodeList</code> object are those that have either an <code |
| 164 |
title=attr-id><a href="#id">id</a></code> attribute or a <code |
title=attr-id><a href=#the-id-attribute>id</a></code> attribute or a <code |
| 165 |
title=attr-name>name</code> attribute equal to <var title="">key</var>. |
title=attr-name>name</code> attribute equal to <var title="">key</var>. |
| 166 |
The nodes in the <code>NodeList</code> object must be sorted in <a |
The nodes in the <code>NodeList</code> object must be sorted in <a |
| 167 |
href="#tree-order">tree order</a>. |
href=#tree-order>tree order</a>. |
| 168 |
#ja |
#ja |
| 169 |
それ以外の場合、その <code><a |
それ以外の場合、その <code><a |
| 170 |
href="#htmlformcontrolscollection0">HTMLFormControlsCollection</a></code> |
href=#htmlformcontrolscollection-0>HTMLFormControlsCollection</a></code> |
| 171 |
オブジェクトの生きた表示であって、 <code |
オブジェクトの生きた表示であって、 <code |
| 172 |
title=attr-id><a href="#id">id</a></code> 属性または <code |
title=attr-id><a href=#the-id-attribute>id</a></code> 属性または <code |
| 173 |
title=attr-name>name</code> 属性のいずれかが <var title="">key</var> |
title=attr-name>name</code> 属性のいずれかが <var title="">key</var> |
| 174 |
と等しい節点だけが含まれるような <code>NodeList</code> |
と等しい節点だけが含まれるような <code>NodeList</code> |
| 175 |
オブジェクトを作成します。この <code>NodeList</code> |
オブジェクトを作成します。この <code>NodeList</code> |
| 176 |
オブジェクトに含まれる節点は<a |
オブジェクトに含まれる節点は<a |
| 177 |
href="#tree-order">木順</a>で整列されていなければ[[MUST:なりません]]。 |
href=#tree-order>木順</a>で整列されていなければ[[MUST:なりません]]。 |
| 178 |
|
|
| 179 |
#en |
#en |
| 180 |
Return that <code>NodeList</code> object. |
Return that <code>NodeList</code> object. |
| 186 |
Starting with the character immediately after the last one examined by |
Starting with the character immediately after the last one examined by |
| 187 |
the sub-algorithm in step 9, skip any characters in the string that are |
the sub-algorithm in step 9, skip any characters in the string that are |
| 188 |
in the Unicode character class Zs (this might match zero characters). <a |
in the Unicode character class Zs (this might match zero characters). <a |
| 189 |
href="#refsUNICODE">[UNICODE]</a> |
href=#refsUNICODE>[UNICODE]</a> |
| 190 |
#ja |
#ja |
| 191 |
段階 9 の部分算法で調べた最後の文字の直後の文字からはじめて、 |
段階 9 の部分算法で調べた最後の文字の直後の文字からはじめて、 |
| 192 |
文字列中の Unicode 文字クラス Zs の文字をすべて (該当するのは零文字かもしれませんが) |
文字列中の Unicode 文字クラス Zs の文字をすべて (該当するのは零文字かもしれませんが) |