Permalink
Browse files

[] (0) WF2: <optgroup> element summary.

git-svn-id: http://svn.whatwg.org/webapps@2151 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information...
1 parent 332cebe commit 2984402d970c550bd1508336217345917126a7cc @Hixie Hixie committed Sep 4, 2008
Showing with 115 additions and 53 deletions.
  1. +91 −51 index
  2. +24 −2 source
View
142 index
@@ -6801,9 +6801,10 @@ http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20html%3E..
numbers (old value minus new value).
<p class=note>Setting <code title=dom-HTMLOptionsCollection-length><a
- href="#length1">length</a></code> never removes or adds any
- <code>optgroup</code> elements, and never adds new children to existing
- <code>optgroup</code> elements (though it can remove children from them).
+ href="#length1">length</a></code> never removes or adds any <code><a
+ href="#optgroup">optgroup</a></code> elements, and never adds new children
+ to existing <code><a href="#optgroup">optgroup</a></code> elements (though
+ it can remove children from them).
<p>The <dfn id=itemindex1
title=dom-HTMLOptionsCollection-item><code>item(<var
@@ -26847,7 +26848,8 @@ function AddCloud(data, x, y) { ... }</pre>
<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:
@@ -26927,15 +26929,46 @@ function AddCloud(data, x, y) { ... }</pre>
<dd>
<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>;
};</pre>
</dl>
<p class=big-issue>...
- <h4 id=the-optgroup><span class=secno>4.9.8 </span>The
- <code>optgroup</code> element</h4>
+ <h4 id=the-optgroup><span class=secno>4.9.8 </span>The <dfn
+ 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>
element</h4>
@@ -28829,8 +28862,9 @@ http://mail.gnome.org/archives/usability/2006-June/msg00015.html
href="#datagrid0">datagrid</a></code> element (the <code><a
href="#select">select</a></code> or <code><a
href="#datalist">datalist</a></code> element), that skips all nodes
- other than <code>optgroup</code> and <code>option</code> elements, as
- well as any descendents of any <code>option</code> elements.</p>
+ other than <code><a href="#optgroup">optgroup</a></code> and
+ <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
one obtained by drilling into the view, taking the child given by the
@@ -28897,8 +28931,8 @@ http://mail.gnome.org/archives/usability/2006-June/msg00015.html
<ul>
<li>If the <var title="">row</var>'s corresponding element is an
- <code>optgroup</code> element: <code title=datagrid-row-class-header><a
- href="#header0">header</a></code>
+ <code><a href="#optgroup">optgroup</a></code> element: <code
+ title=datagrid-row-class-header><a href="#header0">header</a></code>
<li>If the <var title="">row</var>'s corresponding element contains
other elements that are also in the view, and the element's <code
@@ -28919,9 +28953,10 @@ http://mail.gnome.org/archives/usability/2006-June/msg00015.html
href="#getcelldata">getCellData(<var title="">row</var>, <var
title="">cell</var>)</a></code> method must return the value of the
<code title=attr-optgroup-label>label</code> attribute if the <var
- title="">row</var>'s corresponding element is an <code>optgroup</code>
- element, otherwise, if the <var title="">row</var>'s corresponding
- element is an <code>option</code>element, its <code
+ title="">row</var>'s corresponding element is an <code><a
+ href="#optgroup">optgroup</a></code> element, otherwise, if the <var
+ 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
the value of its <code><a href="#textcontent">textContent</a></code> DOM
attribute.</p>
@@ -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>option</code> element (the <code
title=attr-option-label>label</code> attribute is <a href="#ignored"
- title=ignore>ignored</a> in this context as the <code>optgroup</code>s
- are not displayed).</p>
+ title=ignore>ignored</a> in this context as the <code><a
+ href="#optgroup">optgroup</a></code>s are not displayed).</p>
<p>The <code title=dom-provider-getCellClasses><a
href="#getcellclasses">getCellClasses()</a></code> method must add the
@@ -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
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
title="">label</code> attribute as the label of the menu. The submenu
@@ -30695,11 +30730,12 @@ menu li:not(:first-child)::before { content: ' | '; }</pre>
the algorithm above -- just iterate through the contents like with
<code><a href="#li">li</a></code>, to support <code><a
href="#input0">input</a></code> elements in <code><a
- href="#label">label</a></code> elements. Also, <code>optgroup</code>
- elements without labels should be ignored (maybe? or at least should say
- they have no label so that they are dropped below), and <code><a
- href="#select">select</a></code> elements inside <code><a
- href="#label">label</a></code> elements may need special processing.
+ href="#label">label</a></code> elements. Also, <code><a
+ href="#optgroup">optgroup</a></code> elements without labels should be
+ ignored (maybe? or at least should say they have no label so that they are
+ dropped below), and <code><a href="#select">select</a></code> elements
+ 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
agent must the post-process the menu as follows:
@@ -46317,11 +46353,12 @@ interface <dfn id=messagechannel>MessageChannel</dfn> {
<select>; commented out text below can handle the non-<select> case
if we ever allow it) -->
- <p>An <code>optgroup</code> element's <span title=syntax-end-tag>end
- tag</span> may be omitted if the <code>optgroup</code> element
- <!--has an ancestor
- <code>select</code> element and--> is immediately
- followed by another <code>optgroup</code> element, or if
+ <p>An <code><a href="#optgroup">optgroup</a></code> element's <span
+ title=syntax-end-tag>end tag</span> may be omitted if the <code><a
+ href="#optgroup">optgroup</a></code> element <!--has an ancestor
+ <code>select</code> element and-->
+ is immediately followed by another <code><a
+ href="#optgroup">optgroup</a></code> element, or if
<!--all of the elements
that are ancestors of the <code>optgroup</code> element, up to and
including the first ancestor element that is not an
@@ -46339,8 +46376,8 @@ interface <dfn id=messagechannel>MessageChannel</dfn> {
<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
immediately followed by another <code>option</code> element, or if it is
- immediately followed by an <code>optgroup</code> element, or if there is
- no more content in the parent element.</p>
+ immediately followed by an <code><a href="#optgroup">optgroup</a></code>
+ element, or if there is no more content in the parent element.</p>
<!-- <colgroup> -->
<p>A <code><a href="#colgroup">colgroup</a></code> element's <span
@@ -46420,15 +46457,17 @@ interface <dfn id=messagechannel>MessageChannel</dfn> {
<p>For historical reasons, certain elements have extra restrictions beyond
even the restrictions given by their content model.
- <p>An <code>optgroup</code> element <!--that is a descendant of a
- <code>select</code> element-->
- must not contain <code>optgroup</code> elements, even though these
- elements are technically allowed to be nested according to the content
- models described in this specification. (If an <code>optgroup</code>
- element is put inside another <!--<code>optgroup</code> element
+ <p>An <code><a href="#optgroup">optgroup</a></code> element
+ <!--that is a descendant of a
+ <code>select</code> element--> must not
+ contain <code><a href="#optgroup">optgroup</a></code> elements, even
+ though these elements are technically allowed to be nested according to
+ 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-->
- in the markup, it will in fact imply an <code>optgroup</code> end tag
- before it.)
+ in the markup, it will in fact imply an <code><a
+ href="#optgroup">optgroup</a></code> end tag before it.)
<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
@@ -50056,11 +50095,12 @@ interface <dfn id=messagechannel>MessageChannel</dfn> {
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
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,
- a <code><a href="#p">p</a></code> element, an <code><a
- href="#rp">rp</a></code> element, or an <code><a href="#rt">rt</a></code>
- element, the UA must pop the <a href="#current5">current node</a> off the
- <a href="#stack">stack of open elements</a>.
+ element, an <code>option</code> element, an <code><a
+ href="#optgroup">optgroup</a></code> element, a <code><a
+ href="#p">p</a></code> element, an <code><a href="#rp">rp</a></code>
+ element, or an <code><a href="#rt">rt</a></code> element, the UA must pop
+ 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
element to exclude from the process, then the UA must perform the above
@@ -52875,9 +52915,9 @@ interface <dfn id=messagechannel>MessageChannel</dfn> {
<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>
- <p>If the <a href="#current5">current node</a> is an
- <code>optgroup</code> element, act as if an end tag with the tag name
- "optgroup" had been seen.</p>
+ <p>If the <a href="#current5">current node</a> is an <code><a
+ href="#optgroup">optgroup</a></code> element, act as if an end tag with
+ the tag name "optgroup" had been seen.</p>
<p><a href="#insert0">Insert an HTML element</a> for the token.</p>
@@ -52886,13 +52926,13 @@ interface <dfn id=messagechannel>MessageChannel</dfn> {
<dd>
<p>First, if the <a href="#current5">current node</a> is an
<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>
- element, then act as if an end tag with the tag name "option" had been
- seen.</p>
+ <a href="#stack">stack of open elements</a> is an <code><a
+ href="#optgroup">optgroup</a></code> element, then 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
- <code>optgroup</code> element, then pop that node from the <a
- href="#stack">stack of open elements</a>. Otherwise, this is a <a
+ <p>If the <a href="#current5">current node</a> is an <code><a
+ href="#optgroup">optgroup</a></code> element, then pop that node from
+ the <a href="#stack">stack of open elements</a>. Otherwise, this is a <a
href="#parse2">parse error</a>; ignore the token.</p>
<dt>An end tag whose tag name is "option"
View
26 source
@@ -24197,7 +24197,7 @@ function AddCloud(data, x, y) { ... }</pre>
<dd>None.</dd>
<dt>DOM interface:</dt>
<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>;
};</pre>
</dd>
@@ -24206,7 +24206,29 @@ function AddCloud(data, x, y) { ... }</pre>
<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>

0 comments on commit 2984402

Please sign in to comment.