html5/spec Overview.html,1.2058,1.2059

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

Modified Files:
	Overview.html 
Log Message:
Support select.add(e) and select.options.add(e) with no second argument. (credit: cm) (whatwg r2889)

Index: Overview.html
===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.2058
retrieving revision 1.2059
diff -u -d -r1.2058 -r1.2059
--- Overview.html	20 Mar 2009 22:13:11 -0000	1.2058
+++ Overview.html	20 Mar 2009 23:04:15 -0000	1.2059
@@ -5534,7 +5534,7 @@
            attribute unsigned long <a href=#dom-htmloptionscollection-length title=dom-HTMLOptionsCollection-length>length</a>;
   [IndexGetter] <a href=#htmloptionelement>HTMLOptionElement</a> <a href=#dom-htmloptionscollection-item title=dom-HTMLOptionsCollection-item>item</a>(in unsigned long index);
   [NameGetter] Object <a href=#dom-htmloptionscollection-nameditem title=dom-HTMLOptionsCollection-namedItem>namedItem</a>(in DOMString name);
-  void <a href=#dom-htmloptionscollection-add title=dom-HTMLOptionsCollection-add>add</a>(in <a href=#htmlelement>HTMLElement</a> element, in <a href=#htmlelement>HTMLElement</a> before);
+  void <a href=#dom-htmloptionscollection-add title=dom-HTMLOptionsCollection-add>add</a>(in <a href=#htmlelement>HTMLElement</a> element, [Optional] in <a href=#htmlelement>HTMLElement</a> before);
   void <a href=#dom-htmloptionscollection-add title=dom-HTMLOptionsCollection-add>add</a>(in <a href=#htmlelement>HTMLElement</a> element, in long before);
   void <a href=#dom-htmloptionscollection-remove title=dom-HTMLOptionsCollection-remove>remove</a>(in long index);
 };</pre><dl class=domintro><dt><var title="">collection</var> . <code title=dom-HTMLOptionsCollection-length><a href=#dom-htmloptionscollection-length>length</a></code> [ = <var title="">value</var> ]</dt>
@@ -5559,16 +5559,16 @@
     <p>Returns null if no element with that ID could be found.</p>
    </dd>
 
-   <dt><var title="">collection</var> . <code title=dom-HTMLOptionsCollection-add><a href=#dom-htmloptionscollection-add>add</a></code>(<var title="">element</var>, <var title="">before</var>)</dt>
+   <dt><var title="">collection</var> . <code title=dom-HTMLOptionsCollection-add><a href=#dom-htmloptionscollection-add>add</a></code>(<var title="">element</var> [, <var title="">before</var> ] )</dt>
    <dd>
     <p>Inserts <var title="">element</var> before the node given by <var title="">before</var>.</p>
     <p>The <var title="">before</var> argument can be a number, in
     which case <var title="">element</var> is inserted before the item
     with that number, or an element from the collection, in which case
     <var title="">element</var> is inserted before that element.</p>
-    <p>If <var title="">before</var> is null or a number out of range,
-    then <var title="">element</var> will be added at the end of the
-    list.</p>
+    <p>If <var title="">before</var> is omitted, null, or a number out
+    of range, then <var title="">element</var> will be added at the
+    end of the list.</p>
     <p>This method will throw a <code><a href=#hierarchy_request_err>HIERARCHY_REQUEST_ERR</a></code>
     exception if <var title="">element</var> is an ancestor of the
     element into which it is to be inserted. If <var title="">element</var> is not an <code><a href=#the-option-element>option</a></code> or
@@ -28703,7 +28703,7 @@
            attribute unsigned long <a href=#dom-select-length title=dom-select-length>length</a>;
   [IndexGetter] any <a href=#dom-select-item title=dom-select-item>item</a>(in DOMString name);
   [NameGetter] any <a href=#dom-select-nameditem title=dom-select-namedItem>namedItem</a>(in DOMString name);
-  void <a href=#dom-select-add title=dom-select-add>add</a>(in <a href=#htmlelement>HTMLElement</a> element, in <a href=#htmlelement>HTMLElement</a> before);
+  void <a href=#dom-select-add title=dom-select-add>add</a>(in <a href=#htmlelement>HTMLElement</a> element, [Optional] in <a href=#htmlelement>HTMLElement</a> before);
   void <a href=#dom-select-add title=dom-select-add>add</a>(in <a href=#htmlelement>HTMLElement</a> element, in long before);
   void <a href=#dom-select-remove title=dom-select-remove>remove</a>(in long index);
 
@@ -28858,16 +28858,17 @@
     <p>Returns null if no element with that ID could be found.</p>
    </dd>
 
-   <dt><var title="">select</var> . <code title=dom-select-add><a href=#dom-select-add>add</a></code>(<var title="">element</var>, <var title="">before</var>)</dt>
+   <dt><var title="">select</var> . <code title=dom-select-add><a href=#dom-select-add>add</a></code>(<var title="">element</var> [, <var title="">before</var> ])</dt>
    <dd>
     <p>Inserts <var title="">element</var> before the node given by <var title="">before</var>.</p>
     <p>The <var title="">before</var> argument can be a number, in
     which case <var title="">element</var> is inserted before the item
-    with that number, or an element from the <a href=#concept-select-option-list title=concept-select-option-list>list of options</a>, in which case
-    <var title="">element</var> is inserted before that element.</p>
-    <p>If <var title="">before</var> is null or a number out of range,
-    then <var title="">element</var> will be added at the end of the
-    list.</p>
+    with that number, or an element from the <a href=#concept-select-option-list title=concept-select-option-list>list of options</a>, in
+    which case <var title="">element</var> is inserted before that
+    element.</p>
+    <p>If <var title="">before</var> is omitted, null, or a number out
+    of range, then <var title="">element</var> will be added at the
+    end of the list.</p>
     <p>This method will throw a <code><a href=#hierarchy_request_err>HIERARCHY_REQUEST_ERR</a></code>
     exception if <var title="">element</var> is an ancestor of the
     element into which it is to be inserted. If <var title="">element</var> is not an <code><a href=#the-option-element>option</a></code> or

Received on Friday, 20 March 2009 23:04:27 UTC