[html5] r1357 - /
whatwg at whatwg.org
whatwg at whatwg.org
Fri Mar 7 04:08:26 PST 2008
Author: ianh
Date: 2008-03-07 04:08:25 -0800 (Fri, 07 Mar 2008)
New Revision: 1357
Modified:
index
source
Log:
[giow] (2) queryCommandEnabled() and friends -- this really requires heavy testing, please let me know of any mistakes
Modified: index
===================================================================
--- index 2008-03-07 09:31:01 UTC (rev 1356)
+++ index 2008-03-07 12:08:25 UTC (rev 1357)
@@ -2621,6 +2621,11 @@
boolean <a href="#execCommand" title=dom-document-execCommand>execCommand</a>(in DOMString commandId);
boolean <a href="#execCommand" title=dom-document-execCommand>execCommand</a>(in DOMString commandId, in boolean doShowUI);
boolean <a href="#execCommand" title=dom-document-execCommand>execCommand</a>(in DOMString commandId, in boolean doShowUI, in DOMString value);
+ boolean <a href="#querycommandenabled" title=dom-document-queryCommandEnabled>queryCommandEnabled</a>(in DOMString commandId);
+ boolean <a href="#querycommandindeterm" title=dom-document-queryCommandIndeterm>queryCommandIndeterm</a>(in DOMString commandId);
+ boolean <a href="#querycommandstate" title=dom-document-queryCommandState>queryCommandState</a>(in DOMString commandId);
+ boolean <a href="#querycommandsupported" title=dom-document-queryCommandSupported>queryCommandSupported</a>(in DOMString commandId);
+ DOMString <a href="#querycommandvalue" title=dom-document-queryCommandValue>queryCommandValue</a>(in DOMString commandId);
<a href="#selection1">Selection</a> <a href="#getselection0" title=dom-document-getSelection>getSelection</a>();
<!-- XXX we're not done here.
@@ -35564,73 +35569,190 @@
title="">doShowUI</var> parameter is always ignored, regardless of its
value. It is included for historical reasons only.
- <p>When any of these methods are invoked, user agents must act as described
- in the list below.
+ <p>When <code title=dom-document-execCommand><a
+ href="#execCommand">execCommand()</a></code> is invoked, the user agent
+ must follow the following steps:
- <p>For actions marked "<dfn id=editing2>editing hosts only</dfn>", if the
- selection is not entirely within an <a href="#editing1">editing host</a>,
- of if there is no selection and the caret is not inside an <a
- href="#editing1">editing host</a>, then the user agent must do nothing.
+ <ol>
+ <li>If the given <var title="">commandId</var> maps to an entry below that
+ is marked as "<dfn id=editing2>editing hosts only</dfn>", and the
+ document is not <a href="#ready">ready for editing host commands</a>, do
+ nothing; abort these steps.
+ <li>Otherwise, execute the "Action" listed below for the given <var
+ title="">commandId</var>.
+ </ol>
+
+ <p>A document is <dfn id=ready>ready for editing host commands</dfn> if it
+ has a selection that is entirely within an <a href="#editing1">editing
+ host</a>, or if it has no selection but its caret is inside an <a
+ href="#editing1">editing host</a>.
+
+ <p>The <dfn id=querycommandenabled
+ title=dom-document-queryCommandEnabled><code>queryCommandEnabled(<var
+ title="">commandId</var>)</code></dfn> method, when invoked, must return
+ true if the condition listed below under "Enabled When" for the given <var
+ title="">commandId</var> is true, and false otherwise.
+
+ <p>The <dfn id=querycommandindeterm
+ title=dom-document-queryCommandIndeterm><code>queryCommandIndeterm(<var
+ title="">commandId</var>)</code></dfn> method, when invoked, must return
+ true if the condition listed below under "Indeterminate When" for the
+ given <var title="">commandId</var> is true, and false otherwise.
+
+ <p>The <dfn id=querycommandstate
+ title=dom-document-queryCommandState><code>queryCommandState(<var
+ title="">commandId</var>)</code></dfn> method, when invoked, must return
+ the value expressed below under "State" for the given <var
+ title="">commandId</var>.
+
+ <p>The <dfn id=querycommandsupported
+ title=dom-document-queryCommandSupported><code>queryCommandSupported(<var
+ title="">commandId</var>)</code></dfn> method, when invoked, must return
+ true if the given <var title="">commandId</var> is in the list below, and
+ false otherwise.
+
+ <p>The <dfn id=querycommandvalue
+ title=dom-document-queryCommandValue><code>queryCommandValue(<var
+ title="">commandId</var>)</code></dfn> method, when invoked, must return
+ the value expressed below under "Value" for the given <var
+ title="">commandId</var>.
+
+ <p>The commands are:
+
<dl>
<dt>If the <var title="">commandId</var> is <dfn id=undo1
title=command-undo><code>undo</code></dfn>
- <dd>The user agent must <a href="#undo-moving0" title=do-undo>move back
- one step</a> in its <a href="#undo-transaction">undo transaction
- history</a>, restoring the associated state. If there is no further undo
- information the user agent must do nothing. See the <a
- href="#undo-history">undo history</a>.
+ <dd><strong>Action:</strong> The user agent must <a href="#undo-moving0"
+ title=do-undo>move back one step</a> in its <a
+ href="#undo-transaction">undo transaction history</a>, restoring the
+ associated state. If the <a href="#current3">undo position</a> is at the
+ start of the <a href="#undo-transaction">undo transaction history</a>,
+ the user agent must do nothing. See the <a href="#undo-history">undo
+ history</a>.
+ <dd><strong>Enabled When:</strong> The <a href="#current3">undo
+ position</a> is not at the start of the <a href="#undo-transaction">undo
+ transaction history</a>.
+
+ <dd><strong>Indeterminate When:</strong> Never.
+
+ <dd><strong>State:</strong> Always false.
+
+ <dd><strong>Value:</strong> Always the string "<code
+ title="">false</code>".
+
<dt>If the <var title="">commandId</var> is <dfn id=redo0
title=command-redo><code>redo</code></dfn>
- <dd>The user agent must <a href="#redo-moving0" title=do-redo>move forward
- one step</a> in its <a href="#undo-transaction">undo transaction
- history</a>, restoring the associated state. If there is no further undo
- (well, "redo") information the user agent must do nothing. See the <a
- href="#undo-history">undo history</a>.
+ <dd><strong>Action:</strong> The user agent must <a href="#redo-moving0"
+ title=do-redo>move forward one step</a> in its <a
+ href="#undo-transaction">undo transaction history</a>, restoring the
+ associated state. If the <a href="#current3">undo position</a> is at the
+ end of the <a href="#undo-transaction">undo transaction history</a>, the
+ user agent must do nothing. See the <a href="#undo-history">undo
+ history</a>.
+ <dd><strong>Enabled When:</strong> The <a href="#current3">undo
+ position</a> is not at the end of the <a href="#undo-transaction">undo
+ transaction history</a>.
+
+ <dd><strong>Indeterminate When:</strong> Never.
+
+ <dd><strong>State:</strong> Always false.
+
+ <dd><strong>Value:</strong> Always the string "<code
+ title="">false</code>".
+
<dt>If the <var title="">commandId</var> is <dfn id=selectall0
title=command-selectAll><code>selectAll</code></dfn>
- <dd>The user agent must change the selection so that all the content in
- the currently focused <a href="#editing1">editing host</a> is selected.
- If no <a href="#editing1">editing host</a> is focused, then the content
- of the entire document must be selected.
+ <dd><strong>Action:</strong> The user agent must change the selection so
+ that all the content in the currently focused <a href="#editing1">editing
+ host</a> is selected. If no <a href="#editing1">editing host</a> is
+ focused, then the content of the entire document must be selected.
+ <dd><strong>Enabled When:</strong> Always.
+
+ <dd><strong>Indeterminate When:</strong> Never.
+
+ <dd><strong>State:</strong> Always false.
+
+ <dd><strong>Value:</strong> Always the string "<code
+ title="">false</code>".
+
<dt>If the <var title="">commandId</var> is <dfn id=unselect
title=command-unselect><code>unselect</code></dfn>
- <dd>
- <p>The user agent must change the selection so that nothing is selected.
+ <dd><strong>Action:</strong> The user agent must change the selection so
+ that nothing is selected.
+ <dd><strong>Enabled When:</strong> Always.
+
+ <dd><strong>Indeterminate When:</strong> Never.
+
+ <dd><strong>State:</strong> Always false.
+
+ <dd><strong>Value:</strong> Always the string "<code
+ title="">false</code>".
+
<dt>If the <var title="">commandId</var> is <dfn id=superscript
title=command-superscript><code>superscript</code></dfn>
- <dd><em><a href="#editing2">Editing hosts only.</a></em> The user agent
- must act as if the user had requested that the selection <a
- href="#contenteditable-wrapSemantic">be wrapped in the semantics</a> of
- the <code><a href="#sup">sup</a></code> element (or unwrapped, or, if
- there is no selection, have that semantic inserted or removed — the
- exact behaviour is UA-defined).
+ <dd><a href="#editing2">Editing hosts only.</a>
+ <dd><strong>Action:</strong> The user agent must act as if the user had
+ requested that the selection <a href="#contenteditable-wrapSemantic">be
+ wrapped in the semantics</a> of the <code><a href="#sup">sup</a></code>
+ element (or unwrapped, or, if there is no selection, have that semantic
+ inserted or removed — the exact behaviour is UA-defined).
+
+ <dd><strong>Enabled When:</strong> The document is <a href="#ready">ready
+ for editing host commands</a>.
+
+ <dd><strong>Indeterminate When:</strong> Never.
+
+ <dd><strong>State:</strong> True if the selection, or the caret, if there
+ is no selection, is, or is contained within, a <code><a
+ href="#sup">sup</a></code> element. False otherwise.
+
+ <dd><strong>Value:</strong> The string "<code title="">true</code>" if the
+ expression given for the "State" above is true, the string "<code
+ title="">false</code>" otherwise.
+
<dt>If the <var title="">commandId</var> is <dfn id=subscript
title=command-subscript><code>subscript</code></dfn>
- <dd><em><a href="#editing2">Editing hosts only.</a></em> The user agent
- must act as if the user had requested that the selection <a
- href="#contenteditable-wrapSemantic">be wrapped in the semantics</a> of
- the <em title=""><code><a href="#sub">sub</a></code></em> element (or,
- again, unwrapped, or have that semantic inserted or removed, as defined
- by the UA).
+ <dd><a href="#editing2">Editing hosts only.</a>
+ <dd><strong>Action:</strong> The user agent must act as if the user had
+ requested that the selection <a href="#contenteditable-wrapSemantic">be
+ wrapped in the semantics</a> of the <em title=""><code><a
+ href="#sub">sub</a></code></em> element (or, again, unwrapped, or have
+ that semantic inserted or removed, as defined by the UA).
+
+ <dd><strong>Enabled When:</strong> The document is <a href="#ready">ready
+ for editing host commands</a>.
+
+ <dd><strong>Indeterminate When:</strong> Never.
+
+ <dd><strong>State:</strong> True if the selection, or the caret, if there
+ is no selection, is, or is contained within, a <code><a
+ href="#sub">sub</a></code> element. False otherwise.
+
+ <dd><strong>Value:</strong> The string "<code title="">true</code>" if the
+ expression given for the "State" above is true, the string "<code
+ title="">false</code>" otherwise.
+
<dt>If the <var title="">commandId</var> is <dfn id=formatblock
title=command-formatBlock><code>formatBlock</code></dfn>
+ <dd><a href="#editing2">Editing hosts only.</a>
+
<dd>
- <p><em><a href="#editing2">Editing hosts only.</a></em> This command
- changes the semantics of the blocks containing the selection.</p>
+ <p><strong>Action:</strong> This command changes the semantics of the
+ blocks containing the selection.</p>
<p>If there is no selection, then, where in the description below refers
to the selection, the user agent must act as if the selection was an
@@ -35674,57 +35796,141 @@
title="">Element.renameNode()</code> method had been used) according to
the <var title="">value</var>, by stripping the leading
<code><</code> character and the trailing <code>></code> character
- and using the rest as the new tag name, using the HTML namespace.
+ and using the rest as the new tag name, using the HTML namespace.</p>
+ <dd><strong>Enabled When:</strong> The document is <a href="#ready">ready
+ for editing host commands</a>.
+
+ <dd><strong>Indeterminate When:</strong> Never.
+
+ <dd><strong>State:</strong> Always false.
+
+ <dd><strong>Value:</strong> Always the string "<code
+ title="">false</code>".
+
<dt>If the <var title="">commandId</var> is <dfn id=delete
title=command-delete><code>delete</code></dfn>
- <dd><em><a href="#editing2">Editing hosts only.</a></em> The user agent
- must act as if the user had performed <a href="#contenteditable-delete">a
- backspace operation</a>.
+ <dd><a href="#editing2">Editing hosts only.</a>
+ <dd><strong>Action:</strong> The user agent must act as if the user had
+ performed <a href="#contenteditable-delete">a backspace operation</a>.
+
+ <dd><strong>Enabled When:</strong> The document is <a href="#ready">ready
+ for editing host commands</a>.
+
+ <dd><strong>Indeterminate When:</strong> Never.
+
+ <dd><strong>State:</strong> Always false.
+
+ <dd><strong>Value:</strong> Always the string "<code
+ title="">false</code>".
+
<dt>If the <var title="">commandId</var> is <dfn id=forwarddelete
title=command-forwardDelete><code>forwardDelete</code></dfn>
- <dd><em><a href="#editing2">Editing hosts only.</a></em> The user agent
- must act as if the user had performed <a href="#contenteditable-delete">a
- forward delete operation</a>.
+ <dd><a href="#editing2">Editing hosts only.</a>
+ <dd><strong>Action:</strong> The user agent must act as if the user had
+ performed <a href="#contenteditable-delete">a forward delete
+ operation</a>.
+
+ <dd><strong>Enabled When:</strong> The document is <a href="#ready">ready
+ for editing host commands</a>.
+
+ <dd><strong>Indeterminate When:</strong> Never.
+
+ <dd><strong>State:</strong> Always false.
+
+ <dd><strong>Value:</strong> Always the string "<code
+ title="">false</code>".
+
<dt>If the <var title="">commandId</var> is <dfn id=insertlinebreak
title=command-insertLineBreak><code>insertLineBreak</code></dfn>
- <dd><em><a href="#editing2">Editing hosts only.</a></em> The user agent
- must act as if the user had <a href="#contenteditable-br">requested a
- line separator</a>.
+ <dd><a href="#editing2">Editing hosts only.</a>
+ <dd><strong>Action:</strong> The user agent must act as if the user had <a
+ href="#contenteditable-br">requested a line separator</a>.
+
+ <dd><strong>Enabled When:</strong> The document is <a href="#ready">ready
+ for editing host commands</a>.
+
+ <dd><strong>Indeterminate When:</strong> Never.
+
+ <dd><strong>State:</strong> Always false.
+
+ <dd><strong>Value:</strong> Always the string "<code
+ title="">false</code>".
+
<dt>If the <var title="">commandId</var> is <dfn id=insertparagraph
title=command-insertParagraph><code>insertParagraph</code></dfn>
- <dd><em><a href="#editing2">Editing hosts only.</a></em> The user agent
- must act as if the user had performed a <a
- href="#contenteditable-breakBlock">break block</a> editing action.
+ <dd><a href="#editing2">Editing hosts only.</a>
+ <dd><strong>Action:</strong> The user agent must act as if the user had
+ performed a <a href="#contenteditable-breakBlock">break block</a> editing
+ action.
+
+ <dd><strong>Enabled When:</strong> The document is <a href="#ready">ready
+ for editing host commands</a>.
+
+ <dd><strong>Indeterminate When:</strong> Never.
+
+ <dd><strong>State:</strong> Always false.
+
+ <dd><strong>Value:</strong> Always the string "<code
+ title="">false</code>".
+
<dt>If the <var title="">commandId</var> is <dfn id=inserttext
title=command-insertText><code>insertText</code></dfn>
- <dd><em><a href="#editing2">Editing hosts only.</a></em> The user agent
- must act as if the user had <a
+ <dd><a href="#editing2">Editing hosts only.</a>
+
+ <dd><strong>Action:</strong> The user agent must act as if the user had <a
href="#contenteditable-insertText">inserted text</a> corresponding to the
<var title="">value</var> parameter.
+ <dd><strong>Enabled When:</strong> The document is <a href="#ready">ready
+ for editing host commands</a>.
+
+ <dd><strong>Indeterminate When:</strong> Never.
+
+ <dd><strong>State:</strong> Always false.
+
+ <dd><strong>Value:</strong> Always the string "<code
+ title="">false</code>".
+
<dt>If the <var title="">commandId</var> is <code><var
title="">vendorID</var>-<var title="">customCommandID</var></code>
- <dd>User agents may implement vendor-specific extensions to this API.
- Vendor-specific extensions to the list of commands should use the syntax
- <code><var title="">vendorID</var>-<var
+ <dd><strong>Action:</strong> User agents may implement vendor-specific
+ extensions to this API. Vendor-specific extensions to the list of
+ commands should use the syntax <code><var title="">vendorID</var>-<var
title="">customCommandID</var></code> so as to prevent clashes between
extensions from different vendors and future additions to this
specification.
+ <dd><strong>Enabled When:</strong> UA-defined.
+
+ <dd><strong>Indeterminate When:</strong> UA-defined.
+
+ <dd><strong>State:</strong> UA-defined.
+
+ <dd><strong>Value:</strong> UA-defined.
+
<dt>If the <var title="">commandId</var> is something else
- <dd>User agents must do nothing.
+ <dd><strong>Action:</strong> User agents must do nothing.
+
+ <dd><strong>Enabled When:</strong> Never.
+
+ <dd><strong>Indeterminate When:</strong> Never.
+
+ <dd><strong>State:</strong> Always false.
+
+ <dd><strong>Value:</strong> Always the string "<code
+ title="">false</code>".
</dl>
<h2 id=comms><span class=secno>6. </span>Communication</h2>
Modified: source
===================================================================
--- source 2008-03-07 09:31:01 UTC (rev 1356)
+++ source 2008-03-07 12:08:25 UTC (rev 1357)
@@ -975,6 +975,11 @@
boolean <span title="dom-document-execCommand">execCommand</span>(in DOMString commandId);
boolean <span title="dom-document-execCommand">execCommand</span>(in DOMString commandId, in boolean doShowUI);
boolean <span title="dom-document-execCommand">execCommand</span>(in DOMString commandId, in boolean doShowUI, in DOMString value);
+ boolean <span title="dom-document-queryCommandEnabled">queryCommandEnabled</span>(in DOMString commandId);
+ boolean <span title="dom-document-queryCommandIndeterm">queryCommandIndeterm</span>(in DOMString commandId);
+ boolean <span title="dom-document-queryCommandState">queryCommandState</span>(in DOMString commandId);
+ boolean <span title="dom-document-queryCommandSupported">queryCommandSupported</span>(in DOMString commandId);
+ DOMString <span title="dom-document-queryCommandValue">queryCommandValue</span>(in DOMString commandId);
<span>Selection</span> <span title="dom-document-getSelection">getSelection</span>();
<!-- XXX we're not done here.
@@ -33008,141 +33013,281 @@
title="">doShowUI</var> parameter is always ignored, regardless of
its value. It is included for historical reasons only.</p>
- <p>When any of these methods are invoked, user agents must act as
- described in the list below.</p>
+ <p>When <code title="dom-document-execCommand">execCommand()</code>
+ is invoked, the user agent must follow the following steps:</p>
- <p>For actions marked "<dfn>editing hosts only</dfn>", if the
- selection is not entirely within an <span>editing host</span>, of if
- there is no selection and the caret is not inside an <span>editing
- host</span>, then the user agent must do nothing.</p>
+ <ol>
+ <li>If the given <var title="">commandId</var> maps to an entry
+ below that is marked as "<dfn>editing hosts only</dfn>", and the
+ document is not <span>ready for editing host commands</span>, do
+ nothing; abort these steps.</li>
+
+ <li>Otherwise, execute the "Action" listed below for the given <var
+ title="">commandId</var>.</li>
+
+ </ol>
+
+ <p>A document is <dfn>ready for editing host commands</dfn> if it
+ has a selection that is entirely within an <span>editing
+ host</span>, or if it has no selection but its caret is inside an
+ <span>editing host</span>.</p>
+
+ <p>The <dfn
+ title="dom-document-queryCommandEnabled"><code>queryCommandEnabled(<var
+ title="">commandId</var>)</code></dfn> method, when invoked, must
+ return true if the condition listed below under "Enabled When" for
+ the given <var title="">commandId</var> is true, and false
+ otherwise.</p>
+
+ <p>The <dfn
+ title="dom-document-queryCommandIndeterm"><code>queryCommandIndeterm(<var
+ title="">commandId</var>)</code></dfn> method, when invoked, must
+ return true if the condition listed below under "Indeterminate When"
+ for the given <var title="">commandId</var> is true, and false
+ otherwise.</p>
+
+ <p>The <dfn
+ title="dom-document-queryCommandState"><code>queryCommandState(<var
+ title="">commandId</var>)</code></dfn> method, when invoked, must
+ return the value expressed below under "State" for the given <var
+ title="">commandId</var>.</p>
+
+ <p>The <dfn
+ title="dom-document-queryCommandSupported"><code>queryCommandSupported(<var
+ title="">commandId</var>)</code></dfn> method, when invoked, must
+ return true if the given <var title="">commandId</var> is in the
+ list below, and false otherwise.</p>
+
+ <p>The <dfn
+ title="dom-document-queryCommandValue"><code>queryCommandValue(<var
+ title="">commandId</var>)</code></dfn> method, when invoked, must
+ return the value expressed below under "Value" for the given <var
+ title="">commandId</var>.</p>
+
+ <p>The commands are:</p>
+
<dl>
<dt>If the <var title="">commandId</var> is <dfn title="command-undo"><code>undo</code></dfn></dt>
- <dd>The user agent must <span title="do-undo">move back one
- step</span> in its <span>undo transaction history</span>, restoring
- the associated state. If there is no further undo information the
- user agent must do nothing. See the <span>undo history</span>.</dd>
+ <dd><strong>Action:</strong> The user agent must <span
+ title="do-undo">move back one step</span> in its <span>undo
+ transaction history</span>, restoring the associated state. If the
+ <span>undo position</span> is at the start of the <span>undo
+ transaction history</span>, the user agent must do nothing. See the
+ <span>undo history</span>.</dd>
+ <dd><strong>Enabled When:</strong> The <span>undo position</span>
+ is not at the start of the <span>undo transaction
+ history</span>.</dd>
+ <dd><strong>Indeterminate When:</strong> Never.</dd>
+ <dd><strong>State:</strong> Always false.</dd>
+ <dd><strong>Value:</strong> Always the string "<code title="">false</code>".</dd>
<dt>If the <var title="">commandId</var> is <dfn title="command-redo"><code>redo</code></dfn></dt>
- <dd>The user agent must <span title="do-redo">move forward one
- step</span> in its <span>undo transaction history</span>, restoring
- the associated state. If there is no further undo (well, "redo")
- information the user agent must do nothing. See the <span>undo
+ <dd><strong>Action:</strong> The user agent must <span
+ title="do-redo">move forward one step</span> in its <span>undo
+ transaction history</span>, restoring the associated state. If the
+ <span>undo position</span> is at the end of the <span>undo
+ transaction history</span>, the user agent must do nothing. See the
+ <span>undo history</span>.</dd>
+ <dd><strong>Enabled When:</strong> The <span>undo position</span>
+ is not at the end of the <span>undo transaction
history</span>.</dd>
+ <dd><strong>Indeterminate When:</strong> Never.</dd>
+ <dd><strong>State:</strong> Always false.</dd>
+ <dd><strong>Value:</strong> Always the string "<code title="">false</code>".</dd>
<dt>If the <var title="">commandId</var> is <dfn title="command-selectAll"><code>selectAll</code></dfn></dt>
- <dd>The user agent must change the selection so that all the
- content in the currently focused <span>editing host</span> is
- selected. If no <span>editing host</span> is focused, then the
- content of the entire document must be selected.</dd>
+ <dd><strong>Action:</strong> The user agent must change the
+ selection so that all the content in the currently focused
+ <span>editing host</span> is selected. If no <span>editing
+ host</span> is focused, then the content of the entire document
+ must be selected.</dd>
+ <dd><strong>Enabled When:</strong> Always.</dd>
+ <dd><strong>Indeterminate When:</strong> Never.</dd>
+ <dd><strong>State:</strong> Always false.</dd>
+ <dd><strong>Value:</strong> Always the string "<code title="">false</code>".</dd>
<dt>If the <var title="">commandId</var> is <dfn title="command-unselect"><code>unselect</code></dfn></dt>
- <dd><p>The user agent must change the selection so that nothing is
- selected.</p></dd>
+ <dd><strong>Action:</strong> The user agent must change the
+ selection so that nothing is selected.</dd>
+ <dd><strong>Enabled When:</strong> Always.</dd>
+ <dd><strong>Indeterminate When:</strong> Never.</dd>
+ <dd><strong>State:</strong> Always false.</dd>
+ <dd><strong>Value:</strong> Always the string "<code title="">false</code>".</dd>
<dt>If the <var title="">commandId</var> is <dfn title="command-superscript"><code>superscript</code></dfn></dt>
- <dd><em>Editing hosts only.</em> The user agent must act as if the
- user had requested that the selection <a
+ <dd><span>Editing hosts only.</span></dd>
+ <dd><strong>Action:</strong> The user agent must act as if the user
+ had requested that the selection <a
href="#contenteditable-wrapSemantic">be wrapped in the
semantics</a> of the <code>sup</code> element (or unwrapped, or, if
there is no selection, have that semantic inserted or removed
— the exact behaviour is UA-defined).</dd>
+ <dd><strong>Enabled When:</strong> The document is <span>ready for
+ editing host commands</span>.</dd>
+ <dd><strong>Indeterminate When:</strong> Never.</dd>
+ <dd><strong>State:</strong> True if the selection, or the caret, if
+ there is no selection, is, or is contained within, a
+ <code>sup</code> element. False otherwise.</dd>
+ <dd><strong>Value:</strong> The string "<code title="">true</code>"
+ if the expression given for the "State" above is true, the string
+ "<code title="">false</code>" otherwise.</dd>
<dt>If the <var title="">commandId</var> is <dfn title="command-subscript"><code>subscript</code></dfn></dt>
- <dd><em>Editing hosts only.</em> The user agent must act as if the
- user had requested that the selection <a
+ <dd><span>Editing hosts only.</span></dd>
+ <dd><strong>Action:</strong> The user agent must act as if the user
+ had requested that the selection <a
href="#contenteditable-wrapSemantic">be wrapped in the
- semantics</a> of the <em title=""><code>sub</code></em> element (or, again,
- unwrapped, or have that semantic inserted or removed, as defined by
- the UA).</dd>
+ semantics</a> of the <em title=""><code>sub</code></em> element
+ (or, again, unwrapped, or have that semantic inserted or removed,
+ as defined by the UA).</dd>
+ <dd><strong>Enabled When:</strong> The document is <span>ready for
+ editing host commands</span>.</dd>
+ <dd><strong>Indeterminate When:</strong> Never.</dd>
+ <dd><strong>State:</strong> True if the selection, or the caret, if
+ there is no selection, is, or is contained within, a
+ <code>sub</code> element. False otherwise.</dd>
+ <dd><strong>Value:</strong> The string "<code title="">true</code>"
+ if the expression given for the "State" above is true, the string
+ "<code title="">false</code>" otherwise.</dd>
<dt>If the <var title="">commandId</var> is <dfn title="command-formatBlock"><code>formatBlock</code></dfn></dt>
- <dd><p><em>Editing hosts only.</em> This command changes the
- semantics of the blocks containing the selection.</p>
+ <dd><span>Editing hosts only.</span></dd>
+ <dd>
- <p>If there is no selection, then, where in the description below
- refers to the selection, the user agent must act as if the
- selection was an empty range at the caret position.</p>
+ <p><strong>Action:</strong> This command changes the semantics of
+ the blocks containing the selection.</p>
- <p>If the <var title="">value</var> parameter is not specified or
- has a value other than one of the following literal strings:</p>
- <ul class="brief">
- <li><code title=""><address></code></li>
- <li><code title=""><aside></code></li>
- <li><code title=""><h1></code></li>
- <li><code title=""><h2></code></li>
- <li><code title=""><h3></code></li>
- <li><code title=""><h4></code></li>
- <li><code title=""><h5></code></li>
- <li><code title=""><h6></code></li>
- <li><code title=""><nav></code></li>
- <li><code title=""><p></code></li>
- <li><code title=""><pre></code></li>
- <!-- XXX this list is incomplete -->
- </ul>
- <p>...then the user agent must do nothing.</p>
+ <p>If there is no selection, then, where in the description below
+ refers to the selection, the user agent must act as if the
+ selection was an empty range at the caret position.</p>
- <p>Otherwise, the user agent must, for every position in the
- selection, take the furthest <span>flow content</span> ancestor
- element of that position that contains only <span>phrasing
- content</span>, and, if that element is a descendant of the editing
- host, rename it (as if the <code
- title="">Element.renameNode()</code> method had been used)
- according to the <var title="">value</var>, by stripping the
- leading <code><</code> character and the trailing
- <code>></code> character and using the rest as the new tag name,
- using the HTML namespace.</p></dd>
+ <p>If the <var title="">value</var> parameter is not specified or
+ has a value other than one of the following literal strings:</p>
+ <ul class="brief">
+ <li><code title=""><address></code></li>
+ <li><code title=""><aside></code></li>
+ <li><code title=""><h1></code></li>
+ <li><code title=""><h2></code></li>
+ <li><code title=""><h3></code></li>
+ <li><code title=""><h4></code></li>
+ <li><code title=""><h5></code></li>
+ <li><code title=""><h6></code></li>
+ <li><code title=""><nav></code></li>
+ <li><code title=""><p></code></li>
+ <li><code title=""><pre></code></li>
+ <!-- XXX this list is incomplete -->
+ </ul>
+
+ <p>...then the user agent must do nothing.</p>
+
+ <p>Otherwise, the user agent must, for every position in the
+ selection, take the furthest <span>flow content</span> ancestor
+ element of that position that contains only <span>phrasing
+ content</span>, and, if that element is a descendant of the
+ editing host, rename it (as if the <code
+ title="">Element.renameNode()</code> method had been used)
+ according to the <var title="">value</var>, by stripping the
+ leading <code><</code> character and the trailing
+ <code>></code> character and using the rest as the new tag
+ name, using the HTML namespace.</p>
+
+ </dd>
+ <dd><strong>Enabled When:</strong> The document is <span>ready for
+ editing host commands</span>.</dd>
+ <dd><strong>Indeterminate When:</strong> Never.</dd>
+ <dd><strong>State:</strong> Always false.</dd>
+ <dd><strong>Value:</strong> Always the string "<code title="">false</code>".</dd>
+
<dt>If the <var title="">commandId</var> is <dfn title="command-delete"><code>delete</code></dfn></dt>
- <dd><em>Editing hosts only.</em> The user agent must act as if the
- user had performed <a href="#contenteditable-delete">a backspace
+ <dd><span>Editing hosts only.</span></dd>
+ <dd><strong>Action:</strong> The user agent must act as if the user
+ had performed <a href="#contenteditable-delete">a backspace
operation</a>.</dd>
+ <dd><strong>Enabled When:</strong> The document is <span>ready for
+ editing host commands</span>.</dd>
+ <dd><strong>Indeterminate When:</strong> Never.</dd>
+ <dd><strong>State:</strong> Always false.</dd>
+ <dd><strong>Value:</strong> Always the string "<code title="">false</code>".</dd>
<dt>If the <var title="">commandId</var> is <dfn title="command-forwardDelete"><code>forwardDelete</code></dfn></dt>
- <dd><em>Editing hosts only.</em> The user agent must act as if the
- user had performed <a href="#contenteditable-delete">a forward
- delete operation</a>.</dd>
+ <dd><span>Editing hosts only.</span></dd>
+ <dd><strong>Action:</strong> The user agent must act as if the user
+ had performed <a href="#contenteditable-delete">a forward delete
+ operation</a>.</dd>
+ <dd><strong>Enabled When:</strong> The document is <span>ready for
+ editing host commands</span>.</dd>
+ <dd><strong>Indeterminate When:</strong> Never.</dd>
+ <dd><strong>State:</strong> Always false.</dd>
+ <dd><strong>Value:</strong> Always the string "<code title="">false</code>".</dd>
<dt>If the <var title="">commandId</var> is <dfn title="command-insertLineBreak"><code>insertLineBreak</code></dfn></dt>
- <dd><em>Editing hosts only.</em> The user agent must act as if the
- user had <a href="#contenteditable-br">requested a line
+ <dd><span>Editing hosts only.</span></dd>
+ <dd><strong>Action:</strong> The user agent must act as if the user
+ had <a href="#contenteditable-br">requested a line
separator</a>.</dd>
+ <dd><strong>Enabled When:</strong> The document is <span>ready for
+ editing host commands</span>.</dd>
+ <dd><strong>Indeterminate When:</strong> Never.</dd>
+ <dd><strong>State:</strong> Always false.</dd>
+ <dd><strong>Value:</strong> Always the string "<code title="">false</code>".</dd>
<dt>If the <var title="">commandId</var> is <dfn title="command-insertParagraph"><code>insertParagraph</code></dfn></dt>
- <dd><em>Editing hosts only.</em> The user agent must act as if the
- user had performed a <a href="#contenteditable-breakBlock">break
+ <dd><span>Editing hosts only.</span></dd>
+ <dd><strong>Action:</strong> The user agent must act as if the user
+ had performed a <a href="#contenteditable-breakBlock">break
block</a> editing action.</dd>
+ <dd><strong>Enabled When:</strong> The document is <span>ready for
+ editing host commands</span>.</dd>
+ <dd><strong>Indeterminate When:</strong> Never.</dd>
+ <dd><strong>State:</strong> Always false.</dd>
+ <dd><strong>Value:</strong> Always the string "<code title="">false</code>".</dd>
<dt>If the <var title="">commandId</var> is <dfn title="command-insertText"><code>insertText</code></dfn></dt>
- <dd><em>Editing hosts only.</em> The user agent must act as if the
- user had <a href="#contenteditable-insertText">inserted text</a>
+ <dd><span>Editing hosts only.</span></dd>
+ <dd><strong>Action:</strong> The user agent must act as if the user
+ had <a href="#contenteditable-insertText">inserted text</a>
corresponding to the <var title="">value</var> parameter.</dd>
+ <dd><strong>Enabled When:</strong> The document is <span>ready for
+ editing host commands</span>.</dd>
+ <dd><strong>Indeterminate When:</strong> Never.</dd>
+ <dd><strong>State:</strong> Always false.</dd>
+ <dd><strong>Value:</strong> Always the string "<code title="">false</code>".</dd>
<dt>If the <var title="">commandId</var> is <code><var title="">vendorID</var>-<var title="">customCommandID</var></code></dt>
- <dd>User agents may implement vendor-specific extensions to this
- API. Vendor-specific extensions to the list of commands should use
- the syntax <code><var title="">vendorID</var>-<var
- title="">customCommandID</var></code> so as to prevent clashes
- between extensions from different vendors and future additions to
- this specification.</dd>
+ <dd><strong>Action:</strong> User agents may implement
+ vendor-specific extensions to this API. Vendor-specific extensions
+ to the list of commands should use the syntax <code><var
+ title="">vendorID</var>-<var title="">customCommandID</var></code>
+ so as to prevent clashes between extensions from different vendors
+ and future additions to this specification.</dd>
+ <dd><strong>Enabled When:</strong> UA-defined.</dd>
+ <dd><strong>Indeterminate When:</strong> UA-defined.</dd>
+ <dd><strong>State:</strong> UA-defined.</dd>
+ <dd><strong>Value:</strong> UA-defined.</dd>
<dt>If the <var title="">commandId</var> is something else</dt>
- <dd>User agents must do nothing.</dd>
+ <dd><strong>Action:</strong> User agents must do nothing.</dd>
+ <dd><strong>Enabled When:</strong> Never.</dd>
+ <dd><strong>Indeterminate When:</strong> Never.</dd>
+ <dd><strong>State:</strong> Always false.</dd>
+ <dd><strong>Value:</strong> Always the string "<code title="">false</code>".</dd>
</dl>
More information about the Commit-Watchers
mailing list