[html5] r2159 - [] (0) WF2: Define form.elements and related features.

whatwg at whatwg.org whatwg at whatwg.org
Sun Sep 7 14:25:42 PDT 2008


Author: ianh
Date: 2008-09-07 14:25:41 -0700 (Sun, 07 Sep 2008)
New Revision: 2159

Modified:
   index
   source
Log:
[] (0) WF2: Define form.elements and related features.

Modified: index
===================================================================
--- index	2008-09-07 11:26:45 UTC (rev 2158)
+++ index	2008-09-07 21:25:41 UTC (rev 2159)
@@ -26542,10 +26542,10 @@
            attribute DOMString <span title=dom-form-name>name</span>;
            attribute DOMString <span title=dom-form-target>target</span>;
 
-  readonly attribute <a href="#htmlformcontrolscollection0">HTMLFormControlsCollection</a> <span title=dom-form-elements>elements</span>;
-  readonly attribute long <span title=dom-form-length>length</span>;
-  [IndexGetter] <a href="#htmlelement">HTMLElement</a> <span title=dom-form-XXX7>XXX7</span>(in unsigned long index);
-  [NameGetter] Object <span title=dom-form-XXX8>XXX8</span>(in DOMString name);
+  readonly attribute <a href="#htmlformcontrolscollection0">HTMLFormControlsCollection</a> <a href="#elements3" title=dom-form-elements>elements</a>;
+  readonly attribute long <a href="#length6" title=dom-form-length>length</a>;
+  [IndexGetter] <a href="#htmlelement">HTMLElement</a> <a href="#xxx7" title=dom-form-XXX7>XXX7</a>(in unsigned long index);
+  [NameGetter] Object <a href="#xxx8" title=dom-form-XXX8>XXX8</a>(in DOMString name);
 
   void <span title=dom-form-submit>submit</span>();
   void <span title=dom-form-reset>reset</span>();
@@ -26558,6 +26558,46 @@
 
   <p class=big-issue>...
 
+  <p>The <dfn id=elements3
+   title=dom-form-elements><code>elements</code></dfn> DOM attribute must
+   return an <code><a
+   href="#htmlformcontrolscollection0">HTMLFormControlsCollection</a></code>
+   rooted at the <code>Document</code> node, whose filter matches <code><a
+   href="#input0">input</a></code>, <code><a
+   href="#output">output</a></code>, <code><a
+   href="#select">select</a></code>, <code><a
+   href="#textarea">textarea</a></code>, <code><a
+   href="#button">button</a></code>, and <code><a
+   href="#fieldset">fieldset</a></code> elements whose <a
+   href="#form-owner">form owner</a> is the <code><a
+   href="#form">form</a></code> element, with the exception of <code><a
+   href="#input0">input</a></code> elements whose <code
+   title=attr-input-type>type</code> attribute is in the <span>Image
+   Button</span> state.
+
+  <p>The <dfn id=length6 title=dom-form-length><code>length</code></dfn> DOM
+   attribute must return the number of nodes <a href="#represents"
+   title="represented by the collection">represented</a> by the <code
+   title=dom-form-elements><a href="#elements3">elements</a></code>
+   collection.</p>
+  <!-- XXX7 and XXX8: in IE these are called item and namedItem, but
+  they have deep magic involved to resolve name clashes with form
+  controls of those names. In other browsers, they are anonymous. -->
+
+  <p>The <dfn id=xxx7 title=dom-form-XXX7><code>XXX7()</code></dfn> method
+   must return the value that would be returned by the <code
+   title=dom-HTMLFormControlsCollection-item><a
+   href="#itemindex0">item()</a></code> method of the <code
+   title=dom-form-elements><a href="#elements3">elements</a></code>
+   collection if it was invoked with the same arguments.
+
+  <p>The <dfn id=xxx8 title=dom-form-XXX8><code>XXX8()</code></dfn> method
+   must return the value that would be returned by the <code
+   title=dom-HTMLFormControlsCollection-namedItem><a
+   href="#nameditem0">namedItem()</a></code> method of the <code
+   title=dom-form-elements><a href="#elements3">elements</a></code>
+   collection if it was invoked with the same arguments.
+
   <h4 id=the-fieldset><span class=secno>4.9.2 </span>The <dfn
    id=fieldset><code>fieldset</code></dfn> element</h4>
 
@@ -30197,7 +30237,7 @@
    depth, which would then require the selection to be infinite if every row,
    including every hidden row, was selected.
 
-  <p>The <dfn id=length6
+  <p>The <dfn id=length7
    title=dom-DataGridSelection-length><code>length</code></dfn> attribute
    must return the number of rows currently present in the selection. The
    <dfn id=itemindex3 title=dom-DataGridSelection-item><code>item(<var
@@ -30228,7 +30268,7 @@
    method must mark all the rows in the data grid as selected. After a call
    to <code title=dom-DataGridSelection-selectAll><a
    href="#selectall">selectAll()</a></code>, the <code
-   title=dom-DataGridSelection-length><a href="#length6">length</a></code>
+   title=dom-DataGridSelection-length><a href="#length7">length</a></code>
    attribute will return the number of rows in the data grid, not counting
    children of closed rows.
 
@@ -30242,7 +30282,7 @@
    mark all the rows in the data grid to be marked as not selected. After a
    call to <code title=dom-DataGridSelection-clear><a
    href="#clear">clear()</a></code>, the <code
-   title=dom-DataGridSelection-length><a href="#length6">length</a></code>
+   title=dom-DataGridSelection-length><a href="#length7">length</a></code>
    attribute will return zero.
 
   <p>If the <code><a href="#datagrid0">datagrid</a></code> element has a <dfn
@@ -33085,7 +33125,7 @@
 
   // other browsing contexts
   readonly attribute <a href="#window">Window</a> <a href="#frames" title=dom-frames>frames</a>;
-  readonly attribute unsigned long <a href="#length7" title=dom-length>length</a>;
+  readonly attribute unsigned long <a href="#length8" title=dom-length>length</a>;
   [IndexGetter] <a href="#window">Window</a> <a href="#xxx4index" title=dom-XXX4>XXX4</a>(in unsigned long index); <!-- XXX DOMB -->
   readonly attribute <a href="#window">Window</a> <a href="#top0" title=dom-top>top</a>;
   readonly attribute <a href="#window">Window</a> <a href="#opener0" title=dom-opener>opener</a>;
@@ -33293,7 +33333,7 @@
   <h4 id=accessing><span class=secno>5.2.3 </span>Accessing other browsing
    contexts</h4>
 
-  <p>The <dfn id=length7 title=dom-length><code>length</code></dfn> DOM
+  <p>The <dfn id=length8 title=dom-length><code>length</code></dfn> DOM
    attribute on the <code><a href="#window">Window</a></code> interface must
    return the number of <a href="#child" title="child browsing context">child
    browsing contexts</a> of the <a href="#active" title="active
@@ -36610,7 +36650,7 @@
   void <a href="#swapcache" title=dom-appcache-swapCache>swapCache</a>();
 
   // dynamic entries
-  readonly attribute unsigned long <a href="#length8" title=dom-appcache-length>length</a>;
+  readonly attribute unsigned long <a href="#length9" title=dom-appcache-length>length</a>;
   DOMString <a href="#itemindex4" title=dom-appcache-item>item</a>(in unsigned long index);
   void <a href="#addurl" title=dom-appcache-add>add</a>(in DOMString url);
   void <a href="#remove2" title=dom-appcache-remove>remove</a>(in DOMString url);
@@ -36712,7 +36752,7 @@
      title=concept-appcache-manifest>manifest</a>.
   </dl>
 
-  <p>The <dfn id=length8 title=dom-appcache-length><code>length</code></dfn>
+  <p>The <dfn id=length9 title=dom-appcache-length><code>length</code></dfn>
    attribute must return the number of <a href="#dynamic4"
    title=concept-appcache-dynamic>dynamic entries</a> in the <a
    href="#application0">application cache</a> with which the <code><a
@@ -36726,7 +36766,7 @@
    title=dom-appcache-add><a href="#addurl">add()</a></code> method, with the
    oldest entry being the zeroth entry, and the most recently added entry
    having the index <span><code title=dom-appcache-length><a
-   href="#length8">length</a></code>-1</span>.
+   href="#length9">length</a></code>-1</span>.
 
   <p>The <dfn id=itemindex4 title=dom-appcache-item><code>item(<var
    title="">index</var>)</code></dfn> method must return the <a
@@ -36738,7 +36778,7 @@
    is not associated with any application cache, or if the <var
    title="">index</var> argument is lower than zero or greater than
    <span><code title=dom-appcache-length><a
-   href="#length8">length</a></code>-1</span>, the method must instead raise
+   href="#length9">length</a></code>-1</span>, the method must instead raise
    an <code>INDEX_SIZE_ERR</code> exception.
 
   <p>The <dfn id=addurl title=dom-appcache-add><code>add(<var
@@ -37079,7 +37119,7 @@
    href="#history3">History</a></code> interface</h4>
 
   <pre class=idl>interface <dfn id=history3>History</dfn> {
-  readonly attribute long <a href="#length9" title=dom-history-length>length</a>;
+  readonly attribute long <a href="#length10" title=dom-history-length>length</a>;
   void <a href="#godelta" title=dom-history-go>go</a>(in long delta);
   void <a href="#go" title=dom-history-go-0>go</a>();
   void <a href="#back" title=dom-history-back>back</a>();
@@ -37089,7 +37129,7 @@
   void <a href="#clearstate" title=dom-history-clearState>clearState</a>();
 };</pre>
 
-  <p>The <dfn id=length9 title=dom-history-length><code>length</code></dfn>
+  <p>The <dfn id=length10 title=dom-history-length><code>length</code></dfn>
    attribute of the <code><a href="#history3">History</a></code> interface
    must return the number of entries in this <a href="#session">session
    history</a>.
@@ -37102,7 +37142,7 @@
 
   <p>If the index of the <a href="#current1">current entry</a> plus <var
    title="">delta</var> is less than zero or greater than or equal to the <a
-   href="#length9" title=dom-history-length>number of items in the session
+   href="#length10" title=dom-history-length>number of items in the session
    history</a>, then the user agent must do nothing.
 
   <p>If the <var title="">delta</var> is zero, then the user agent must act
@@ -38381,7 +38421,7 @@
   something? -->
 
   <pre class=idl>interface <dfn id=storage0>Storage</dfn> {
-  readonly attribute unsigned long <a href="#length10" title=dom-Storage-length>length</a>;
+  readonly attribute unsigned long <a href="#length11" title=dom-Storage-length>length</a>;
   [IndexGetter] DOMString <a href="#keyn" title=dom-Storage-key>key</a>(in unsigned long index);
   [NameGetter] DOMString <a href="#getitem" title=dom-Storage-getItem>getItem</a>(in DOMString key);
   [NameSetter] void <a href="#setitem" title=dom-Storage-setItem>setItem</a>(in DOMString key, in DOMString data);
@@ -38414,7 +38454,7 @@
    href="#storage0">Storage</a></code> interface can all be associated with
    the same list of key/value pairs simultaneously.
 
-  <p>The <dfn id=length10 title=dom-Storage-length><code>length</code></dfn>
+  <p>The <dfn id=length11 title=dom-Storage-length><code>length</code></dfn>
    attribute must return the number of key/value pairs currently present in
    the list associated with the object.
 
@@ -38702,7 +38742,7 @@
    detect any concurrent script execution.
 
   <p>This is required to guarantee that the <code title=dom-Storage-length><a
-   href="#length10">length</a></code> attribute of a <code><a
+   href="#length11">length</a></code> attribute of a <code><a
    href="#storage0">Storage</a></code> object never changes while a script is
    executing, other than in a way that is predictable by the script itself.
 
@@ -39021,17 +39061,17 @@
    href="#sqlresultsetrowlist">SQLResultSetRowList</a></code> representing
    the rows returned, in the order returned by the database. If no rows were
    returned, then the object will be empty (its <code
-   title=dom-SQLResultSetRowList-length><a href="#length11">length</a></code>
+   title=dom-SQLResultSetRowList-length><a href="#length12">length</a></code>
    will be zero).
 
   <pre
    class=idl>interface <dfn id=sqlresultsetrowlist>SQLResultSetRowList</dfn> {
-  readonly attribute unsigned long <a href="#length11" title=dom-SQLResultSetRowList-length>length</a>;
+  readonly attribute unsigned long <a href="#length12" title=dom-SQLResultSetRowList-length>length</a>;
   [IndexGetter] <span>DOMObject</span> <a href="#itemindex5" title=dom-SQLResultSetRowList-item>item</a>(in unsigned long index);
 };</pre>
 
   <p><code><a href="#sqlresultsetrowlist">SQLResultSetRowList</a></code>
-   objects have a <dfn id=length11
+   objects have a <dfn id=length12
    title=dom-SQLResultSetRowList-length><code>length</code></dfn> attribute
    that must return the number of rows it represents (the number of rows
    returned by the database).
@@ -43108,7 +43148,7 @@
   void <a href="#clearundo" title=dom-UndoManager-clearUndo>clearUndo</a>();
   void <a href="#clearredo" title=dom-UndoManager-clearRedo>clearRedo</a>();
   [IndexGetter] DOMObject <a href="#itemn" title=dom-UndoManager-item>item</a>(in unsigned long index);
-  readonly attribute unsigned long <a href="#length12" title=dom-UndoManager-length>length</a>;
+  readonly attribute unsigned long <a href="#length13" title=dom-UndoManager-length>length</a>;
   readonly attribute unsigned long <a href="#position0" title=dom-UndoManager-position>position</a>;
 };</pre>
 
@@ -43126,7 +43166,7 @@
    entries are absent from the <a href="#undo-transaction">undo transaction
    history</a>.
 
-  <p>The <dfn id=length12
+  <p>The <dfn id=length13
    title=dom-UndoManager-length><code>length</code></dfn> attribute must
    return the number of <a href="#undo-object">undo object</a> entries in the
    <a href="#undo-transaction">undo transaction history</a>.
@@ -43150,7 +43190,7 @@
    nearest to the <a href="#current4">undo position</a>, on the "redo" side.
    If there are no <a href="#undo-object">undo object</a> entries on the
    "redo" side, then the attribute must return the same as the <code
-   title=dom-UndoManager-length><a href="#length12">length</a></code>
+   title=dom-UndoManager-length><a href="#length13">length</a></code>
    attribute. If there are no <a href="#undo-object">undo object</a> entries
    on the "undo" side of the <a href="#current4">undo position</a>, the <code
    title=dom-UndoManager-position><a href="#position0">position</a></code>
@@ -43197,7 +43237,7 @@
    href="#undo-object">undo object</a> entry with the specified <var
    title="">index</var>. If the index is less than zero or greater than or
    equal to <code title=dom-UndoManager-length><a
-   href="#length12">length</a></code> then the method must raise an
+   href="#length13">length</a></code> then the method must raise an
    <code>INDEX_SIZE_ERR</code> exception. <a href="#dom-changes">DOM
    changes</a> entries are unaffected by this method.
 
@@ -46058,7 +46098,7 @@
     and <a href="#space" title="space character">space characters</a>.
 
    <li>The root element, in the form of an <code><a
-    href="#html">html</a></code> <a href="#elements3"
+    href="#html">html</a></code> <a href="#elements4"
     title=syntax-elements>element</a>.
 
    <li>Any number of <a href="#comments0" title=syntax-comments>comments</a>
@@ -46210,7 +46250,7 @@
 
   <h4 id=elements1><span class=secno>8.1.2 </span>Elements</h4>
 
-  <p>There are five different kinds of <dfn id=elements3
+  <p>There are five different kinds of <dfn id=elements4
    title=syntax-elements>elements</dfn>: void elements, CDATA elements,
    RCDATA elements, foreign elements, and normal elements.
 
@@ -46298,7 +46338,7 @@
    is <em>not</em> marked as self-closing can have <a href="#text2"
    title=syntax-text>text</a>, <a href="#character5"
    title=syntax-charref>character references</a>, <a href="#cdata1"
-   title=syntax-cdata>CDATA sections</a>, other <a href="#elements3"
+   title=syntax-cdata>CDATA sections</a>, other <a href="#elements4"
    title=syntax-elements>elements</a>, and <a href="#comments0"
    title=syntax-comments>comments</a>, but the text must not contain the
    character U+003C LESS-THAN SIGN (<code><</code>) or an <a
@@ -46307,7 +46347,7 @@
 
   <p>Normal elements can have <a href="#text2" title=syntax-text>text</a>, <a
    href="#character5" title=syntax-charref>character references</a>, other <a
-   href="#elements3" title=syntax-elements>elements</a>, and <a
+   href="#elements4" title=syntax-elements>elements</a>, and <a
    href="#comments0" title=syntax-comments>comments</a>, but the text must
    not contain the character U+003C LESS-THAN SIGN (<code><</code>) or an
    <a href="#ambiguous" title=syntax-ambiguous-ampersand>ambiguous

Modified: source
===================================================================
--- source	2008-09-07 11:26:45 UTC (rev 2158)
+++ source	2008-09-07 21:25:41 UTC (rev 2159)
@@ -23929,7 +23929,38 @@
 
   <p class="big-issue">...</p>
 
+  <p>The <dfn title="dom-form-elements"><code>elements</code></dfn>
+  DOM attribute must return an <code>HTMLFormControlsCollection</code>
+  rooted at the <code>Document</code> node, whose filter matches
+  <code>input</code>, <code>output</code>, <code>select</code>,
+  <code>textarea</code>, <code>button</code>, and
+  <code>fieldset</code> elements whose <span>form owner</span> is the
+  <code>form</code> element, with the exception of <code>input</code>
+  elements whose <code title="attr-input-type">type</code> attribute
+  is in the <span>Image Button</span> state.</p>
 
+  <p>The <dfn title="dom-form-length"><code>length</code></dfn> DOM
+  attribute must return the number of nodes <span title="represented
+  by the collection">represented</span> by the <code
+  title="dom-form-elements">elements</code> collection.</p>
+
+  <!-- XXX7 and XXX8: in IE these are called item and namedItem, but
+  they have deep magic involved to resolve name clashes with form
+  controls of those names. In other browsers, they are anonymous. -->
+
+  <p>The <dfn title="dom-form-XXX7"><code>XXX7()</code></dfn> method
+  must return the value that would be returned by the <code
+  title="dom-HTMLFormControlsCollection-item">item()</code> method of
+  the <code title="dom-form-elements">elements</code> collection if it
+  was invoked with the same arguments.</p>
+
+  <p>The <dfn title="dom-form-XXX8"><code>XXX8()</code></dfn> method
+  must return the value that would be returned by the <code
+  title="dom-HTMLFormControlsCollection-namedItem">namedItem()</code>
+  method of the <code title="dom-form-elements">elements</code>
+  collection if it was invoked with the same arguments.</p>
+
+
   <h4>The <dfn><code>fieldset</code></dfn> element</h4>
 
   <dl class="element">




More information about the Commit-Watchers mailing list