Skip to content

Commit

Permalink
[] (0) WF2: <optgroup> element summary.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.whatwg.org/webapps@2151 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Sep 4, 2008
1 parent 332cebe commit 2984402
Show file tree
Hide file tree
Showing 2 changed files with 115 additions and 53 deletions.
142 changes: 91 additions & 51 deletions index
Expand Up @@ -6801,9 +6801,10 @@ http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20html%3E..
numbers (old value minus new value). numbers (old value minus new value).


<p class=note>Setting <code title=dom-HTMLOptionsCollection-length><a <p class=note>Setting <code title=dom-HTMLOptionsCollection-length><a
href="#length1">length</a></code> never removes or adds any href="#length1">length</a></code> never removes or adds any <code><a
<code>optgroup</code> elements, and never adds new children to existing href="#optgroup">optgroup</a></code> elements, and never adds new children
<code>optgroup</code> elements (though it can remove children from them). to existing <code><a href="#optgroup">optgroup</a></code> elements (though
it can remove children from them).


<p>The <dfn id=itemindex1 <p>The <dfn id=itemindex1
title=dom-HTMLOptionsCollection-item><code>item(<var title=dom-HTMLOptionsCollection-item><code>item(<var
Expand Down Expand Up @@ -26847,7 +26848,8 @@ function AddCloud(data, x, y) { ... }</pre>


<dt>Content model: <dt>Content model:


<dd>Zero or more <code>option</code> or <code>optgroup</code> elements. <dd>Zero or more <code>option</code> or <code><a
href="#optgroup">optgroup</a></code> elements.


<dt>Element-specific attributes: <dt>Element-specific attributes:


Expand Down Expand Up @@ -26927,15 +26929,46 @@ function AddCloud(data, x, y) { ... }</pre>


<dd> <dd>
<pre <pre
class=idl>interface <dfn id=htmlselectelement0>HTMLSelectElement</dfn> : <a href="#htmlelement">HTMLElement</a> { class=idl>interface <dfn id=htmldatalistelement>HTMLDataListElement</dfn> : <a href="#htmlelement">HTMLElement</a> {
readonly attribute <a href="#htmloptionscollection0">HTMLOptionsCollection</a> <span title=dom-select-options>options</span>; readonly attribute <a href="#htmloptionscollection0">HTMLOptionsCollection</a> <span title=dom-select-options>options</span>;
};</pre> };</pre>
</dl> </dl>


<p class=big-issue>... <p class=big-issue>...


<h4 id=the-optgroup><span class=secno>4.9.8 </span>The <h4 id=the-optgroup><span class=secno>4.9.8 </span>The <dfn
<code>optgroup</code> element</h4> id=optgroup><code>optgroup</code></dfn> element</h4>

<dl class=element>
<dt>Categories

<dd>None.

<dt>Contexts in which this element may be used:

<dd>As a child of a <code><a href="#select">select</a></code> element.

<dt>Content model:

<dd>Zero or more <code>option</code> elements.

<dt>Element-specific attributes:

<dd><code title=attr-optgroup-disabled>disabled</code>

<dd><code title=attr-optgroup-label>label</code>

<dt>DOM interface:

<dd>
<pre
class=idl>interface <dfn id=htmloptgroupelement>HTMLOptGroupElement</dfn> : <a href="#htmlelement">HTMLElement</a> {
attribute boolean <span title=dom-select-disabled>disabled</span>;
attribute DOMString <span title=dom-select-label>label</span>;
};</pre>
</dl>

<p class=big-issue>...


<h4 id=the-option><span class=secno>4.9.9 </span>The <code>option</code> <h4 id=the-option><span class=secno>4.9.9 </span>The <code>option</code>
element</h4> element</h4>
Expand Down Expand Up @@ -28829,8 +28862,9 @@ http://mail.gnome.org/archives/usability/2006-June/msg00015.html
href="#datagrid0">datagrid</a></code> element (the <code><a href="#datagrid0">datagrid</a></code> element (the <code><a
href="#select">select</a></code> or <code><a href="#select">select</a></code> or <code><a
href="#datalist">datalist</a></code> element), that skips all nodes href="#datalist">datalist</a></code> element), that skips all nodes
other than <code>optgroup</code> and <code>option</code> elements, as other than <code><a href="#optgroup">optgroup</a></code> and
well as any descendents of any <code>option</code> elements.</p> <code>option</code> elements, as well as any descendents of any
<code>option</code> elements.</p>


<p>Given a path <var title="">row</var>, the corresponding element is the <p>Given a path <var title="">row</var>, the corresponding element is the
one obtained by drilling into the view, taking the child given by the one obtained by drilling into the view, taking the child given by the
Expand Down Expand Up @@ -28897,8 +28931,8 @@ http://mail.gnome.org/archives/usability/2006-June/msg00015.html


<ul> <ul>
<li>If the <var title="">row</var>'s corresponding element is an <li>If the <var title="">row</var>'s corresponding element is an
<code>optgroup</code> element: <code title=datagrid-row-class-header><a <code><a href="#optgroup">optgroup</a></code> element: <code
href="#header0">header</a></code> title=datagrid-row-class-header><a href="#header0">header</a></code>


<li>If the <var title="">row</var>'s corresponding element contains <li>If the <var title="">row</var>'s corresponding element contains
other elements that are also in the view, and the element's <code other elements that are also in the view, and the element's <code
Expand All @@ -28919,9 +28953,10 @@ http://mail.gnome.org/archives/usability/2006-June/msg00015.html
href="#getcelldata">getCellData(<var title="">row</var>, <var href="#getcelldata">getCellData(<var title="">row</var>, <var
title="">cell</var>)</a></code> method must return the value of the title="">cell</var>)</a></code> method must return the value of the
<code title=attr-optgroup-label>label</code> attribute if the <var <code title=attr-optgroup-label>label</code> attribute if the <var
title="">row</var>'s corresponding element is an <code>optgroup</code> title="">row</var>'s corresponding element is an <code><a
element, otherwise, if the <var title="">row</var>'s corresponding href="#optgroup">optgroup</a></code> element, otherwise, if the <var
element is an <code>option</code>element, its <code title="">row</var>'s corresponding element is an
<code>option</code>element, its <code
title=attr-option-label>label</code> attribute if it has one, otherwise title=attr-option-label>label</code> attribute if it has one, otherwise
the value of its <code><a href="#textcontent">textContent</a></code> DOM the value of its <code><a href="#textcontent">textContent</a></code> DOM
attribute.</p> attribute.</p>
Expand Down Expand Up @@ -29133,8 +29168,8 @@ http://mail.gnome.org/archives/usability/2006-June/msg00015.html
<code><a href="#textcontent">textContent</a></code> of the current <code><a href="#textcontent">textContent</a></code> of the current
<code>option</code> element (the <code <code>option</code> element (the <code
title=attr-option-label>label</code> attribute is <a href="#ignored" title=attr-option-label>label</code> attribute is <a href="#ignored"
title=ignore>ignored</a> in this context as the <code>optgroup</code>s title=ignore>ignored</a> in this context as the <code><a
are not displayed).</p> href="#optgroup">optgroup</a></code>s are not displayed).</p>


<p>The <code title=dom-provider-getCellClasses><a <p>The <code title=dom-provider-getCellClasses><a
href="#getcellclasses">getCellClasses()</a></code> method must add the href="#getcellclasses">getCellClasses()</a></code> method must add the
Expand Down Expand Up @@ -30679,7 +30714,7 @@ menu li:not(:first-child)::before { content: ' | '; }</pre>
<dt>A <code><a href="#menu">menu</a></code> element with a <code <dt>A <code><a href="#menu">menu</a></code> element with a <code
title=attr-menu-label><a href="#label2">label</a></code> attribute title=attr-menu-label><a href="#label2">label</a></code> attribute


<dt>An <code>optgroup</code> element <dt>An <code><a href="#optgroup">optgroup</a></code> element


<dd>Append a submenu to the menu, using the value of the element's <code <dd>Append a submenu to the menu, using the value of the element's <code
title="">label</code> attribute as the label of the menu. The submenu title="">label</code> attribute as the label of the menu. The submenu
Expand All @@ -30695,11 +30730,12 @@ menu li:not(:first-child)::before { content: ' | '; }</pre>
the algorithm above -- just iterate through the contents like with the algorithm above -- just iterate through the contents like with
<code><a href="#li">li</a></code>, to support <code><a <code><a href="#li">li</a></code>, to support <code><a
href="#input0">input</a></code> elements in <code><a href="#input0">input</a></code> elements in <code><a
href="#label">label</a></code> elements. Also, <code>optgroup</code> href="#label">label</a></code> elements. Also, <code><a
elements without labels should be ignored (maybe? or at least should say href="#optgroup">optgroup</a></code> elements without labels should be
they have no label so that they are dropped below), and <code><a ignored (maybe? or at least should say they have no label so that they are
href="#select">select</a></code> elements inside <code><a dropped below), and <code><a href="#select">select</a></code> elements
href="#label">label</a></code> elements may need special processing. inside <code><a href="#label">label</a></code> elements may need special
processing.


<p>Once all the nodes have been processed as described above, the user <p>Once all the nodes have been processed as described above, the user
agent must the post-process the menu as follows: agent must the post-process the menu as follows:
Expand Down Expand Up @@ -46317,11 +46353,12 @@ interface <dfn id=messagechannel>MessageChannel</dfn> {
<select>; commented out text below can handle the non-<select> case <select>; commented out text below can handle the non-<select> case
if we ever allow it) --> if we ever allow it) -->


<p>An <code>optgroup</code> element's <span title=syntax-end-tag>end <p>An <code><a href="#optgroup">optgroup</a></code> element's <span
tag</span> may be omitted if the <code>optgroup</code> element title=syntax-end-tag>end tag</span> may be omitted if the <code><a
<!--has an ancestor href="#optgroup">optgroup</a></code> element <!--has an ancestor
<code>select</code> element and--> is immediately <code>select</code> element and-->
followed by another <code>optgroup</code> element, or if is immediately followed by another <code><a
href="#optgroup">optgroup</a></code> element, or if
<!--all of the elements <!--all of the elements
that are ancestors of the <code>optgroup</code> element, up to and that are ancestors of the <code>optgroup</code> element, up to and
including the first ancestor element that is not an including the first ancestor element that is not an
Expand All @@ -46339,8 +46376,8 @@ interface <dfn id=messagechannel>MessageChannel</dfn> {
<p>An <code>option</code> element's <span title=syntax-end-tag>end <p>An <code>option</code> element's <span title=syntax-end-tag>end
tag</span> may be omitted if the <code>option</code> element is tag</span> may be omitted if the <code>option</code> element is
immediately followed by another <code>option</code> element, or if it is immediately followed by another <code>option</code> element, or if it is
immediately followed by an <code>optgroup</code> element, or if there is immediately followed by an <code><a href="#optgroup">optgroup</a></code>
no more content in the parent element.</p> element, or if there is no more content in the parent element.</p>
<!-- <colgroup> --> <!-- <colgroup> -->


<p>A <code><a href="#colgroup">colgroup</a></code> element's <span <p>A <code><a href="#colgroup">colgroup</a></code> element's <span
Expand Down Expand Up @@ -46420,15 +46457,17 @@ interface <dfn id=messagechannel>MessageChannel</dfn> {
<p>For historical reasons, certain elements have extra restrictions beyond <p>For historical reasons, certain elements have extra restrictions beyond
even the restrictions given by their content model. even the restrictions given by their content model.


<p>An <code>optgroup</code> element <!--that is a descendant of a <p>An <code><a href="#optgroup">optgroup</a></code> element
<code>select</code> element--> <!--that is a descendant of a
must not contain <code>optgroup</code> elements, even though these <code>select</code> element--> must not
elements are technically allowed to be nested according to the content contain <code><a href="#optgroup">optgroup</a></code> elements, even
models described in this specification. (If an <code>optgroup</code> though these elements are technically allowed to be nested according to
element is put inside another <!--<code>optgroup</code> element the content models described in this specification. (If an <code><a
href="#optgroup">optgroup</a></code> element is put inside another
<!--<code>optgroup</code> element
inside a <code>select</code> element--> inside a <code>select</code> element-->
in the markup, it will in fact imply an <code>optgroup</code> end tag in the markup, it will in fact imply an <code><a
before it.) href="#optgroup">optgroup</a></code> end tag before it.)


<p>A <code><a href="#table">table</a></code> element must not contain <p>A <code><a href="#table">table</a></code> element must not contain
<code><a href="#tr">tr</a></code> elements, even though these elements are <code><a href="#tr">tr</a></code> elements, even though these elements are
Expand Down Expand Up @@ -50056,11 +50095,12 @@ interface <dfn id=messagechannel>MessageChannel</dfn> {
end tags</dfn>, then, while the <a href="#current5">current node</a> is a end tags</dfn>, then, while the <a href="#current5">current node</a> is a
<code><a href="#dd">dd</a></code> element, a <code><a <code><a href="#dd">dd</a></code> element, a <code><a
href="#dt">dt</a></code> element, an <code><a href="#li">li</a></code> href="#dt">dt</a></code> element, an <code><a href="#li">li</a></code>
element, an <code>option</code> element, an <code>optgroup</code> element, element, an <code>option</code> element, an <code><a
a <code><a href="#p">p</a></code> element, an <code><a href="#optgroup">optgroup</a></code> element, a <code><a
href="#rp">rp</a></code> element, or an <code><a href="#rt">rt</a></code> href="#p">p</a></code> element, an <code><a href="#rp">rp</a></code>
element, the UA must pop the <a href="#current5">current node</a> off the element, or an <code><a href="#rt">rt</a></code> element, the UA must pop
<a href="#stack">stack of open elements</a>. the <a href="#current5">current node</a> off the <a href="#stack">stack of
open elements</a>.


<p>If a step requires the UA to generate implied end tags but lists an <p>If a step requires the UA to generate implied end tags but lists an
element to exclude from the process, then the UA must perform the above element to exclude from the process, then the UA must perform the above
Expand Down Expand Up @@ -52875,9 +52915,9 @@ interface <dfn id=messagechannel>MessageChannel</dfn> {
<p>If the <a href="#current5">current node</a> is an <code>option</code> <p>If the <a href="#current5">current node</a> is an <code>option</code>
element, act as if an end tag with the tag name "option" had been seen.</p> element, act as if an end tag with the tag name "option" had been seen.</p>


<p>If the <a href="#current5">current node</a> is an <p>If the <a href="#current5">current node</a> is an <code><a
<code>optgroup</code> element, act as if an end tag with the tag name href="#optgroup">optgroup</a></code> element, act as if an end tag with
"optgroup" had been seen.</p> the tag name "optgroup" had been seen.</p>


<p><a href="#insert0">Insert an HTML element</a> for the token.</p> <p><a href="#insert0">Insert an HTML element</a> for the token.</p>


Expand All @@ -52886,13 +52926,13 @@ interface <dfn id=messagechannel>MessageChannel</dfn> {
<dd> <dd>
<p>First, if the <a href="#current5">current node</a> is an <p>First, if the <a href="#current5">current node</a> is an
<code>option</code> element, and the node immediately before it in the <code>option</code> element, and the node immediately before it in the
<a href="#stack">stack of open elements</a> is an <code>optgroup</code> <a href="#stack">stack of open elements</a> is an <code><a
element, then act as if an end tag with the tag name "option" had been href="#optgroup">optgroup</a></code> element, then act as if an end tag
seen.</p> with the tag name "option" had been seen.</p>


<p>If the <a href="#current5">current node</a> is an <p>If the <a href="#current5">current node</a> is an <code><a
<code>optgroup</code> element, then pop that node from the <a href="#optgroup">optgroup</a></code> element, then pop that node from
href="#stack">stack of open elements</a>. Otherwise, this is a <a the <a href="#stack">stack of open elements</a>. Otherwise, this is a <a
href="#parse2">parse error</a>; ignore the token.</p> href="#parse2">parse error</a>; ignore the token.</p>


<dt>An end tag whose tag name is "option" <dt>An end tag whose tag name is "option"
Expand Down
26 changes: 24 additions & 2 deletions source
Expand Up @@ -24197,7 +24197,7 @@ function AddCloud(data, x, y) { ... }</pre>
<dd>None.</dd> <dd>None.</dd>
<dt>DOM interface:</dt> <dt>DOM interface:</dt>
<dd> <dd>
<pre class="idl">interface <dfn>HTMLSelectElement</dfn> : <span>HTMLElement</span> { <pre class="idl">interface <dfn>HTMLDataListElement</dfn> : <span>HTMLElement</span> {
readonly attribute <span>HTMLOptionsCollection</span> <span title="dom-select-options">options</span>; readonly attribute <span>HTMLOptionsCollection</span> <span title="dom-select-options">options</span>;
};</pre> };</pre>
</dd> </dd>
Expand All @@ -24206,7 +24206,29 @@ function AddCloud(data, x, y) { ... }</pre>
<p class="big-issue">...</p> <p class="big-issue">...</p>




<h4>The <code>optgroup</code> element</h4> <h4>The <dfn><code>optgroup</code></dfn> element</h4>

<dl class="element">
<dt>Categories</dt>
<dd>None.</dd>
<dt>Contexts in which this element may be used:</dt>
<dd>As a child of a <code>select</code> element.</dd>
<dt>Content model:</dt>
<dd>Zero or more <code>option</code> elements.</dd>
<dt>Element-specific attributes:</dt>
<dd><code title="attr-optgroup-disabled">disabled</code></dd>
<dd><code title="attr-optgroup-label">label</code></dd>
<dt>DOM interface:</dt>
<dd>
<pre class="idl">interface <dfn>HTMLOptGroupElement</dfn> : <span>HTMLElement</span> {
attribute boolean <span title="dom-select-disabled">disabled</span>;
attribute DOMString <span title="dom-select-label">label</span>;
};</pre>
</dd>
</dl>

<p class="big-issue">...</p>



<h4>The <code>option</code> element</h4> <h4>The <code>option</code> element</h4>


Expand Down

0 comments on commit 2984402

Please sign in to comment.