W3C home > Mailing lists > Public > public-html-diffs@w3.org > January 2009

spec/Overview.html 1.1825 2655 Revamp how <form> handles enumeration, f

From: poot <cvsmail@w3.org>
Date: Tue, 13 Jan 2009 20:28:56 +0900 (JST)
To: public-html-diffs@w3.org
Message-Id: <20090113112856.7DBB12BC6E@toro.w3.mag.keio.ac.jp>

Revamp how <form> handles enumeration, for better compatibility with
WebIDL and IE. (whatwg r2655)

submit()
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1825.html#dom-form-submit
item(index)
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1825.html#dom-form-item
length
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1825.html#dom-form-length
namedItem(key)
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1825.html#dom-htmloptionscollection-nameditem
HTMLFormElement
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1825.html#htmlformelement
reset()
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1825.html#dom-form-reset
namedItem(key)
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1825.html#dom-htmlformcontrolscollection-nameditem
namedItem(index)
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1825.html#dom-form-nameditem
4.10.1 The form element
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1825.html#the-form-element

http://people.w3.org/mike/diffs/html5/spec/Overview.diff.html
http://dev.w3.org/cvsweb/html5/spec/Overview.html?r1=1.1824&r2=1.1825&f=h
http://html5.org/tools/web-apps-tracker?from=2654&to=2655

===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.1824
retrieving revision 1.1825
diff -u -d -r1.1824 -r1.1825
--- Overview.html	13 Jan 2009 10:57:10 -0000	1.1824
+++ Overview.html	13 Jan 2009 11:26:12 -0000	1.1825
@@ -4510,6 +4510,7 @@
    <li>Otherwise, if there are no nodes in the collection that have
    either an <code title=attr-id><a href=#the-id-attribute>id</a></code> attribute or a <code title=attr-fe-name><a href=#attr-fe-name>name</a></code> attribute equal to <var title="">key</var>, then return null and stop the algorithm.</li>
 
+   <!-- XXX should we return an HTMLCollection instead, like IE? -->
    <li>Otherwise, create a <code>NodeList</code> object representing a
    live view of the <code><a href=#htmlformcontrolscollection-0>HTMLFormControlsCollection</a></code> object,
    further filtered so that the only nodes in the
@@ -4558,6 +4559,7 @@
    <li>Otherwise, if there are no nodes in the collection that have
    either an <code title=attr-id><a href=#the-id-attribute>id</a></code> attribute or a <code title=attr-option-name>name</code> attribute equal to <var title="">key</var>, then return null and stop the algorithm.</li>
 
+   <!-- XXX should we return an HTMLCollection instead, like IE? -->
    <li>Otherwise, create a <code>NodeList</code> object representing a
    live view of the <code><a href=#htmloptionscollection-0>HTMLOptionsCollection</a></code> object, further
    filtered so that the only nodes in the <code>NodeList</code> object
@@ -19360,10 +19362,7 @@
    <dd><code title=attr-fs-target><a href=#attr-fs-target>target</a></code></dd>
    <dt>DOM interface:</dt>
    <dd>
-<pre class=idl>[NameGetter, IndexGetter]<!--
-XXX add Callable=namedItem; add namedItem (IE compat); maybe make form.elements === form? matters in cases like: form.elements.x.x:
-http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%0D%0A%3Cform%20name%3Da%3E%3Cinput%20name%3Db%3E%3Cinput%20name%3Db%3E%3C%2Fform%3E%3Cscript%20id%3Da%3Ew(document.forms('a').elements('b')('b'))%3C%2Fscript%3E
--->
+<pre class=idl>[Callable=<a href=#dom-form-nameditem title=dom-form-namedItem>namedItem</a>]
 interface <dfn id=htmlformelement>HTMLFormElement</dfn> : <a href=#htmlelement>HTMLElement</a> {
            attribute DOMString <a href=#dom-form-accept-charset title=dom-form-accept-charset>accept-charset</a>;
            attribute DOMString <a href=#dom-fs-action title=dom-fs-action>action</a>;
@@ -19375,6 +19374,8 @@
 
   readonly attribute <a href=#htmlformcontrolscollection-0>HTMLFormControlsCollection</a> <a href=#dom-form-elements title=dom-form-elements>elements</a>;
   readonly attribute long <a href=#dom-form-length title=dom-form-length>length</a>;
+  [IndexGetter] any <a href=#dom-form-item title=dom-form-item>item</a>(in DOMString name);
+  [NameGetter=OverrideBuiltins] any <a href=#dom-form-nameditem title=dom-form-namedItem>namedItem</a>(in DOMString name);
 
   void <a href=#dom-form-submit title=dom-form-submit>submit</a>();
   void <a href=#dom-form-reset title=dom-form-reset>reset</a>();
@@ -19411,15 +19412,14 @@
   <span>indices of the supported indexed properties</span> at any
   instant are the indicies supported by the object returned by the
   <code title=dom-form-elements><a href=#dom-form-elements>elements</a></code> attribute at that
-  instant. The value of the <span>corresponding indexed
-  property</span> whenever an indexed property is retrieved is the
-  value of the <span>corresponding indexed property</span> on the
-  object returned by the <code title=dom-form-elements><a href=#dom-form-elements>elements</a></code> attribute. The <span>names
+  instant. The <span>names
   of the supported named properties</span> at any instant are the
   names supported by the object returned by the <code title=dom-form-elements><a href=#dom-form-elements>elements</a></code> attribute at that
-  instant. The value of a property with a name <var title="">name</var> at any instant is the property with the same
-  name on the object returned by the <code title=dom-form-elements><a href=#dom-form-elements>elements</a></code> attribute at the same
-  instant.<p>The <dfn id=dom-form-submit title=dom-form-submit><code>submit()</code></dfn>
+  instant.<p>The <dfn id=dom-form-item title=dom-form-item><code>item(<var title="">index</var>)</code></dfn> method must return the value
+  returned by the method of the same name on the <code title=dom-form-elements><a href=#dom-form-elements>elements</a></code> collection, when invoked
+  with the same argument.<p>The <dfn id=dom-form-nameditem title=dom-form-namedItem><code>namedItem(<var title="">index</var>)</code></dfn> method must return the value
+  returned by the method of the same name on the <code title=dom-form-elements><a href=#dom-form-elements>elements</a></code> collection, when invoked
+  with the same argument.<p>The <dfn id=dom-form-submit title=dom-form-submit><code>submit()</code></dfn>
   method, when invoked, must <a href=#concept-form-submit title=concept-form-submit>submit</a> the <code><a href=#the-form-element>form</a></code>
   element from the <code><a href=#the-form-element>form</a></code> element itself.<p>The <dfn id=dom-form-reset title=dom-form-reset><code>reset()</code></dfn>
   method, when invoked, must <a href=#concept-form-reset title=concept-form-reset>reset</a> the <code><a href=#the-form-element>form</a></code>
Received on Tuesday, 13 January 2009 11:29:32 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 18 December 2010 06:13:57 GMT