[html5] r3298 - [] (0) Fold command.click() into the regular HTMLElement.click().
whatwg at whatwg.org
whatwg at whatwg.org
Tue Jun 16 22:34:53 PDT 2009
Author: ianh
Date: 2009-06-16 22:34:51 -0700 (Tue, 16 Jun 2009)
New Revision: 3298
Modified:
index
source
Log:
[] (0) Fold command.click() into the regular HTMLElement.click().
Modified: index
===================================================================
--- index 2009-06-17 05:22:51 UTC (rev 3297)
+++ index 2009-06-17 05:34:51 UTC (rev 3298)
@@ -8141,6 +8141,10 @@
events dispatched by author script. However, the <code title=dom-click><a href=#dom-click>click()</a></code> method can be used to make it
happen programmatically.</p>
+ <p>When a user agent is to <dfn id=run-pre-click-activation-steps>run pre-click activation steps</dfn>
+ on an element, it must run the <dfn id=pre-click-activation-steps>pre-click activation steps</dfn>
+ defined for that element, if any.</p>
+
<p>When a user agent is to <dfn id=run-post-click-activation-steps>run post-click activation
steps</dfn> on an element, the user agent must <a href=#fire-a-simple-event>fire a simple
event</a> called <code title=event-DOMActivate>DOMActivate</code> that is cancelable at
@@ -8149,10 +8153,6 @@
canceled, the user agent must <a href=#run-canceled-activation-steps>run canceled activation
steps</a> on the element instead.</p>
- <p>When a user agent is to <dfn id=run-pre-click-activation-steps>run pre-click activation steps</dfn>
- on an element, it must run the <dfn id=pre-click-activation-steps>pre-click activation steps</dfn>
- defined for that element, if any.</p>
-
<p>When a user agent is to <dfn id=run-canceled-activation-steps>run canceled activation steps</dfn>
on an element, it must run the <dfn id=canceled-activation-steps>canceled activation steps</dfn>
defined for that element, if any.</p>
@@ -38245,7 +38245,6 @@
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>;<!--
attribute boolean <span title="dom-command-default">default</span>;-->
- void <a href=#dom-command-click title=dom-command-click>click</a>(); // shadows <code><a href=#htmlelement>HTMLElement</a></code>.<code title=dom-click><a href=#dom-click>click()</a></code>
};</pre>
</dd>
</dl><p>The <code><a href=#the-command>command</a></code> element represents a command that the user
@@ -38351,19 +38350,17 @@
DOM attributes must <a href=#reflect>reflect</a> the respective content
attributes of the same name.</p>
- <p>The <dfn id=dom-command-click title=dom-command-click><code>click()</code></dfn>
- method's behavior 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 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>
- <!-- XXX should integrate this better with the normal click() method -->
-
<dl class=switch><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
remove that attribute. Otherwise, the UA must add a <code title=attr-command-checked><a href=#attr-command-checked>checked</a></code> attribute, with the
literal value <code title="">checked</code>. The UA must then
- <a href=#fire-a-click-event>fire a <code title="">click</code> event</a> at the
+ <a href=#fire-a-click-event>fire a <code title=event-click>click</code> event</a> at the
element.</dd>
@@ -38375,19 +38372,17 @@
<code><a href=#the-command>command</a></code> element, if that element has a <code title=attr-command-radiogroup><a href=#attr-command-radiogroup>radiogroup</a></code> attribute whose
value exactly matches the current element's (treating missing <code title=attr-command-radiogroup><a href=#attr-command-radiogroup>radiogroup</a></code> attributes as if
they were the empty string), and has a <code title=attr-command-checked><a href=#attr-command-checked>checked</a></code> attribute, must remove
- that attribute and <a href=#fire-a-click-event>fire a <code title="">click</code>
- event</a> at the element.</p>
+ that attribute.</p>
<p>Then, the element's <code title=attr-command-checked><a href=#attr-command-checked>checked</a></code> attribute attribute
must be set to the literal value <code title="">checked</code> and
- a <span title="file a click event"><code title="">click</code>
- event must be fired</span> at the element.</dd>
+ the user agent must <a href=#fire-a-click-event>fire a <code title=event-click>click</code>
+ event</a> at the element.</dd>
<dt>Otherwise</dt>
- <dd><p>The UA must <a href=#fire-a-click-event>fire a <code title="">click</code>
- event</a> at the element.</dd>
+ <dd><p>The element has no <a href=#activation-behavior>activation behavior</a>.</dd>
</dl><p class=note>Firing a synthetic <code title=event-click>click</code> event at the element does not cause
any of the actions described above to happen.</p>
@@ -39241,7 +39236,7 @@
of the command is always false. (The command is never checked.)</p>
<p>The <a href=#command-facet-action title=command-facet-Action>Action</a> of the
- command is to <a href=#fire-a-click-event title="fire a click event">fire a <code title="">click</code> event</a> at the element.</p>
+ command is to <a href=#fire-a-click-event title="fire a click event">fire a <code title=event-click>click</code> event</a> at the element.</p>
<h5 id=using-the-button-element-to-define-a-command><span class=secno>4.11.6.2 </span><dfn title=button-command>Using the <code>button</code> element to define a command</dfn></h5>
@@ -39315,7 +39310,7 @@
attribute, and false otherwise.</p>
<p>The <a href=#command-facet-action title=command-facet-Action>Action</a> of the
- command is to <a href=#fire-a-click-event title="fire a click event">fire a <code title="">click</code> event</a> at the element.</p> <!-- XXX this
+ command is to <a href=#fire-a-click-event title="fire a click event">fire a <code title=event-click>click</code> event</a> at the element.</p> <!-- XXX this
is probably wrong for radio and checkbox types, depending on how we
define <input>. -->
@@ -39420,12 +39415,15 @@
otherwise.</p>
<p>The <a href=#command-facet-action title=command-facet-Action>Action</a> of the
- command is to invoke the behavior described in the definition of
- the <code title=dom-command-click><a href=#dom-command-click>click()</a></code> method of the
- <code><a href=#htmlcommandelement>HTMLCommandElement</a></code> interface.</p> <!-- XXX update to
- point to dom-click when we remove dom-command-click -->
+ command, if the element has a defined <a href=#activation-behavior>activation
+ behavior</a>, is to <a href=#run-synthetic-click-activation-steps>run synthetic click activation
+ steps</a> on the element. Otherwise, it is just to <a href=#fire-a-click-event>fire a
+ <code title=event-click>click</code> event</a> at the
+ element.</p>
+
+
<h5 id=using-the-bb-element-to-define-a-command><span class=secno>4.11.6.6 </span><dfn title=bb-command>Using the <code>bb</code> element to define a command</dfn></h5>
<p>A <code><a href=#the-bb-element>bb</a></code> element always <a href=#concept-command title=concept-command>defines a command</a>.</p>
Modified: source
===================================================================
--- source 2009-06-17 05:22:51 UTC (rev 3297)
+++ source 2009-06-17 05:34:51 UTC (rev 3298)
@@ -8257,6 +8257,10 @@
title="dom-click">click()</code> method can be used to make it
happen programmatically.</p>
+ <p>When a user agent is to <dfn>run pre-click activation steps</dfn>
+ on an element, it must run the <dfn>pre-click activation steps</dfn>
+ defined for that element, if any.</p>
+
<p>When a user agent is to <dfn>run post-click activation
steps</dfn> on an element, the user agent must <span>fire a simple
event</span> called <code
@@ -8266,10 +8270,6 @@
canceled, the user agent must <span>run canceled activation
steps</span> on the element instead.</p>
- <p>When a user agent is to <dfn>run pre-click activation steps</dfn>
- on an element, it must run the <dfn>pre-click activation steps</dfn>
- defined for that element, if any.</p>
-
<p>When a user agent is to <dfn>run canceled activation steps</dfn>
on an element, it must run the <dfn>canceled activation steps</dfn>
defined for that element, if any.</p>
@@ -42926,7 +42926,6 @@
attribute boolean <span title="dom-command-checked">checked</span>;
attribute DOMString <span title="dom-command-radiogroup">radiogroup</span>;<!--
attribute boolean <span title="dom-command-default">default</span>;-->
- void <span title="dom-command-click">click</span>(); // shadows <code>HTMLElement</code>.<code title="dom-click">click()</code>
};</pre>
</dd>
</dl>
@@ -43059,13 +43058,10 @@
DOM attributes must <span>reflect</span> the respective content
attributes of the same name.</p>
- <p>The <dfn title="dom-command-click"><code>click()</code></dfn>
- method's behavior depends on the value of the <code
- title="attr-command-type">type</code> attribute of the element, as
- follows:</p>
+ <p>The element's <span>activation behavior</span> depends on the
+ value of the <code title="attr-command-type">type</code> attribute
+ of the element, as follows:</p>
- <!-- XXX should integrate this better with the normal click() method -->
-
<dl class="switch">
<dt>If the <code title="attr-command-type">type</code> attribute is
@@ -43077,7 +43073,7 @@
remove that attribute. Otherwise, the UA must add a <code
title="attr-command-checked">checked</code> attribute, with the
literal value <code title="">checked</code>. The UA must then
- <span>fire a <code title="">click</code> event</span> at the
+ <span>fire a <code title="event-click">click</code> event</span> at the
element.</p></dd>
@@ -43093,20 +43089,18 @@
title="attr-command-radiogroup">radiogroup</code> attributes as if
they were the empty string), and has a <code
title="attr-command-checked">checked</code> attribute, must remove
- that attribute and <span>fire a <code title="">click</code>
- event</span> at the element.</p>
+ that attribute.</p>
<p>Then, the element's <code
title="attr-command-checked">checked</code> attribute attribute
must be set to the literal value <code title="">checked</code> and
- a <span title="file a click event"><code title="">click</code>
- event must be fired</span> at the element.</p></dd>
+ the user agent must <span>fire a <code title="event-click">click</code>
+ event</span> at the element.</p></dd>
<dt>Otherwise</dt>
- <dd><p>The UA must <span>fire a <code title="">click</code>
- event</span> at the element.</p></dd>
+ <dd><p>The element has no <span>activation behavior</span>.</p></dd>
</dl>
@@ -44070,7 +44064,7 @@
<p>The <span title="command-facet-Action">Action</span> of the
command is to <span title="fire a click event">fire a <code
- title="">click</code> event</span> at the element.</p>
+ title="event-click">click</code> event</span> at the element.</p>
<h5><dfn title="button-command">Using the <code>button</code> element to define a command</dfn></h5>
@@ -44172,7 +44166,7 @@
<p>The <span title="command-facet-Action">Action</span> of the
command is to <span title="fire a click event">fire a <code
- title="">click</code> event</span> at the element.</p> <!-- XXX this
+ title="event-click">click</code> event</span> at the element.</p> <!-- XXX this
is probably wrong for radio and checkbox types, depending on how we
define <input>. -->
@@ -44298,12 +44292,15 @@
otherwise.</p>
<p>The <span title="command-facet-Action">Action</span> of the
- command is to invoke the behavior described in the definition of
- the <code title="dom-command-click">click()</code> method of the
- <code>HTMLCommandElement</code> interface.</p> <!-- XXX update to
- point to dom-click when we remove dom-command-click -->
+ command, if the element has a defined <span>activation
+ behavior</span>, is to <span>run synthetic click activation
+ steps</span> on the element. Otherwise, it is just to <span>fire a
+ <code title="event-click">click</code> event</span> at the
+ element.</p>
+
+
<h5><dfn title="bb-command">Using the <code>bb</code> element to define a command</dfn></h5>
<p>A <code>bb</code> element always <span
More information about the Commit-Watchers
mailing list