spec/Overview.html 1.1472 2299 WF2: new Option() constructors. (whatwg

WF2: new Option() constructors. (whatwg r2299)

4.10.9 The option element
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1472.html#the-option-element
Image()
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1472.html#dom-image
HTMLOptionElement
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1472.html#htmloptionelement
4.10.10 The textarea element
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1472.html#the-textarea-element
selected
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1472.html#dom-option-selected
label
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1472.html#concept-option-label
Option()
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1472.html#dom-option
text
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1472.html#dom-option-text
disabled
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1472.html#concept-option-disabled
label
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1472.html#attr-option-label
disabled
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1472.html#attr-option-disabled
index
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1472.html#dom-option-index

http://people.w3.org/mike/diffs/html5/spec/Overview.diff.html
http://dev.w3.org/cvsweb/html5/spec/Overview.html?r1=1.1471&r2=1.1472&f=h
http://html5.org/tools/web-apps-tracker?from=2298&to=2299

===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.1471
retrieving revision 1.1472
diff -u -d -r1.1471 -r1.1472
--- Overview.html 8 Oct 2008 00:08:16 -0000 1.1471
+++ Overview.html 8 Oct 2008 00:29:19 -0000 1.1472
@@ -11517,9 +11517,9 @@
   methods from DOM Core such as <code title="">createElement()</code>): <dfn id=dom-image title=dom-image><code>Image()</code></dfn>, <dfn id=dom-image-w title=dom-image-w><code>Image(<var title="">width</var>)</code></dfn>, and <dfn id=dom-image-wh title=dom-image-wh><code>Image(<var title="">width</var>, <var title="">height</var>)</code></dfn>. When invoked as constructors,
   these must return a new <code><a href=#htmlimageelement>HTMLImageElement</a></code> object (a new
   <code><a href=#the-img-element>img</a></code> element). If the <var title="">width</var> argument
-  is present, the new object's <code title=attr-img-width>width</code> content attribute must be set to
+  is present, the new object's <code title=attr-dim-width><a href=#attr-dim-width>width</a></code> content attribute must be set to
   <var title="">width</var>. If the <var title="">height</var>
-  argument is also present, the new object's <code title=attr-img-height>height</code> content attribute must be set
+  argument is also present, the new object's <code title=attr-dim-height><a href=#attr-dim-height>height</a></code> content attribute must be set
   to <var title="">height</var>.<div class=example>
 
    <p>A single image can have different appropriate alternative text
@@ -21387,8 +21387,9 @@
    <dt>DOM interface:</dt>
    <dd>
 <pre class=idl>[<a href=#dom-option title=dom-option>Constructor</a>(),
- <a href=#dom-option-n title=dom-option-n>Constructor</a>(in DOMString name),
- <a href=#dom-option-nv title=dom-option-nv>Constructor</a>(in DOMString name, in DOMString value)]
+ <a href=#dom-option-t title=dom-option-t>Constructor</a>(in DOMString text),
+ <a href=#dom-option-tv title=dom-option-tv>Constructor</a>(in DOMString text, in DOMString value),
+ <a href=#dom-option-tvd title=dom-option-tvd>Constructor</a>(in DOMString text, in DOMString value, in boolean defaultSelected)]
 interface <dfn id=htmloptionelement>HTMLOptionElement</dfn> : <a href=#htmlelement>HTMLElement</a> {
            attribute boolean <a href=#dom-option-disabled title=dom-option-disabled>disabled</a>;
   readonly attribute <a href=#htmlformelement>HTMLFormElement</a> <span title=dom-option-form>form</span>;
@@ -21404,7 +21405,8 @@
   </dl><p>The <code><a href=#the-option-element>option</a></code> element represents an option in a
   <code><a href=#the-select-element>select</a></code> element or as part of a list of suggestions in a
   <code><a href=#the-datalist-element>datalist</a></code> element.<p>The <dfn id=attr-option-disabled title=attr-option-disabled><code>disabled</code></dfn>
-  attribute is a <a href=#boolean-attribute>boolean attribute</a>.<p>An <code><a href=#the-option-element>option</a></code> element is <dfn id=concept-option-disabled title=concept-option-disabled>disabled</dfn> if its <code title=attr-option-disabled><a href=#attr-option-disabled>disabled</a></code> is present or if it is
+  attribute is a <a href=#boolean-attribute>boolean attribute</a>. An
+  <code><a href=#the-option-element>option</a></code> element is <dfn id=concept-option-disabled title=concept-option-disabled>disabled</dfn> if its <code title=attr-option-disabled><a href=#attr-option-disabled>disabled</a></code> is present or if it is
   a child of an <code><a href=#the-optgroup-element>optgroup</a></code> element whose <code title=attr-optgroup-disabled><a href=#attr-optgroup-disabled>disabled</a></code> attribute is
   present.<p>The <dfn id=attr-option-label title=attr-option-label><code>label</code></dfn>
   attribute provides a label for element. The <dfn id=concept-option-label title=concept-option-label>label</dfn> of an <code><a href=#the-option-element>option</a></code>
@@ -21434,15 +21436,20 @@
   DOM attribute must <a href=#reflect>reflect</a> the <code title=attr-option-selected><a href=#attr-option-selected>selected</a></code> content attribute.<p>The <dfn id=dom-option-selected title=dom-option-selected><code>selected</code></dfn>
   DOM attribute must return true if the element's <a href=#concept-option-selectedness title=concept-option-selectedness>selectedness</a> is true, and
   false otherwise.<p>The <dfn id=dom-option-index title=dom-option-index><code>index</code></dfn> DOM
-  attribute must return the lement's <a href=#concept-option-index title=concept-option-index>index</a>.<p>The <dfn id=dom-option-text title=dom-option-text><code>text</code></dfn> DOM
+  attribute must return the element's <a href=#concept-option-index title=concept-option-index>index</a>.<p>The <dfn id=dom-option-text title=dom-option-text><code>text</code></dfn> DOM
   attribute must return the same value as the <code><a href=#textcontent>textContent</a></code>
-  DOM attribute on the element.<p class=XXX>
-   <dfn id=dom-option title=dom-option><code>Option()</code></dfn>
-   <dfn id=dom-option-n title=dom-option-n><code>Option(<var title="">name</var>)</code></dfn>
-   <dfn id=dom-option-nv title=dom-option-nv><code>Option(<var title="">name</var>, <var title="">value</var>)</code></dfn>
-   ... must return a new <code><a href=#htmloptionelement>HTMLOptionElement</a></code> object (a new
-   <code><a href=#the-option-element>option</a></code> element). ... argument processing ...
-  <h4 id=the-textarea-element><span class=secno>4.10.10 </span>The <dfn><code>textarea</code></dfn> element</h4><dl class=element><dt>Categories</dt>
+  DOM attribute on the element.<p>Four constructors are provided for creating
+  <code><a href=#htmloptionelement>HTMLOptionElement</a></code> objects (in addition to the factory
+  methods from DOM Core such as <code title="">createElement()</code>): <dfn id=dom-option title=dom-option><code>Option()</code></dfn>, <dfn id=dom-option-t title=dom-option-t><code>Option(<var title="">text</var>)</code></dfn>, <dfn id=dom-option-tv title=dom-option-tv><code>Option(<var title="">text</var>, <var title="">value</var>)</code></dfn>, and <dfn id=dom-option-tvd title=dom-option-tvd><code>Option(<var title="">text</var>, <var title="">value</var>, <var title="">defaultSelected</var>)</code></dfn>. When invoked as
+  constructors, these must return a new <code><a href=#htmloptionelement>HTMLOptionElement</a></code>
+  object (a new <code><a href=#the-option-element>option</a></code> element). If the <var title="">text</var> argument is present, the new object must have a
+  text node with the value of that argument as its data as its only
+  child. If the <var title="">value</var> argument is present, the new
+  object must have a <code title=attr-option-value><a href=#attr-option-value>value</a></code>
+  attribute set with the value of the argument as its value. If the
+  <var title="">defaultSelected</var> argument is present and true,
+  the new object must have a <code title=attr-option-selected><a href=#attr-option-selected>selected</a></code> attribute set with no
+  value.<h4 id=the-textarea-element><span class=secno>4.10.10 </span>The <dfn><code>textarea</code></dfn> element</h4><dl class=element><dt>Categories</dt>
    <dd><a href=#phrasing-content-0>Phrasing content</a>.</dd>
    <dd><a href=#interactive-content-0>Interactive content</a>.</dd>
    <dd><a href=#category-listed title=category-listed>Listed</a>, <a href=#category-label title=category-label>labelable</a>, <a href=#category-submit title=category-submit>submittable</a>, and <a href=#category-reset title=category-reset>resettable</a> <a href=#form-associated-element>form-associated element</a>.</dd>

Received on Wednesday, 8 October 2008 00:35:20 UTC