html5/spec Overview.html,1.5587,1.5588

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

Modified Files:
	Overview.html 
Log Message:
Define <command command='foo'> to reference other commands (whatwg r6995)

Index: Overview.html
===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.5587
retrieving revision 1.5588
diff -u -d -r1.5587 -r1.5588
--- Overview.html	14 Feb 2012 20:29:09 -0000	1.5587
+++ Overview.html	15 Feb 2012 00:30:17 -0000	1.5588
@@ -320,7 +320,7 @@
 
    <h1>HTML5</h1>
    <h2 class="no-num no-toc" id="a-vocabulary-and-associated-apis-for-html-and-xhtml">A vocabulary and associated APIs for HTML and XHTML</h2>
-   <h2 class="no-num no-toc" id="editor-s-draft-14-february-2012">Editor's Draft 14 February 2012</h2>
+   <h2 class="no-num no-toc" id="editor-s-draft-15-february-2012">Editor's Draft 15 February 2012</h2>
    <dl><dt>Latest Published Version:</dt>
     <dd><a href="http://www.w3.org/TR/html5/">http://www.w3.org/TR/html5/</a></dd>
     <dt>Latest Editor's Draft:</dt>
@@ -467,7 +467,7 @@
   Group</a> is the W3C working group responsible for this
   specification's progress along the W3C Recommendation
   track.
-  This specification is the 14 February 2012 Editor's Draft.
+  This specification is the 15 February 2012 Editor's Draft.
   </p><!-- UNDER NO CIRCUMSTANCES IS THE PRECEDING PARAGRAPH TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST --><p>Work on this specification is also done at the <a href="http://www.whatwg.org/">WHATWG</a>. The W3C HTML working group
   actively pursues convergence with the WHATWG, as required by the <a href="http://www.w3.org/2007/03/HTML-WG-charter">W3C HTML working
   group charter</a>.</p><!-- UNDER NO CIRCUMSTANCES IS THE FOLLOWING PARAGRAPH TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST --><p>This document was produced by a group operating under the <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5
@@ -942,9 +942,10 @@
        <li><a href="#using-the-option-element-to-define-a-command"><span class="secno">4.11.5.4 </span>Using the <code>option</code> element to define a command</a></li>
        <li><a href="#using-the-command-element-to-define-a-command"><span class="secno">4.11.5.5 </span>Using the <code>command</code> element to define
   a command</a></li>
-       <li><a href="#using-the-accesskey-attribute-on-a-label-element-to-define-a-command"><span class="secno">4.11.5.6 </span>Using the <code title="attr-accesskey">accesskey</code> attribute on a <code>label</code> element to define a command</a></li>
-       <li><a href="#using-the-accesskey-attribute-on-a-legend-element-to-define-a-command"><span class="secno">4.11.5.7 </span>Using the <code title="attr-accesskey">accesskey</code> attribute on a <code>legend</code> element to define a command</a></li>
-       <li><a href="#using-the-accesskey-attribute-to-define-a-command-on-other-elements"><span class="secno">4.11.5.8 </span>Using the <code title="attr-accesskey">accesskey</code> attribute to define a command on other elements</a></ol></ol></li>
+       <li><a href="#using-the-command-attribute-on-command-elements-to-define-a-command-indirectly"><span class="secno">4.11.5.6 </span>Using the <code title="attr-command-command">command</code> attribute on <code>command</code> elements to define a command indirectly</a></li>
+       <li><a href="#using-the-accesskey-attribute-on-a-label-element-to-define-a-command"><span class="secno">4.11.5.7 </span>Using the <code title="attr-accesskey">accesskey</code> attribute on a <code>label</code> element to define a command</a></li>
+       <li><a href="#using-the-accesskey-attribute-on-a-legend-element-to-define-a-command"><span class="secno">4.11.5.8 </span>Using the <code title="attr-accesskey">accesskey</code> attribute on a <code>legend</code> element to define a command</a></li>
+       <li><a href="#using-the-accesskey-attribute-to-define-a-command-on-other-elements"><span class="secno">4.11.5.9 </span>Using the <code title="attr-accesskey">accesskey</code> attribute to define a command on other elements</a></ol></ol></li>
    <li><a href="#links"><span class="secno">4.12 </span>Links</a>
     <ol>
      <li><a href="#introduction-3"><span class="secno">4.12.1 </span>Introduction</a></li>
@@ -42927,6 +42928,7 @@
    <dd><code title="attr-command-checked"><a href="#attr-command-checked">checked</a></code></dd>
    <dd><code title="attr-command-radiogroup"><a href="#attr-command-radiogroup">radiogroup</a></code></dd>
    
+   <dd><code title="attr-command-command"><a href="#attr-command-command">command</a></code></dd>
    <dd>Also, the <code title="attr-command-title"><a href="#attr-command-title">title</a></code> attribute has special semantics on this element.</dd>
    <dt><a href="#element-dfn-dom" title="element-dfn-dom">DOM interface</a>:</dt>
    <dd>
@@ -42937,12 +42939,28 @@
            attribute boolean <a href="#dom-command-disabled" title="dom-command-disabled">disabled</a>;
            attribute boolean <a href="#dom-command-checked" title="dom-command-checked">checked</a>;
            attribute DOMString <a href="#dom-command-radiogroup" title="dom-command-radiogroup">radiogroup</a>;
+  readonly attribute <a href="#htmlelement">HTMLElement</a>? <a href="#dom-command-command" title="dom-command-command">command</a>;
 };</pre>
    </dd>
   </dl><p>The <code><a href="#the-command-element">command</a></code> element represents a command that the user
-  can invoke.<p>A command can be part of a context menu or toolbar, using the
-  <code><a href="#the-menu-element">menu</a></code> element, or can be put anywhere else in the page,
-  to define a keyboard shortcut.</p><p>The <dfn id="attr-command-type" title="attr-command-type"><code>type</code></dfn>
+  can invoke.<p>A command can be explicitly part of a context menu or toolbar,
+  using the <code><a href="#the-menu-element">menu</a></code> element. It can also be put anywhere
+  else on a page, either just to define a keyboard shortcut, or to
+  define a command that is then referenced from other
+  <code><a href="#the-command-element">command</a></code> elements.<p>A <code><a href="#the-command-element">command</a></code> element that uses the
+  <code title="attr-command-type"><a href="#attr-command-type">type</a></code>,
+  <code title="attr-command-label"><a href="#attr-command-label">label</a></code>,
+  <code title="attr-command-icon"><a href="#attr-command-icon">icon</a></code>,
+  <code title="attr-command-disabled"><a href="#attr-command-disabled">disabled</a></code>,
+  <code title="attr-command-checked"><a href="#attr-command-checked">checked</a></code>,
+  <code title="attr-command-radiogroup"><a href="#attr-command-radiogroup">radiogroup</a></code>,
+   and
+  <code title="attr-title"><a href="#the-title-attribute">title</a></code> attributes defines a new
+  command. A <code><a href="#the-command-element">command</a></code> element that uses the <code title="attr-command-command"><a href="#attr-command-command">command</a></code> <em>attribute</em>
+  defines a command by reference to another one. This allows authors
+  to define a command once, and set its state (e.g. whether it is
+  active or disabled) in one place, and have all references to that
+  command in the user interface change at the same time.<hr><p>The <dfn id="attr-command-type" title="attr-command-type"><code>type</code></dfn>
   attribute indicates the kind of command: either a normal command
   with an associated action, or a state or option that can be toggled,
   or a selection of one item from a list of items.<p>The attribute is an <a href="#enumerated-attribute">enumerated attribute</a> with three
@@ -42996,7 +43014,25 @@
   state.<p>The <dfn id="attr-command-radiogroup" title="attr-command-radiogroup"><code>radiogroup</code></dfn>
   attribute gives the name of the group of commands that will be
   toggled when the command itself is toggled, for commands whose <code title="attr-command-type"><a href="#attr-command-type">type</a></code> attribute has the value "<code title="">radio</code>". The scope of the name is the child list of
-  the parent element. The attribute must be omitted unless the <code title="attr-command-type"><a href="#attr-command-type">type</a></code> attribute is in the <a href="#attr-command-type-state-radio" title="attr-command-type-state-radio">Radio</a> state.</p><div class="impl">
+  the parent element. The attribute must be omitted unless the <code title="attr-command-type"><a href="#attr-command-type">type</a></code> attribute is in the <a href="#attr-command-type-state-radio" title="attr-command-type-state-radio">Radio</a> state.</p><hr><p>If a <code><a href="#the-command-element">command</a></code> element <var title="">slave</var> has a
+  <dfn id="attr-command-command" title="attr-command-command"><code>command</code></dfn>
+  attribute, and <var title="">slave</var> is <a href="#in-a-document">in a
+  <code>Document</code></a>, and there is an element in that
+  <code><a href="#document">Document</a></code> whose <a href="#concept-id" title="concept-id">ID</a> has a
+  value equal to the value of <var title="">slave</var>'s <code title="attr-command-command"><a href="#attr-command-command">command</a></code> attribute, and the first
+  such element in <a href="#tree-order">tree order</a>, hereafter <var title="">master</var>, itself <a href="#concept-command" title="concept-command">defines
+  a command</a> and either is not a <code><a href="#the-command-element">command</a></code> element or
+  does not itself have a <code title="attr-command-command"><a href="#attr-command-command">command</a></code> attribute, then the
+  <dfn id="master-command">master command</dfn> of <var title="">slave</var> is <var title="">master</var>.<p>An element with a
+  <code title="attr-command-command"><a href="#attr-command-command">command</a></code>
+  attribute must have a <a href="#master-command">master command</a> and must not have any
+  <code title="attr-command-type"><a href="#attr-command-type">type</a></code>,
+  <code title="attr-command-label"><a href="#attr-command-label">label</a></code>,
+  <code title="attr-command-icon"><a href="#attr-command-icon">icon</a></code>,
+  <code title="attr-command-disabled"><a href="#attr-command-disabled">disabled</a></code>,
+  <code title="attr-command-checked"><a href="#attr-command-checked">checked</a></code>, or
+  <code title="attr-command-radiogroup"><a href="#attr-command-radiogroup">radiogroup</a></code>
+  attributes.<hr><div class="impl">
 
   <p>The <dfn id="dom-command-type" title="dom-command-type"><code>type</code></dfn> IDL
   attribute must <a href="#reflect">reflect</a> the content attribute of the
@@ -43006,11 +43042,22 @@
   IDL attributes must <a href="#reflect">reflect</a> the respective content
   attributes of the same name.</p>
 
-  <p>The element's <a href="#activation-behavior">activation behavior</a> depends on the
-  value of the <code title="attr-command-type"><a href="#attr-command-type">type</a></code> attribute
-  of the element, as follows:</p>
+  <p>The <dfn id="dom-command-command" title="dom-command-command"><code>command</code></dfn>
+  IDL attribute must return the <a href="#master-command">master command</a>, if any,
+  or null otherwise.</p>
 
-  <dl class="switch"><dt>If the <code title="attr-command-type"><a href="#attr-command-type">type</a></code> attribute is
+  <hr><p>The element's <a href="#activation-behavior">activation behavior</a> depends on the
+  element's <code title="attr-command-type"><a href="#attr-command-type">type</a></code> and <code title="attr-command-command"><a href="#attr-command-command">command</a></code> attributes, as
+  follows:</p>
+
+  <dl class="switch"><dt>If the element has a <a href="#master-command">master command</a> set by its
+   <code title="attr-command-command"><a href="#attr-command-command">command</a></code> attribute</dt>
+
+   <dd><p>The user agent must <a href="#run-synthetic-click-activation-steps">run synthetic click activation
+   steps</a> on the element's <a href="#master-command">master command</a>.</dd>
+
+
+   <dt>If the <code title="attr-command-type"><a href="#attr-command-type">type</a></code> attribute is
    in the <a href="#attr-command-type-state-checkbox" title="attr-command-type-state-checkbox">Checkbox</a> state</dt>
 
    <dd><p>If the element has a <code title="attr-command-checked"><a href="#attr-command-checked">checked</a></code> attribute, the UA must
@@ -43727,10 +43774,11 @@
   element.</p>
 
 
+
   <h5 id="using-the-command-element-to-define-a-command"><span class="secno">4.11.5.5 </span>Using the <dfn title="command-element"><code>command</code></dfn> element to define
   a command</h5>
 
-  <p>A <code><a href="#the-command-element">command</a></code> element <a href="#concept-command" title="concept-command">defines a command</a>.</p>
+  <p>A <code><a href="#the-command-element">command</a></code> element that does not have a <code title="attr-command-command"><a href="#attr-command-command">command</a></code> attribute <a href="#concept-command" title="concept-command">defines a command</a>.</p>
 
   <p>The <a href="#command-facet-type" title="command-facet-Type">Type</a> of the command
   is "radio" if the <code><a href="#the-command-element">command</a></code>'s <code title="attr-command-type"><a href="#attr-command-type">type</a></code> attribute is
@@ -43782,9 +43830,56 @@
 
 
 
+  <h5 id="using-the-command-attribute-on-command-elements-to-define-a-command-indirectly"><span class="secno">4.11.5.6 </span><dfn title="command-command-command">Using the <code title="attr-command-command">command</code> attribute on <code>command</code> elements to define a command indirectly</dfn></h5>
 
+  <p>A <code><a href="#the-command-element">command</a></code> element with a <a href="#master-command">master command</a>
+  <a href="#concept-command" title="concept-command">defines a command</a>.</p>
 
-  <h5 id="using-the-accesskey-attribute-on-a-label-element-to-define-a-command"><span class="secno">4.11.5.6 </span><dfn title="label-command">Using the <code title="attr-accesskey">accesskey</code> attribute on a <code>label</code> element to define a command</dfn></h5>
+  <p>The <a href="#command-facet-type" title="command-facet-Type">Type</a> of the command
+  is the <a href="#command-facet-type" title="command-facet-Type">Type</a> of the
+  <a href="#master-command">master command</a>.</p>
+
+  <p>The <a href="#command-facet-id" title="command-facet-ID">ID</a> of the command is
+  the value of the <code title="attr-id"><a href="#the-id-attribute">id</a></code> attribute of the
+  element, if the attribute is present and not empty. Otherwise the
+  command is an <a href="#anonymous-command">anonymous command</a>.</p>
+
+  <p>The <a href="#command-facet-label" title="command-facet-Label">Label</a> of the command
+  is the <a href="#command-facet-label" title="command-facet-Label">Label</a> of the
+  <a href="#master-command">master command</a>.</p>
+
+  <p>If the element has a <code title="attr-title"><a href="#the-title-attribute">title</a></code>
+  attribute, then the <a href="#command-facet-hint" title="command-facet-Hint">Hint</a> of
+  the command is the value of that <code title="attr-title"><a href="#the-title-attribute">title</a></code> attribute. Otherwise, the <a href="#command-facet-hint" title="command-facet-Hint">Hint</a> of the command is the <a href="#command-facet-hint" title="command-facet-Hint">Hint</a> of the <a href="#master-command">master
+  command</a>.</p>
+
+  <p>The <a href="#command-facet-icon" title="command-facet-Icon">Icon</a> of the command
+  is the <a href="#command-facet-icon" title="command-facet-Icon">Icon</a> of the
+  <a href="#master-command">master command</a>.</p>
+
+  <p>The <a href="#command-facet-accesskey" title="command-facet-AccessKey">AccessKey</a> of the
+  command is the element's <a href="#assigned-access-key">assigned access key</a>, if
+  any.</p>
+
+  <p>The <a href="#command-facet-hiddenstate" title="command-facet-HiddenState">Hidden State</a>
+  of the command is the <a href="#command-facet-hiddenstate" title="command-facet-HiddenState">Hidden
+  State</a> of the <a href="#master-command">master command</a>.</p>
+
+  <p>The <a href="#command-facet-disabledstate" title="command-facet-DisabledState">Disabled
+  State</a> of the command is the <a href="#command-facet-disabledstate" title="command-facet-DisabledState">Disabled State</a> of the
+  <a href="#master-command">master command</a>.</p>
+
+  <p>The <a href="#command-facet-checkedstate" title="command-facet-CheckedState">Checked
+  State</a> of the command is the <a href="#command-facet-checkedstate" title="command-facet-CheckedState">Checked State</a> of the
+  <a href="#master-command">master command</a>.</p>
+
+  <p>The <a href="#command-facet-action" title="command-facet-Action">Action</a> of the
+  command is to invoke the <a href="#command-facet-action" title="command-facet-Action">Action</a> of the <a href="#master-command">master
+  command</a>.</p>
+
+
+
+  <h5 id="using-the-accesskey-attribute-on-a-label-element-to-define-a-command"><span class="secno">4.11.5.7 </span><dfn title="label-command">Using the <code title="attr-accesskey">accesskey</code> attribute on a <code>label</code> element to define a command</dfn></h5>
 
   <p>A <code><a href="#the-label-element">label</a></code> element that has an <a href="#assigned-access-key">assigned access
   key</a> and a <a href="#labeled-control">labeled control</a> and whose
@@ -43825,7 +43920,7 @@
 
 
 
-  <h5 id="using-the-accesskey-attribute-on-a-legend-element-to-define-a-command"><span class="secno">4.11.5.7 </span><dfn title="legend-command">Using the <code title="attr-accesskey">accesskey</code> attribute on a <code>legend</code> element to define a command</dfn></h5>
+  <h5 id="using-the-accesskey-attribute-on-a-legend-element-to-define-a-command"><span class="secno">4.11.5.8 </span><dfn title="legend-command">Using the <code title="attr-accesskey">accesskey</code> attribute on a <code>legend</code> element to define a command</dfn></h5>
 
   <p>A <code><a href="#the-legend-element">legend</a></code> element that has an <a href="#assigned-access-key">assigned access
   key</a> and is a child of a <code><a href="#the-fieldset-element">fieldset</a></code> element that
@@ -43869,14 +43964,14 @@
 
 
 
-  <h5 id="using-the-accesskey-attribute-to-define-a-command-on-other-elements"><span class="secno">4.11.5.8 </span><dfn title="accesskey-command">Using the <code title="attr-accesskey">accesskey</code> attribute to define a command on other elements</dfn></h5>
+  <h5 id="using-the-accesskey-attribute-to-define-a-command-on-other-elements"><span class="secno">4.11.5.9 </span><dfn title="accesskey-command">Using the <code title="attr-accesskey">accesskey</code> attribute to define a command on other elements</dfn></h5>
 
   <p>An element that has an <a href="#assigned-access-key">assigned access key</a> <a href="#concept-command" title="concept-command">defines a command</a>.</p>
 
-  <p>If one of the other sections that define elements that <a href="#concept-command" title="concept-command">define commands</a> define that this
+  <p>If one of the earlier sections that define elements that <a href="#concept-command" title="concept-command">define commands</a> define that this
   element <a href="#concept-command" title="concept-command">defines a command</a>, then
-  that section applies to this element, and this section does
-  not. Otherwise, this section applies to that element.</p>
+  that section applies to this element, and this section does not.
+  Otherwise, this section applies to that element.</p>
 
   <p>The <a href="#command-facet-type" title="command-facet-Type">Type</a> of the command
   is "command".</p>
@@ -71227,7 +71322,8 @@
          <code title="attr-command-icon"><a href="#attr-command-icon">icon</a></code>;
          <code title="attr-command-disabled"><a href="#attr-command-disabled">disabled</a></code>;
          <code title="attr-command-checked"><a href="#attr-command-checked">checked</a></code>;
-         <code title="attr-command-radiogroup"><a href="#attr-command-radiogroup">radiogroup</a></code></td>
+         <code title="attr-command-radiogroup"><a href="#attr-command-radiogroup">radiogroup</a></code>;
+         <code title="attr-command-command"><a href="#attr-command-command">command</a></code></td>
      <td><code><a href="#htmlcommandelement">HTMLCommandElement</a></code></td>
     <tr><th><code><a href="#the-datalist-element">datalist</a></code></th>
      <td>Container for options for <a href="#attr-input-list" title="attr-input-list">combo box control</a></td>
@@ -72565,6 +72661,10 @@
           <code title="attr-tdth-colspan"><a href="#attr-tdth-colspan">th</a></code>
      <td> Number of columns that the cell is to span
      <td> <a href="#valid-non-negative-integer">Valid non-negative integer</a> greater than zero
+    <tr><th> <code title="">command</code>
+     <td> <code title="attr-command-command"><a href="#attr-command-command">command</a></code>
+     <td> Command definition
+     <td> <a href="#concept-id" title="concept-id">ID</a>*
     <tr><th> <code title="">content</code>
      <td> <code title="attr-meta-content"><a href="#attr-meta-content">meta</a></code>
      <td> Value of the element

Received on Wednesday, 15 February 2012 00:30:25 UTC