--- a/html/DOM3-Events.html Tue Sep 07 17:40:03 2010 +0900
+++ b/html/DOM3-Events.html Fri Sep 10 18:28:36 2010 +0900
@@ -25,16 +25,16 @@
</p>
<h1 id="Overview-title">Document Object Model (DOM) Level 3 Events Specification</h1>
<!-- @@@ -->
- <h2 id="Overview-W3C-doctype">W3C Editor's Draft <time datetime="2010-04-07">07 September 2010</time></h2>
+ <h2 id="Overview-W3C-doctype">W3C Editor's Draft <time datetime="2010-04-10">10 September 2010</time></h2>
<dl>
<dt>This version:</dt>
- <dd><a href="http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html?rev=1.144">http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html?rev=1.144</a></dd>
+ <dd><a href="http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html?rev=1.145">http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html?rev=1.145</a></dd>
<dt>Latest stable version:</dt>
<dd><a href="http://www.w3.org/TR/DOM-Level-3-Events">http://www.w3.org/TR/DOM-Level-3-Events</a></dd>
<dt>Previous version:</dt>
- <dd><a href="http://dev.w3.org/cvsweb/~checkout~/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html?rev=1.143">http://dev.w3.org/cvsweb/~checkout~/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html?rev=1.143</a></dd>
+ <dd><a href="http://dev.w3.org/cvsweb/~checkout~/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html?rev=1.144">http://dev.w3.org/cvsweb/~checkout~/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html?rev=1.144</a></dd>
<dt>Editor's Draft:</dt>
<dd><a href="http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html">http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html</a></dd>
@@ -46,8 +46,12 @@
<dd>Philippe Le Hégaret, <em>W3C (until November 2003)</em></dd>
<dd>Tom Pixley, <em>Netscape Communications Corporation (until July 2002)</em></dd>
</dl>
- <p class="copyright" id="copyright-copy-2009-w3creg-mit-ercim-kei"><a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a>
- © 2009 <a href="http://www.w3.org/"><acronym title="World Wide Web Consortium">W3C</acronym></a><sup>®</sup> (<a href="http://www.csail.mit.edu/"><acronym title="Massachusetts Institute of Technology">MIT</acronym></a>, <a href="http://www.ercim.org/"><acronym title="European Research Consortium for Informatics and Mathematics">ERCIM</acronym></a>, <a href="http://www.keio.ac.jp/">Keio</a>), All Rights Reserved. W3C <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>,
+ <p class="copyright" id="copyright-copy-2010-w3creg-mit-ercim-kei">
+ <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a>
+ © 2010 <a href="http://www.w3.org/"><acronym title="World Wide Web Consortium">W3C</acronym></a><sup>®</sup>
+ (<a href="http://www.csail.mit.edu/"><acronym title="Massachusetts Institute of Technology">MIT</acronym></a>,
+ <a href="http://www.ercim.org/"><acronym title="European Research Consortium for Informatics and Mathematics">ERCIM</acronym></a>,
+ <a href="http://www.keio.ac.jp/">Keio</a>), All Rights Reserved. W3C <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>,
<a href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a>
and <a href="http://www.w3.org/Consortium/Legal/copyright-documents">document
use</a> rules apply.</p>
@@ -59,19 +63,15 @@
<div class="abstract">
<p>This specification defines the Document Object Model Events Level 3, a generic platform- and language-neutral event system which allows registration of event handlers, describes event flow through a tree structure, and provides basic contextual information for each event. The Document Object Model Events Level 3 builds on the Document Object Model Events Level 2 [<a href="#references-DOM2Events">DOM2 Events</a>].</p>
</div>
+
<h2 class="no-num no-toc" id="sotd">Status of This Document</h2>
<div>
- <p><em>This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the <a href="http://www.w3.org/TR/">W3C technical reports index</a> at http://www.w3.org/TR/.</em></p>
- <p>Publication as a Working Draft does not imply endorsement by the W3C Membership. This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.</p>
- <p id="this-document-was-produced-by-a-group-op">This document was
- produced by a group operating under the <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5 February
- 2004 W3C Patent Policy</a>. W3C maintains a <a href="http://www.w3.org/2004/01/pp-impl/42538/status" rel="disclosure">public list of any patent disclosures</a> made in
- connection with the deliverables of the group; that page also includes
- instructions for disclosing a patent. An individual who has actual
- knowledge of a patent which the individual believes contains <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential">Essential
- Claim(s)</a> must disclose the information in accordance with <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure">section
- 6 of the W3C Patent Policy</a>.</p>
- <p id="working-draft">This is an Editor's Draft version of the “Document Object Model (DOM) Level 3 Events” specification. This document was previously published as a W3C Note, pending further feedback from implementers, and is now being revised to reflect the current state of implementation. It is expected that this specification will progress to Recommendation status.</p>
+ <p><em>This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the <a href="http://www.w3.org/TR/">W3C technical reports index</a> at http://www.w3.org/TR/.</em></p>
+
+ <p>This document is the Editor's Draft of a Last Call Working Draft of the Document Object Model Level 3 Events (DOM3 Events) specification. This document was previously published as a W3C Note, pending further feedback from implementers, and is now being revised to reflect the current state of implementation. It is expected that this specification will progress to W3C Recommendation status after review and refinement.</p>
+ <p>The <a href="http://www.w3.org/2008/webapps/">Web Applications Working Group</a> (WebApps WG) believes this specification to be feature complete, subject to further feedback during the Last Call period. The Last Call period extends through 18 October 2010. The public is encouraged to send comments to the WebApps Working Group's public mailing list for DOM specifications <a href="mailto:www-dom@w3.org">www-dom@w3.org</a> (<a href="http://lists.w3.org/Archives/Public/www-dom/">archive</a>). See <a href="http://www.w3.org/Mail/">W3C mailing list and archive usage guidelines</a>.</p>
+
+
<p id="this-document-is-produced-by-the-web-app">This document is produced
by the <a href="http://www.w3.org/2008/webapps/">Web Applications WG</a>,
part of the <a href="http://www.w3.org/2006/rwc/Activity">Rich Web
@@ -81,15 +81,13 @@
W3C Membership. This is a draft document and may be updated, replaced or
obsoleted by other documents at any time. It is inappropriate to cite
this document as other than work in progress.</p>
- <p id="latest-editors-draft"><strong>You can find the
- latest <a href="http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html">Editor's Draft</a>
- of this document in the <a href="http://dev.w3.org/">W3C's CVS
- repository</a>, which is updated on a regular basis.</strong> The
- public is encouraged to send comments to the WebApps Working Group's
- public mailing list for DOM specifications <a href="mailto:www-dom@w3.org">www-dom@w3.org</a> (<a href="http://lists.w3.org/Archives/Public/www-dom/">archive</a>).
- See <a href="http://www.w3.org/Mail/">W3C mailing list and archive usage
- guidelines</a>. <!-- A detailed <a href="http://dev.w3.org/cvsweb/2009/dom/">list of changes</a>
- from the previous version is also available from the W3C's CVS server. --></p>
+
+ <p id="latest-editors-draft"><strong>You can find the latest <a href="http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html">Editor's Draft</a> of this document in the <a href="http://dev.w3.org/">W3C's CVS repository</a>, which is updated on a regular basis.</strong></p>
+
+
+ <p>Publication as a Working Draft does not imply endorsement by the W3C Membership. This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.</p>
+ <p id="this-document-was-produced-by-a-group-op">This document was produced by a group operating under the <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5 February 2004 W3C Patent Policy</a>. W3C maintains a <a href="http://www.w3.org/2004/01/pp-impl/42538/status" rel="disclosure">public list of any patent disclosures</a> made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential">Essential Claim(s)</a> must disclose the information in accordance with <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure">section 6 of the W3C Patent Policy</a>.</p>
+
<p id="unstable"><strong class="redNote">Implementers should be aware that this document is not
stable.</strong> Implementers who are not taking part in the discussions
are likely to find the specification changing out from under them in
@@ -170,7 +168,7 @@
<li><a class="eventtype" href="#event-type-DOMFocusIn"><code>DOMFocusIn</code> event</a></li>
<li><a class="eventtype" href="#event-type-DOMFocusOut"><code>DOMFocusOut</code> event</a></li>
<li><a class="eventtype" href="#event-type-focus"><code>focus</code> event</a></li>
- <li><a class="eventtype" href="#event-type-focusin"><code>focusin</code> event</a></li>
+ <li><a class="eventtype" href="#event-type-focusIn"><code>focusin</code> event</a></li>
<li><a class="eventtype" href="#event-type-focusout"><code>focusout</code> event</a></li>
</ul>
</li>
@@ -332,7 +330,7 @@
“MAY”, and
“OPTIONAL” are to be interpreted as
described in <a href="http://www.ietf.org/rfc/rfc2119.txt">RFC 2119</a>
- [<a href="ref-RFC2119">RFC2119</a>].
+ [<a href="#ref-rfc2119">RFC2119</a>].
However, for readability, these words do not necessarily appear in uppercase in this specification.</p>
<p>This specification is to be understood in the context of the DOM Level 3 Core specification [<cite><a class="normative" href="#references-DOMCore">DOM3 Core</a></cite>] and the general considerations for DOM implementations apply. For example, behavior in exceptional circumstances (such as when a <code>null</code> argument is passed when <code>null</code> was not expected) is discussed under <a class="normative" href="http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-17189187"><em>DOMException</em></a>, and handling of <a class="def" href="#glossary-namespaceURI">namespace URIs</a> is discussed in <a class="normative" href="http://www.w3.org/TR/DOM-Level-3-Core/core.html#Namespaces-Considerations"><em>XML Namespaces</em></a>. For additional information about <a class="normative" href="http://www.w3.org/TR/DOM-Level-3-Core/introduction.html#ID-Conformance"><em>conformance</em></a>, please see the DOM Level 3 Core specification [<cite><a class="normative" href="#references-DOMCore">DOM3 Core</a></cite>]. A <a class="def" href="#glossary-user-agent">user agent</a> is not required to conform to the entirety of another specification in order to conform to this specification, but it must conform to the specific parts of any other specification which are called out in this specification (e.g. a conforming DOM3 Events <a class="def" href="#glossary-user-agent">user agent</a> must support the <code>DOMString</code> data type as defined in DOM3 Core, but need not support every method or data type defined in DOM3 Core in order to conform to DOM3 Events).</p>
<p>This specification defines several classes of conformance for different <a class="def" href="#glossary-user-agent">user agents</a>, specifications, and content authors:</p>
@@ -402,7 +400,7 @@
<div>
<h3><a id="style-conventions" href="#style-conventions">1.4 Stylistic Conventions</a></h3>
- <p>The following stylistic conventions are followed in this specification, per the <a href="http://www.w3.org/S /spec-conventions.html">Proposed W3C Specification Conventions</a>:</p>
+ <p>The following stylistic conventions are followed in this specification, per the <a href="http://www.w3.org/People/Schepers/spec-conventions.html">Proposed W3C Specification Conventions</a>:</p>
<div style="margin-left: 3em;">
<p class=""><code>'This is a keyword or value'</code></p>
@@ -633,7 +631,7 @@
<div>
<h3><a id="event-flow-default-cancel" href="#event-flow-default-cancel">3.2 Default actions and cancelable events</a></h3>
- <p>Event objects may have one or more <a class="def" href="#glossary-default-action">default actions</a> associated with them. These are actions the implementation must perform in combination with the dispatch of the event object. An example is the [<cite><a class="informative" href="#references-HTML5">HTML5</a></cite>] form element. When the user submits the form (e.g. by pressing on a submit button), the event <a class="eventtype" href="#event-type-submit"><code>submit</code></a> shall be dispatched to the element and the <a class="def" href="#glossary-default-action">default action</a> for this <a class="def" href="#glossary-event-type">event type</a> shall be generally to send a request to a Web server with the parameters from the form.</p>
+ <p>Event objects may have one or more <a class="def" href="#glossary-default-action">default actions</a> associated with them. These are actions the implementation must perform in combination with the dispatch of the event object. An example is the [<cite><a class="informative" href="#references-HTML5">HTML5</a></cite>] form element. When the user submits the form (e.g. by pressing on a submit button), the HTML event <code class="eventtype">submit</code> should be dispatched to the element and the <a class="def" href="#glossary-default-action">default action</a> for this <a class="def" href="#glossary-event-type">event type</a> shall be generally to send a request to a Web server with the parameters from the form.</p>
<p><a class="def" href="#glossary-default-action">Default actions</a> should be performed after the event dispatch has been completed, but in exceptional cases also immediately before the event is dispatched.</p>
<span class="issue"><strong>Issue:</strong> insert example here: <input type="checkbox">'s .checked handling comes to mind.
.checked is changed just before 'click' event is dispatched, and if
@@ -646,7 +644,7 @@
<h3><a id="sync-async" href="#sync-async">3.3 Synchronous and asynchronous events</a></h3>
<p>Events may occur either synchronously (<em>"sync"</em>) or asynchronously (<em>"async"</em>).</p>
- <p>Events which are synchronous must be treated as if they are in a virtual queue in a first-in-first-out model, ordered by sequence of temporal occurrence, with respect to other events, to changes in the DOM, and to user interaction. Each event in this virtual queue must be delayed until the previous event has completed its propagation behavior, or been canceled. Some sync events are driven by a specific device or process, such as mouse button events; these events are governed by the <a class="def" href="#glossary-proximal-event-order">event order</a> algorithms defined for that set of events, and a user agent must dispatch these events in the defined order.</p>
+ <p>Events which are synchronous must be treated as if they are in a virtual queue in a first-in-first-out model, ordered by sequence of temporal occurrence, with respect to other events, to changes in the DOM, and to user interaction. Each event in this virtual queue must be delayed until the previous event has completed its propagation behavior, or been canceled. Some sync events are driven by a specific device or process, such as mouse button events; these events are governed by the <a class="def" href="#glossary-event-order">event order</a> algorithms defined for that set of events, and a user agent must dispatch these events in the defined order.</p>
<p class="example" id="example-sync"><strong>Example:</strong> A user double-clicks a passage of text to select a word, then presses the <code class="value">'delete'</code> key to erase the word, triggering the following synchronous sequence of events: <a class="eventtype" href="#event-type-mousedown"><code>mousedown</code></a>, <a class="eventtype" href="#event-type-mouseup"><code>mouseup</code></a>, <a class="eventtype" href="#event-type-click"><code>click</code></a>, <a class="eventtype" href="#event-type-mousedown"><code>mousedown</code></a>, <a class="eventtype" href="#event-type-mouseup"><code>mouseup</code></a>, <a class="eventtype" href="#event-type-click"><code>click</code></a>, <a class="eventtype" href="#event-type-dblclick"><code>dblclick</code></a>, <a class="eventtype" href="#event-type-select"><code>select</code></a>, <a class="eventtype" href="#event-type-keydown"><code>keydown</code></a>, <a class="eventtype" href="#event-type-DOMCharacterDataModified"><code>DOMCharacterDataModified</code></a>. Each of these events are fired in the sequence initiated by the user's actions.</p>
<p>Events which are asynchronous may be dispatched as the results of the action are completed, with no relation to other events, to other changes in the DOM, nor to user interaction.</p>
<p class="example" id="example-async">
@@ -659,9 +657,9 @@
<div>
<h4><a id="event-order-and-loops" href="#event-order-and-loops">3.3.1 Event order and event loops</a></h4>
- <p>Most events take place in a sequential context. HTML5 [<cite><a class="informative" href="#references-HTML5">HTML5</a></cite>] defines its event operations in terms of an event loop mechanism, in which events of all types are fed into different <em>task queues</em>. This specification does not define events in terms of this event loop mechanism, but it is compatible with this mechanism. Instead, this specification defines several operation-specific <a class="def" href="#glossary-proximal-event-order">event orders</a>.</p>
- <p>Using the terminology of HTML5, each independent device, such as a mouse or keyboard, should be treated as a <em>task source</em> which feeds into the appropriate <em>task queue</em>, in the order defined by the <a class="def" href="#glossary-proximal-event-order">event order</a> associated with that device; each operation, such as a focus change or composition input, also acts as a <em>task source</em> for the appropriate <em>task queue</em>. The resolution of these event loops is handled in a manner conforming to the <a class="def" href="#glossary-host-language">host language</a>, such as HTML [<cite><a class="informative" href="#references-HTML5">HTML5</a></cite>].</p>
- <p class="warning" id="dropped-events"><strong>Warning!</strong> Certain events, such as “hotkeys” or controls keys pressed in a certain sequence, may be “swallowed” by the operating system or the application, interrupting the expected <a class="def" href="#glossary-proximal-event-order">event order</a>. Content authors should make appropriate checks for such occurrences.</p>
+ <p>Most events take place in a sequential context. HTML5 [<cite><a class="informative" href="#references-HTML5">HTML5</a></cite>] defines its event operations in terms of an event loop mechanism, in which events of all types are fed into different <em>task queues</em>. This specification does not define events in terms of this event loop mechanism, but it is compatible with this mechanism. Instead, this specification defines several operation-specific <a class="def" href="#glossary-event-order">event orders</a>.</p>
+ <p>Using the terminology of HTML5, each independent device, such as a mouse or keyboard, should be treated as a <em>task source</em> which feeds into the appropriate <em>task queue</em>, in the order defined by the <a class="def" href="#glossary-event-order">event order</a> associated with that device; each operation, such as a focus change or composition input, also acts as a <em>task source</em> for the appropriate <em>task queue</em>. The resolution of these event loops is handled in a manner conforming to the <a class="def" href="#glossary-host-language">host language</a>, such as HTML [<cite><a class="informative" href="#references-HTML5">HTML5</a></cite>].</p>
+ <p class="warning" id="dropped-events"><strong>Warning!</strong> Certain events, such as “hotkeys” or controls keys pressed in a certain sequence, may be “swallowed” by the operating system or the application, interrupting the expected <a class="def" href="#glossary-event-order">event order</a>. Content authors should make appropriate checks for such occurrences.</p>
</div>
@@ -688,7 +686,7 @@
<h4><a id="click-synthesis" href="#click-synthesis">3.5.1 Activation event synthesis</a></h4>
<p>If the instance of the <a class="def" href="#glossary-activation-trigger">activation trigger</a> is not an event of <a class="def" href="#glossary-event-type">event type</a> <a class="eventtype" href="#event-type-click"><code>click</code></a> (that is, when it does not result from a user activating a button or link using a mouse or equivalent pointing device), the implementation must synthesize and dispatch an event of <a class="def" href="#glossary-event-type">event type</a> <a class="eventtype" href="#event-type-click"><code>click</code></a> as one of the <a class="def" href="#glossary-default-action">default actions</a> of that <a class="def" href="#glossary-activation-trigger">activation trigger</a>; the value of the <code class="attribute-name"><a href="#events-event-type-target">Event.target</a></code> must be set to the <a class="def" href="#glossary-proximal-event-target">proximal event target</a> (normally, the currently focused element), and the event must simulate a <em>left click</em> (i.e. the <a href="#events-MouseEvent-button"><code>MouseEvent.button</code></a> attribute value must be <code>0</code>, and the <a href="#events-MouseEvent-buttons"><code>MouseEvent.buttons</code></a> attribute value must be <code>1</code>). Other context information of such a simulated <a class="eventtype" href="#event-type-click"><code>click</code></a> event is implementation dependent, but for historical purposes, the interface for the <a class="eventtype" href="#event-type-click"><code>click</code></a> event must be the <a href="#events-MouseEvent"><code>MouseEvent interface</code></a>, regardless of the actual device used to activate the element. Preventing the <a class="def" href="#glossary-default-action">default action</a> of the <a class="def" href="#glossary-activation-trigger">activation trigger</a>, such as with the <a href="#events-event-type-preventDefault"><code>Event.preventDefault()</code></a>, must stop the initiation of the <a class="def" href="#glossary-activation-behavior">activation behavior</a>.</p>
- <p class="example" id="example-activation-click"><strong>Example:</strong> When a user activates a hyperlink using a keyboard, such as by focusing the hyperlink element and pressing the <a href="#key-Enter"><code class="value keyname">'Enter'</code></a> or <a href="#key-Space"><code class="value keyname">'Space'</code></a> key, a <a class="eventtype" href="#event-type-click"><code>click</code></a> event would be dispatched as the <a class="def" href="#glossary-default-action">default action</a> of the respective <a class="eventtype" href="#event-type-keydown"><code>keydown</code></a> event.</p>
+ <p class="example" id="example-activation-click"><strong>Example:</strong> When a user activates a hyperlink using a keyboard, such as by focusing the hyperlink element and pressing the <a href="#key-Enter"><code class="value keyname">'Enter'</code></a> or <a href="#key-Spacebar"><code class="value keyname">'Space'</code></a> key, a <a class="eventtype" href="#event-type-click"><code>click</code></a> event would be dispatched as the <a class="def" href="#glossary-default-action">default action</a> of the respective <a class="eventtype" href="#event-type-keydown"><code>keydown</code></a> event.</p>
<p>Implementations must dispatch the synthesized <a class="eventtype" href="#event-type-click"><code>click</code></a> event as described above even if they do not normally dispatch such an event (e.g. when activation is requested by a voice command, since this specification does not address <a class="def" href="#glossary-event-type">event types</a> for voice input).</p>
<p class="note" id="application-dependent-activation"><strong>Note:</strong> The activation of an event target is device dependent, but is also application dependent, e.g. a link in a document can be activated using a mouse click or a mouse double click.</p>
<p>Implementations which support the <a class="eventtype" href="#event-type-DOMActivate"><code>DOMActivate</code></a> <a class="def" href="#glossary-event-type">event type</a> should also dispatch a <a class="eventtype" href="#event-type-DOMActivate"><code>DOMActivate</code></a> event as a <a class="def" href="#glossary-default-action">default action</a> of a <a class="eventtype" href="#event-type-click"><code>click</code></a> event which is associated with an <a class="def" href="#glossary-activation-trigger">activation trigger</a>. However, such implementations should only initiate the associated <a class="def" href="#glossary-activation-behavior">activation behavior</a> once for any given occurrence of an <a class="def" href="#glossary-activation-trigger">activation trigger</a>.</p>
@@ -712,7 +710,7 @@
</ol>
<p>The following is the typical sequence of events when a focused element is activated by a key event (with only pertinent events listed):</p>
<ol>
- <li><a class="eventtype" href="#event-type-keydown"><code>keydown</code></a> (must be a key which can activate the element, such as the <a href="#key-Enter"><code class="value keyname">'Enter'</code></a> or <a href="#key-Space"><code class="value keyname">'Space'</code></a> key, or the element is not activated)</li>
+ <li><a class="eventtype" href="#event-type-keydown"><code>keydown</code></a> (must be a key which can activate the element, such as the <a href="#key-Enter"><code class="value keyname">'Enter'</code></a> or <a href="#key-Spacebar"><code class="value keyname">'Space'</code></a> key, or the element is not activated)</li>
<li><a class="eventtype" href="#event-type-click"><code>click</code></a> (<a class="def" href="#glossary-default-action">default action</a>; synthesized; <code>trusted="false"</code>)</li>
<li><a class="eventtype" href="#event-type-DOMActivate"><code>DOMActivate</code></a> (<a class="def" href="#glossary-default-action">default action</a>, if supported by the <a class="def" href="#glossary-user-agent">user agent</a>; synthesized; <code>trusted="false"</code>)</li>
<li>
@@ -1587,7 +1585,7 @@
<td>none</td>
</tr>
<tr>
- <td><a class="eventtype" href="#event-type-focusin">
+ <td><a class="eventtype" href="#event-type-focusIn">
<code>focusin</code>
</a></td>
<td>Sync</td>
@@ -2193,7 +2191,7 @@
<p>A <a class="def" href="#glossary-user-agent">user agent</a> must dispatch this event when a document view or an element has been scrolled. This event type is dispatched after the scroll has occurred.</p>
- <p class="note" id="scroll-document"><strong>Note:</strong> When dispatched on the <code>Document</code> element, this event type must bubble to the <a class="def" href="#glossary-defaultView"><code>defaultView</code></a> object.</p>
+ <pid="scroll-document">When dispatched on the <code>Document</code> element, this event type must bubble to the <a class="def" href="#glossary-defaultView"><code>defaultView</code></a> object.</p>
</dd>
</dl>
</div>
@@ -2305,11 +2303,11 @@
</h4>
<p>The focus events defined in this specification occur in a set order relative to one another. The following is the typical sequence of events when a focus is shifted between elements (this order assumes that no element is initially focused):</p>
<ol>
- <li><em>[user shifts focus]</em> <a class="eventtype" href="#event-type-focusin"><code>focusin</code></a> (before first target element receives focus)</li>
+ <li><em>[user shifts focus]</em> <a class="eventtype" href="#event-type-focusIn"><code>focusin</code></a> (before first target element receives focus)</li>
<li><a class="eventtype" href="#event-type-focus"><code>focus</code></a> (after first target element receives focus)</li>
<li><a class="eventtype" href="#event-type-DOMFocusIn"><code>DOMFocusIn</code></a> (if supported)</li>
<li><em>[user shifts focus]</em> <a class="eventtype" href="#event-type-focusout"><code>focusout</code></a> (before first target element loses focus)</li>
- <li><a class="eventtype" href="#event-type-focusin"><code>focusin</code></a> (before second target element receives focus)</li>
+ <li><a class="eventtype" href="#event-type-focusIn"><code>focusin</code></a> (before second target element receives focus)</li>
<li><a class="eventtype" href="#event-type-blur"><code>blur</code></a> (after first target element loses focus)</li>
<li><a class="eventtype" href="#event-type-DOMFocusOut"><code>DOMFocusOut</code></a> (if supported)</li>
<li><a class="eventtype" href="#event-type-focus"><code>focus</code></a> (after second target element receives focus)</li>
@@ -2380,7 +2378,7 @@
</tr>
</table>
<p>A <a class="def" href="#glossary-user-agent">user agent</a> must dispatch this event when an <a class="def" href="#glossary-event-target">event target</a> receives focus. The focus shall be given to the element before the dispatch of this event type. This event type shall be dispatched after the event type <a class="eventtype" href="#event-type-focus"><code>focus</code></a>.</p>
- <p class="warning" id="_7"><strong>Warning!</strong> the <a class="eventtype" href="#event-type-DOMFocusIn"><code>DOMFocusIn</code></a> event type is defined in this specification for reference and completeness, but this specification <a class="def" href="#glossary-deprecated">deprecates</a> the use of this event type in favor of the related event types <a class="eventtype" href="#event-type-focus"><code>focus</code></a> and <a class="eventtype" href="#event-type-focusin"><code>focusin</code></a>.</p>
+ <p class="warning" id="_7"><strong>Warning!</strong> the <a class="eventtype" href="#event-type-DOMFocusIn"><code>DOMFocusIn</code></a> event type is defined in this specification for reference and completeness, but this specification <a class="def" href="#glossary-deprecated">deprecates</a> the use of this event type in favor of the related event types <a class="eventtype" href="#event-type-focus"><code>focus</code></a> and <a class="eventtype" href="#event-type-focusIn"><code>focusin</code></a>.</p>
</dd>
</dl>
</div>
@@ -2443,7 +2441,7 @@
</td>
</tr>
</table>
- <p>A <a class="def" href="#glossary-user-agent">user agent</a> must dispatch this event when an <a class="def" href="#glossary-event-target">event target</a> receives focus. The focus shall be given to the element before the dispatch of this event type. This event type is similar to <a class="eventtype" href="#event-type-focusin"><code>focusin</code></a>, but is dispatched after focus is shifted, and does not bubble.</p>
+ <p>A <a class="def" href="#glossary-user-agent">user agent</a> must dispatch this event when an <a class="def" href="#glossary-event-target">event target</a> receives focus. The focus shall be given to the element before the dispatch of this event type. This event type is similar to <a class="eventtype" href="#event-type-focusIn"><code>focusin</code></a>, but is dispatched after focus is shifted, and does not bubble.</p>
</dd>
</dl>
</div>
@@ -2451,7 +2449,7 @@
<!-- focusin -->
<div class="event-definition assert must">
<dl>
- <dt id="event-type-focusin"><dfn>
+ <dt id="event-type-focusIn"><dfn>
<a class="eventtype" href="#event-type-focusIn"><code>focusin</code></a>
</dfn></dt>
<dd>
@@ -2484,7 +2482,7 @@
<div class="event-definition assert must">
<dl>
<dt id="event-type-focusout"><dfn>
- <a class="eventtype" href="#event-type-focusOut"><code>focusout</code></a>
+ <a class="eventtype" href="#event-type-focusout"><code>focusout</code></a>
</dfn></dt>
<dd>
<table border="0" summary="This table contains information about the semantics of the given event type" cellpadding="2" cellspacing="0">
@@ -3929,7 +3927,7 @@
</li>
<li>if the key is associated with a <a class="def" href="#glossary-text-composition-system">text composition system</a>, the default action shall be to launch that system</li>
<li>if the key is the <code>tab</code> key, the default action shall be to shift the document focus from the currently focused element (if any) to the new focused element, as described in <a href="#events-focusevent">Focus Event Types</a></li>
- <li>if the key is the <a href="#key-Enter"><code class="value keyname">'Enter'</code></a> or <a href="#key-Space"><code class="value keyname">'Space'</code></a> key and the current focus is on a state-changing element, the default action shall be to dispatch a <a class="eventtype" href="#event-type-click"><code>click</code></a> event, and a <a class="eventtype" href="#event-type-DOMActivate"><code>DOMActivate</code></a> event if that event type is supported by the <a class="def" href="#glossary-user-agent">user agent</a> (refer to <a href="#event-flow-activation">activation triggers and behavior</a> for more details)</li>
+ <li>if the key is the <a href="#key-Enter"><code class="value keyname">'Enter'</code></a> or <a href="#key-Spacebar"><code class="value keyname">'Space'</code></a> key and the current focus is on a state-changing element, the default action shall be to dispatch a <a class="eventtype" href="#event-type-click"><code>click</code></a> event, and a <a class="eventtype" href="#event-type-DOMActivate"><code>DOMActivate</code></a> event if that event type is supported by the <a class="def" href="#glossary-user-agent">user agent</a> (refer to <a href="#event-flow-activation">activation triggers and behavior</a> for more details)</li>
<!-- <li>if the key is associated with any other event type, such as the <a class="eventtype" href="#event-type-scroll"><code>scroll</code></a> event, the default action shall be to dispatch an event of that type.</li> -->
</ul>
<p>If this event is canceled, the associated event types must not be dispatched, and the associated actions must not be performed.</p>
@@ -4595,7 +4593,7 @@
</table>
<p>A <a class="def" href="#glossary-user-agent">user agent</a> must dispatch this event when a node is being removed from a document, either through direct removal of the node or removal of a subtree in which it is contained; a <a class="def" href="#glossary-user-agent">user agent</a> may optionally treat an <code>Attr</code> node as part of an <code>Element</code>'s subtree. This event must be dispatched before the removal takes place. The <a class="def" href="#glossary-proximal-event-target">proximal event target</a> of this event type shall be the node being removed. If the node is being directly removed, the event type <a class="eventtype" href="#event-type-DOMNodeRemoved"><code>DOMNodeRemoved</code></a> must occur before this event type.</p>
- <p class="note" id="DOMNodeRemoved-attr"><strong>Note:</strong> for reliably detecting attribute removal, the <a href="#event-type-DOMAttrModified">DOMAttrModified</a> event type should be used instead.</p>
+ <p class="note" id="DOMNodeRemovedFromDocument-attr"><strong>Note:</strong> for reliably detecting attribute removal, the <a href="#event-type-DOMAttrModified">DOMAttrModified</a> event type should be used instead.</p>
<p class="warning" id="_38"><strong>Warning!</strong> the <a class="eventtype" href="#event-type-DOMNodeRemovedFromDocument"><code>DOMNodeRemovedFromDocument</code></a> event type is defined in this specification for reference and completeness, but this specification <a class="def" href="#glossary-deprecated">deprecates</a> the use of this event type.</p>
</dd>
</dl>
@@ -4873,7 +4871,7 @@
<p>Chording keyboards, also know as chorded keysets or chord keyboards, are key input devices which produce values by pressing several keys in combination or sequence, normally to simulate a full range of characters or commands on a reduced set of keys, often for single-handed use. A chording keyboard may have additional mode keys to switch between key values, and the number and type of keys pressed to produce a key value will vary, but the final key values produced by such keyboards should match the range of key values described in this specification.</p>
- <p>For these and other alternative modal keyboards, the key values <a id="key-Alphanumeric"><code class="value keyname">'Alphanumeric'</code></a>, <a href="#key-CapsLock"><code class="value keyname">'CapsLock'</code></a>, <a href="#key-NumLock"><code class="value keyname">'NumLock'</code></a>, and <a href="#key-SymbolLock"><code class="value keyname">'SymbolLock'</code></a> are recommended for the keys which switch between different modes.</p>
+ <p>For these and other alternative modal keyboards, the key values <a href="#key-Alphanumeric"><code class="value keyname">'Alphanumeric'</code></a>, <a href="#key-CapsLock"><code class="value keyname">'CapsLock'</code></a>, <a href="#key-NumLock"><code class="value keyname">'NumLock'</code></a>, and <a href="#key-SymbolLock"><code class="value keyname">'SymbolLock'</code></a> are recommended for the keys which switch between different modes.</p>
</div>
</div>
@@ -4894,7 +4892,7 @@
<p>It is important to note that a key value does not indicate a specific key on the physical keyboard, nor does it reflect the character printed on the key; a key value indicates the current value of the event with consideration to the current state of all active keys and key input modes (including shift modes and <a class="def" href="#glossary-dead-key">dead keys</a>), as reflected in the operating-system mapping of the keyboard and reported to the implementation. In other words, the key value for the key marked <code>'O'</code> on a <a class="def" href="#glossary-qwerty">QWERTY</a> keyboard has the key value <code>'o'</code> in an unshifted state, <code>'O'</code> in a shifted state, <code>'ö'</code> in an unshifted state during a dead-key operation to add an umlaut diacritic, and <code>'Ö'</code> in a shifted state during a dead-key operation to add an umlaut diacritic. Because a user may map their keyboard to an arbitrary custom configuration, the content author should not assume that a relationship exists between the shifted and unshifted states of a key and the majuscule form (uppercase or capital letters) and minuscule form (lowercase or small letters) of a character representation, but should instead use the value of the <a href="#events-KeyboardEvent-key"><code>KeyboardEvent.key</code></a> or <a href="#events-KeyboardEvent-char"><code>KeyboardEvent.char</code></a> attributes. The keyboard depicted in <a href="#figure-keyboard">Figure 3</a> illustrates one possible set of key mappings on one possible keyboard layout; many others exist, both standard and idiosyncratic.</p>
<p>It is also important to note that there is not a one-to-one relationship between key event states and key values. A particular key value may be associated with multiple keys; for example, many standard keyboards contain more than one key with the <code class="value">'Shift'</code> key value (normally distinguished by the <a href="#events-KeyboardEvent-location"><code>KeyboardEvent.location</code></a> values <a href="#events-DOM_KEY_LOCATION_LEFT"><code class="constant-name">DOM_KEY_LOCATION_LEFT</code></a> and <a href="#events-DOM_KEY_LOCATION_RIGHT"><code class="constant-name">DOM_KEY_LOCATION_RIGHT</code></a>) or <code class="value">'8'</code> key value (normally distinguished by the <a href="#events-KeyboardEvent-location"><code>KeyboardEvent.location</code></a> values <a href="#events-DOM_KEY_LOCATION_STANDARD"><code class="constant-name">DOM_KEY_LOCATION_STANDARD</code></a> and <a href="#events-DOM_KEY_LOCATION_NUMPAD"><code class="constant-name">DOM_KEY_LOCATION_NUMPAD</code></a>), and user-configured custom keyboard layouts may duplicate any key value in multiple key-state scenarios (note that <a href="#events-KeyboardEvent-location"><code>KeyboardEvent.location</code></a> is intended for standard keyboard layouts, and cannot always indicate a meaningful distinction).</p>
- <p>Similarly, a given key event state may have different key values. For most keys which represent characters, such as the letter <code>'m'</code> or the question mark (<code>'?'</code>), the <a href="#events-KeyboardEvent-key"><code>KeyboardEvent.key</code></a> and <a href="#events-KeyboardEvent-char"><code>KeyboardEvent.char</code></a> attributes will be the same. However, for <em>printing control characters</em>, such as the backspace/back key, the <em>character value</em> is distinct from the <em>key value</em>, with different values for the <a href="#events-KeyboardEvent-key"><code>KeyboardEvent.key</code></a> and <a href="#events-KeyboardEvent-char"><code>KeyboardEvent.char</code></a> attributes; see the <a id="key-values" href="#key-values">Key Values Set</a> for more details. Certain keys in some states, called <em>modifier keys</em> or <em>control keys</em>, have only a <a class="def" href="#glossary-key-value">key value</a> and no <a class="def" href="#glossary-character-value">character value</a>, such as the volume mute key, which has the <a href="#events-KeyboardEvent-key"><code>KeyboardEvent.key</code></a> attribute value <code class="value">'VolumeMute'</code> and the <a href="#events-KeyboardEvent-char"><code>KeyboardEvent.char</code></a> attribute value <code>null</code>.</p>
+ <p>Similarly, a given key event state may have different key values. For most keys which represent characters, such as the letter <code>'m'</code> or the question mark (<code>'?'</code>), the <a href="#events-KeyboardEvent-key"><code>KeyboardEvent.key</code></a> and <a href="#events-KeyboardEvent-char"><code>KeyboardEvent.char</code></a> attributes will be the same. However, for <em>printing control characters</em>, such as the backspace/back key, the <em>character value</em> is distinct from the <em>key value</em>, with different values for the <a href="#events-KeyboardEvent-key"><code>KeyboardEvent.key</code></a> and <a href="#events-KeyboardEvent-char"><code>KeyboardEvent.char</code></a> attributes; see the <a href="#key-values">Key Values Set</a> for more details. Certain keys in some states, called <em>modifier keys</em> or <em>control keys</em>, have only a <a class="def" href="#glossary-key-value">key value</a> and no <a class="def" href="#glossary-character-value">character value</a>, such as the volume mute key, which has the <a href="#events-KeyboardEvent-key"><code>KeyboardEvent.key</code></a> attribute value <code class="value">'VolumeMute'</code> and the <a href="#events-KeyboardEvent-char"><code>KeyboardEvent.char</code></a> attribute value <code>null</code>.</p>
<p>Finally, the meaning of any given character representation is context-dependent and complex. For example, in some contexts, the asterisk (star) glyph (<code class="value">'*'</code>) represents a footnote or emphasis (when bracketing a passage of text); however, in some documents or executable programs it is equivalent to the mathematical multiplication operation, while in other documents or executable programs, that function is reserved for the multiplication symbol (<code class="value">'×'</code>, Unicode value <code class="value">U+00D7</code>) or the Latin small letter <code class="value">'x'</code> (due to the lack of a multiplication key on many keyboard and the superficial resemblance of the glyphs <code class="value">'×'</code> and <code class="value">'x'</code>). Thus, the semantic meaning or function of character representations is outside the scope of this specification.</p>
@@ -5004,7 +5002,7 @@
<br />
<i class="note" id="note-key-intercept"><strong>Note:</strong> the key value will not be <code class="value">'e'</code> (Latin Small Letter E key) under normal circumstances, because the value delivered to the user agent will already be modified by the dead key operation.</i>
<br />
- <i class="issue" id="issue-key-intercept"><strong>Issue:</strong> is this correct for the case of composition events?</i></li>
+ <i class="issue" id="issue-key-intercept"><strong>Issue:</strong> is this correct for the case of composition events?</i>
</li>
<li><a class="eventtype" href="#event-type-compositionend"><code>compositionend</code></a>: <code class="value">'ê'</code></li>
<li><a class="eventtype" href="#event-type-textInput"><code>textInput</code></a>: <code class="value">'ê'</code> (<code>"inputMethod"</code>: <code class="value">'DOM_INPUT_METHOD_IME'</code>)</li>
@@ -5232,7 +5230,7 @@
</ul>
</div>
- <h5>Legend for the following list:</h5>
+ <h5 id="key-values-legend">Legend for the following list:</h5>
<ul>
<li>Key values are denoted with a <code class="value keyname">blue background</code>, and are the first term in a set</li>
<li>Character values, where present, are denoted with a <code class="value charval">green background</code>, and follow the key value.</li>
@@ -5754,7 +5752,7 @@
<p><em>This section is informative</em></p>
<h2><a id="extending_events-intro" href="#extending_events-intro">A.1 Introduction</a></h2>
- <p class="1st">This specification defines several interfaces and many events; however, this is not an exhaustive set of events for all purposes. To allow content authors and implementers to add desired functionality, this specification provides two mechanisms for extend this set of interfaces and events without creating conflicts: <a href="#extending_events-Custom_Events">custom events</a> and <a href="#extending_events-Vendor_Extensions">implementation-specific prefix strings</a>.</p>
+ <p class="1st">This specification defines several interfaces and many events; however, this is not an exhaustive set of events for all purposes. To allow content authors and implementers to add desired functionality, this specification provides two mechanisms for extend this set of interfaces and events without creating conflicts: <a href="#extending_events-Custom_Events">custom events</a> and <a href="#extending_events-Impl_Extensions">implementation-specific extensions</a>.</p>
<h2><a id="extending_events-Custom_Events" href="#extending_events-Custom_Events">A.2 Custom Events</a></h2>
<p>A script author may wish to define an application in terms of functional components, with event types that are meaningful to the application architecture. The content author can use the <a href="#events-CustomEvent"><code>CustomEvent</code></a> interface to create their own events appropriate to the level of abstraction they are using.</p>