html5/spec Overview.html,1.2142,1.2143

Update of /sources/public/html5/spec
In directory hutz:/tmp/cvs-serv31420

Modified Files:
	Overview.html 
Log Message:
Make it possible to do document.forms.f.r.value = 'b' to check the second radio button in <form name=f><input type=radio name=r value=a><input type=radio name=r value=b></form> (whatwg r2979)

Index: Overview.html
===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.2142
retrieving revision 1.2143
diff -u -d -r1.2142 -r1.2143
--- Overview.html	24 Apr 2009 06:48:23 -0000	1.2142
+++ Overview.html	25 Apr 2009 01:31:51 -0000	1.2143
@@ -148,7 +148,7 @@
    <h2 class="no-num no-toc" id="a-vocabulary-and-associated-apis-for-html-and-xhtml">A vocabulary and associated APIs for HTML and XHTML</h2>
    <!--ZZZ:-->
    <!--<h2 class="no-num no-toc">W3C Working Draft 23 April 2009</h2>-->
-   <h2 class="no-num no-toc" id="editor-s-draft-date-1-january-1970">Editor's Draft 24 April 2009</h2>
+   <h2 class="no-num no-toc" id="editor-s-draft-date-1-january-1970">Editor's Draft 25 April 2009</h2>
    <!--:ZZZ-->
    <dl><!-- ZZZ: update the month/day (twice), (un)comment out
     <dt>This Version:</dt>
@@ -241,7 +241,7 @@
   track.
   <!--ZZZ:-->
   <!--This specification is the 23 April 2009 Working Draft.-->
-  This specification is the 24 April 2009 Editor's Draft.
+  This specification is the 25 April 2009 Editor's Draft.
   <!--:ZZZ-->
   </p><!-- UNDER NO CIRCUMSTANCES IS THE PRECEDING PARAGRAPH TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST --><!-- relationship to other work (required) --><p>This specification is also being produced by the <a href="http://www.whatwg.org/">WHATWG</a>. The two specifications are
   identical from the table of contents onwards.</p><!-- UNDER NO CIRCUMSTANCES IS THE FOLLOWING PARAGRAPH TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST --><!-- UNDER NO CIRCUMSTANCES IS THE PRECEDING PARAGRAPH TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST --><!-- context and rationale (required) --><p>This specification is intended to replace (be a new version of)
@@ -5509,6 +5509,10 @@
   readonly attribute unsigned long <a href="#dom-htmlformcontrolscollection-length" title="dom-HTMLFormControlsCollection-length">length</a>;
   [IndexGetter] <a href="#htmlelement">HTMLElement</a> <a href="#dom-htmlformcontrolscollection-item" title="dom-HTMLFormControlsCollection-item">item</a>(in unsigned long index);
   [NameGetter] Object <a href="#dom-htmlformcontrolscollection-nameditem" title="dom-HTMLFormControlsCollection-namedItem">namedItem</a>(in DOMString name);
+};
+
+interface <dfn id="radionodelist">RadioNodeList</dfn> : <span>NodeList</span> {
+          attribute DOMString <a href="#dom-radionodelist-value" title="dom-RadioNodeList-value">value</a>;
 };</pre><dl class="domintro"><dt><var title="">collection</var> . <code title="dom-HTMLFormControlsCollection-length"><a href="#dom-htmlformcontrolscollection-length">length</a></code></dt>
    <dd>
     <p>Returns the number of elements in the collection.</p>
@@ -5522,13 +5526,26 @@
    </dd>
 
    <dt><var title="">element</var> = <var title="">collection</var> . <code title="dom-HTMLFormControlsCollection-item"><a href="#dom-htmlformcontrolscollection-item">namedItem</a></code>(<var title="">name</var>)</dt>
+   <dt><var title="">radioNodeList</var> = <var title="">collection</var> . <code title="dom-HTMLFormControlsCollection-item"><a href="#dom-htmlformcontrolscollection-item">namedItem</a></code>(<var title="">name</var>)</dt>
    <dt><var title="">collection</var>[<var title="">name</var>]</dt>
    <dd>
     <p>Returns the item with ID or <code title="attr-fe-name"><a href="#attr-fe-name">name</a></code> <var title="">name</var> from the collection.</p>
-    <p>If there are multiple matching items, then a <code>NodeList</code> object containing all those elements is returned.</p>
+    <p>If there are multiple matching items, then a <code><a href="#radionodelist">RadioNodeList</a></code> object containing all those elements is returned.</p>
     <p>Returns null if no element with that ID or <code title="attr-fe-name"><a href="#attr-fe-name">name</a></code> could be found.</p>
    </dd>
 
+   <dt><var title="">radioNodeList</var> . <var title="">value</var> [ = <var title="">value</var> ]</dt>
+
+   <dd>
+
+    <p>Returns the value of the first checked radio button represented
+    by the object.</p>
+
+    <p>Can be set, to check the first radio button with the given
+    value represented by the object.</p>
+
+   </dd>
+
   </dl><div class="impl">
 
   <hr><p>The object's <span>indices of the supported indexed
@@ -5558,14 +5575,53 @@
    <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="">name</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
-   <code>NodeList</code> object are those 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="">name</var>. The nodes in the <code>NodeList</code> object
-   must be sorted in <a href="#tree-order">tree order</a>.</li>
+   <li>Otherwise, create a <code><a href="#radionodelist">RadioNodeList</a></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 <code><a href="#radionodelist">RadioNodeList</a></code> object are
+   those 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="">name</var>. The nodes in the <code><a href="#radionodelist">RadioNodeList</a></code>
+   object must be sorted in <a href="#tree-order">tree order</a>.</li>
 
-   <li>Return that <code>NodeList</code> object.</li>
+   <li>Return that <code><a href="#radionodelist">RadioNodeList</a></code> object.</li>
+
+  </ol><hr><p>A members of the <code><a href="#radionodelist">RadioNodeList</a></code> interface inherited
+  from the <code>NodeList</code> interface must behave as they would
+  on a <code>NodeList</code> object.</p>
+
+  <p>The <dfn id="dom-radionodelist-value" title="dom-RadioNodeList-value"><code>value</code></dfn>
+  DOM attribute on the <code><a href="#radionodelist">RadioNodeList</a></code> object, on getting,
+  must return the value returned by running the following steps:</p>
+
+  <ol><li><p>Let <var title="">element</var> be the first element in
+   <a href="#tree-order">tree order</a> represented by the
+   <code><a href="#radionodelist">RadioNodeList</a></code> object that is an <code><a href="#the-input-element">input</a></code>
+   element whose <code title="attr-input-type"><a href="#attr-input-type">type</a></code> attribute
+   is in the <a href="#radio-button-state" title="attr-input-type-radio">Radio Button</a>
+   state and whose <a href="#concept-fe-checked" title="concept-fe-checked">checkedness</a>
+   is true. Otherwise, let it be null.</li>
+
+   <li><p>If <var title="">element</var> is null, or if it is an
+   element with no <code title="attr-input-value"><a href="#attr-input-value">value</a></code>
+   attribute, return the empty string.</li>
+
+   <li><p>Otherwise, return the value of <var title="">element</var>'s
+   <code title="attr-input-value"><a href="#attr-input-value">value</a></code> attribute.</li>
+
+  </ol><p>On setting, the <code title="dom-RadioNodeList-value"><a href="#dom-radionodelist-value">value</a></code> DOM attribute must run
+  the following steps:</p>
+
+  <ol><li><p>Let <var title="">element</var> be the first element in
+   <a href="#tree-order">tree order</a> represented by the
+   <code><a href="#radionodelist">RadioNodeList</a></code> object that is an <code><a href="#the-input-element">input</a></code>
+   element whose <code title="attr-input-type"><a href="#attr-input-type">type</a></code> attribute
+   is in the <a href="#radio-button-state" title="attr-input-type-radio">Radio Button</a>
+   state and whose <code title="attr-input-value"><a href="#attr-input-value">value</a></code> content
+   attribute is present and equal to the new value, if any. Otherwise,
+   let it be null.</li>
+
+   <li><p>If <var title="">element</var> is not null, then set its
+   <a href="#concept-fe-checked" title="concept-fe-checked">checkedness</a> to true.</p>
 
   </ol><!--
 http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20html%3E...%0A%3Cform%20name%3D%22a%22%3E%3Cinput%20id%3D%22x%22%20name%3D%22y%22%3E%3Cinput%20name%3D%22x%22%20id%3D%22y%22%3E%3C/form%3E%0A%3Cscript%3E%0A%20%20var%20x%3B%0A%20%20w%28x%20%3D%20document.forms%5B%27a%27%5D%5B%27x%27%5D%29%3B%0A%20%20w%28x.length%29%3B%0A%20%20x%5B0%5D.parentNode.removeChild%28x%5B0%5D%29%3B%0A%20%20w%28x.length%29%3B%0A%20%20w%28x%20%3D%3D%20document.forms%5B%27a%27%5D%5B%27x%27%5D%29%3B%0A%3C/script%3E%0A

Received on Saturday, 25 April 2009 01:32:08 UTC