Skip to content

Commit

Permalink
[] (0) WF2: new Option() constructors.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.whatwg.org/webapps@2299 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Oct 8, 2008
1 parent 80aba5d commit f2b16f2
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 30 deletions.
35 changes: 20 additions & 15 deletions index
Expand Up @@ -14171,9 +14171,9 @@ interface <dfn id=htmlimageelement>HTMLImageElement</dfn> : <a href=#htmlelement
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>.</p>


Expand Down Expand Up @@ -26662,8 +26662,9 @@ function AddCloud(data, x, y) { ... }</pre>
<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>;
Expand All @@ -26681,9 +26682,8 @@ interface <dfn id=htmloptionelement>HTMLOptionElement</dfn> : <a href=#htmleleme
<code><a href=#the-datalist-element>datalist</a></code> element.</p>

<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>

<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>

Expand Down Expand Up @@ -26729,19 +26729,24 @@ interface <dfn id=htmloptionelement>HTMLOptionElement</dfn> : <a href=#htmleleme
false otherwise.</p>

<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>
attribute must return the element's <a href=#concept-option-index title=concept-option-index>index</a>.</p>

<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>

<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 ...
</p>
<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.</p>


<h4 id=the-textarea-element><span class=secno>4.10.10 </span>The <dfn><code>textarea</code></dfn> element</h4>
Expand Down
46 changes: 31 additions & 15 deletions source
Expand Up @@ -15026,10 +15026,10 @@ interface <dfn>HTMLImageElement</dfn> : <span>HTMLElement</span> {
these must return a new <code>HTMLImageElement</code> object (a new
<code>img</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
title="attr-dim-width">width</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
title="attr-dim-height">height</code> content attribute must be set
to <var title="">height</var>.</p>


Expand Down Expand Up @@ -29876,8 +29876,9 @@ function AddCloud(data, x, y) { ... }</pre>
<dt>DOM interface:</dt>
<dd>
<pre class="idl">[<span title="dom-option">Constructor</span>(),
<span title="dom-option-n">Constructor</span>(in DOMString name),
<span title="dom-option-nv">Constructor</span>(in DOMString name, in DOMString value)]
<span title="dom-option-t">Constructor</span>(in DOMString text),
<span title="dom-option-tv">Constructor</span>(in DOMString text, in DOMString value),
<span title="dom-option-tvd">Constructor</span>(in DOMString text, in DOMString value, in boolean defaultSelected)]
interface <dfn>HTMLOptionElement</dfn> : <span>HTMLElement</span> {
attribute boolean <span title="dom-option-disabled">disabled</span>;
readonly attribute <span>HTMLFormElement</span> <span title="dom-option-form">form</span>;
Expand All @@ -29897,9 +29898,8 @@ interface <dfn>HTMLOptionElement</dfn> : <span>HTMLElement</span> {
<code>datalist</code> element.</p>

<p>The <dfn title="attr-option-disabled"><code>disabled</code></dfn>
attribute is a <span>boolean attribute</span>.</p>

<p>An <code>option</code> element is <dfn
attribute is a <span>boolean attribute</span>. An
<code>option</code> element is <dfn
title="concept-option-disabled">disabled</dfn> if its <code
title="attr-option-disabled">disabled</code> is present or if it is
a child of an <code>optgroup</code> element whose <code
Expand Down Expand Up @@ -29964,20 +29964,36 @@ interface <dfn>HTMLOptionElement</dfn> : <span>HTMLElement</span> {
false otherwise.</p>

<p>The <dfn title="dom-option-index"><code>index</code></dfn> DOM
attribute must return the lement's <span
attribute must return the element's <span
title="concept-option-index">index</span>.</p>

<p>The <dfn title="dom-option-text"><code>text</code></dfn> DOM
attribute must return the same value as the <code>textContent</code>
DOM attribute on the element.</p>

<p class="XXX">
<dfn title="dom-option"><code>Option()</code></dfn>
<dfn title="dom-option-n"><code>Option(<var title="">name</var>)</code></dfn>
<dfn title="dom-option-nv"><code>Option(<var title="">name</var>, <var title="">value</var>)</code></dfn>
... must return a new <code>HTMLOptionElement</code> object (a new
<code>option</code> element). ... argument processing ...
</p>
<p>Four constructors are provided for creating
<code>HTMLOptionElement</code> objects (in addition to the factory
methods from DOM Core such as <code
title="">createElement()</code>): <dfn
title="dom-option"><code>Option()</code></dfn>, <dfn
title="dom-option-t"><code>Option(<var
title="">text</var>)</code></dfn>, <dfn
title="dom-option-tv"><code>Option(<var title="">text</var>, <var
title="">value</var>)</code></dfn>, and <dfn
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>HTMLOptionElement</code>
object (a new <code>option</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">value</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">selected</code> attribute set with no
value.</p>


<h4>The <dfn><code>textarea</code></dfn> element</h4>
Expand Down

0 comments on commit f2b16f2

Please sign in to comment.