added definition of event order, discussion of event loops
authorschepers
Tue, 24 Aug 2010 16:06:57 +0900
changeset 260 b810d523ff31
parent 259 cf8d43ab9f0f
child 261 d8159cc030cf
added definition of event order, discussion of event loops
html/DOM3-Events.html
--- a/html/DOM3-Events.html	Thu Aug 19 03:12:06 2010 +0900
+++ b/html/DOM3-Events.html	Tue Aug 24 16:06:57 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-18">18 August 2010</time></h2>
+      <h2 id="Overview-W3C-doctype">W3C Editor's Draft <time datetime="2010-04-24">24 August 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.136">http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html?rev=1.136</a></dd>
+        <dd><a href="http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html?rev=1.137">http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html?rev=1.137</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.135">http://dev.w3.org/cvsweb/~checkout~/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html?rev=1.135</a></dd>
+        <dd><a href="http://dev.w3.org/cvsweb/~checkout~/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html?rev=1.136">http://dev.w3.org/cvsweb/~checkout~/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html?rev=1.136</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>
@@ -71,7 +71,7 @@
         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 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 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
@@ -115,7 +115,11 @@
         <ul class="toc">
           <li><a href="#event-flow">3.1 Event dispatch and DOM event flow</a></li>
           <li><a href="#event-flow-default-cancel">3.2 Default actions and cancelable events</a></li>
-          <li><a href="#sync-async">3.3 Synchronous and asynchronous events</a></li>
+          <li><a href="#sync-async">3.3 Synchronous and asynchronous events</a>
+            <ul class="toc">
+              <li><a href="#event-order-and-loops">3.3.1 Event order and event loops</a></li>
+            </ul>
+          </li>
           <li><a href="#trusted-events">3.4 Trusted events</a></li>
           <li><a href="#event-flow-activation">3.5 Activation triggers and behavior</a>
             <ul class="toc">
@@ -316,16 +320,16 @@
 
           <p><strong>This section is normative.</strong></p>
           <p>Within this specification, the key words 
-            "MUST", 
-            "MUST NOT",
-            "REQUIRED", 
-            "SHALL", 
-            "SHALL NOT", 
-            "SHOULD", 
-            "SHOULD NOT",
-            "RECOMMENDED", 
-            "MAY", and 
-            "OPTIONAL" are to be interpreted as
+            “MUST”, 
+            “MUST NOT”,
+            “REQUIRED”, 
+            “SHALL”, 
+            “SHALL NOT”, 
+            “SHOULD”, 
+            “SHOULD NOT”,
+            “RECOMMENDED”, 
+            “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>].
             However, for readability, these words do not necessarily appear in uppercase in this specification.</p>
@@ -335,7 +339,7 @@
             
             <dt id="conf-interactive-ua">Web browsers and other dynamic or interactive <a class="def" href="#glossary-user-agent">user agents</a></dt>
             <dd>
-              <p>A dynamic or interactive <a class="def" href="#glossary-user-agent">user agent</a>, referred to here as a "browser" (be it a Web browser, AT (Accessibility Technology) application, or other similar program), conforms to DOM Level 3 Events if it supports the Core module defined in [<cite><a class="normative" href="#references-DOMCore">DOM3 Core</a></cite>], the <a href="#event-flow">Event dispatch and DOM event flow</a> mechanism, all the interfaces and events with their associated methods, attributes, and semantics defined in this specification which are not marked as <a class="def" href="#glossary-deprecated">deprecated</a>, and the complete set of <a class="def" href="#glossary-character-value">character values</a> and <a class="def" href="#glossary-key-value">key values</a> in the <a href="#key-values">Key Values Set</a> (subject to platform availability), as well as all other normative requirements defined in this specification.  A conforming browser must <a class="def" href="#glossary-dispatch">dispatch</a> events appropriate to the given <a href="#events-EventTarget">EventTarget</a> when the conditions defined for that <a class="def" href="#glossary-event-type">event type</a> have been met.</p>
+              <p>A dynamic or interactive <a class="def" href="#glossary-user-agent">user agent</a>, referred to here as a “browser” (be it a Web browser, AT (Accessibility Technology) application, or other similar program), conforms to DOM Level 3 Events if it supports the Core module defined in [<cite><a class="normative" href="#references-DOMCore">DOM3 Core</a></cite>], the <a href="#event-flow">Event dispatch and DOM event flow</a> mechanism, all the interfaces and events with their associated methods, attributes, and semantics defined in this specification which are not marked as <a class="def" href="#glossary-deprecated">deprecated</a>, and the complete set of <a class="def" href="#glossary-character-value">character values</a> and <a class="def" href="#glossary-key-value">key values</a> in the <a href="#key-values">Key Values Set</a> (subject to platform availability), as well as all other normative requirements defined in this specification.  A conforming browser must <a class="def" href="#glossary-dispatch">dispatch</a> events appropriate to the given <a href="#events-EventTarget">EventTarget</a> when the conditions defined for that <a class="def" href="#glossary-event-type">event type</a> have been met.</p>
               <p><span id="conform-arch">A browser conforms specifically to the DOM Level 3 Events Architecture if it implements the <a href="#dom-event-architecture">DOM Event Architecture</a> and <a href="#event-interfaces">Basic Event Interfaces</a>, regardless of its support for any other event interfaces or <a class="def" href="#glossary-event-type">event types</a> defined in this specification.</span>  <span id="conform-module">A browser conforms specifically to the DOM Level 3 Events Module if it implements the interfaces and its related <a class="def" href="#glossary-event-type">event types</a> specified in the <a href="#events-module">Events Module</a>, and to each event interface if it implements that interface and its related <a class="def" href="#glossary-event-type">event types</a>.</span></p>
               <p><span id="conform-script">A conforming browser must support scripting, declarative interactivity, or some other means of detecting and dispatching events in the manner described by this specification, and with the attributes specified for that <a class="def" href="#glossary-event-type">event type</a>.</span>  <span id="conform-declarative">A declarative browser may still conform to this specification if it does not directly support or expose the methods defined for the DOM Level 3 Events interfaces, but it should provide compatible functionality by other means.</span></p>
               <p>In addition to meeting all other conformance criteria, a conforming browser may implement features of this specification marked as <a class="def" href="#glossary-deprecated">deprecated</a>, for backwards compatibility with existing content, but such implementation is discouraged.</p>
@@ -370,17 +374,17 @@
           <p class="note" id="_0"><strong>Note:</strong> The <a href="http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-5CED94D7"><code>DOMImplementation.hasFeature()</code></a> method has been of limited utility to content authors in some instances, because of imprecision in conformance criteria in some specifications, and insufficient granularity of feature strings, leading to implementations misrepresenting the degree of support for a class of features.  This specification seeks to remedy that in the context of <a class="def" href="#glossary-user-agent">user agents</a> conforming to DOM Level 3 Events by providing discrete feature strings and clear guidelines for the circumstances under which a <a class="def" href="#glossary-user-agent">user agent</a> must or must not report in a positive manner when queried for support of the feature which that feature string represents.</p>
           <p>DOM Level 3 Events introduces compositional feature strings, which are base feature strings combined with extended feature strings, a new mechanism for testing support for each specific feature, rather than relying on modules-level feature strings.  A <a class="def" href="#glossary-user-agent">user agent</a> conforming to DOM Level 3 Events must also implement the following feature string convention for describing DOM3 Events feature support:</p>
           <ul>
-            <li id="base-feature-string">The primary base feature string for DOM Level 3 Events shall be "<code>Events</code>", with the optional version string "<code>3.0</code>", indicating that the <a class="def" href="#glossary-user-agent">user agent</a> supports the <a href="#conform-arch">DOM Level 3 Events Architecture</a> in the manner described in the appropriate conformance section.
+            <li id="base-feature-string">The primary base feature string for DOM Level 3 Events shall be “<code>Events</code>”, with the optional version string “<code>3.0</code>”, indicating that the <a class="def" href="#glossary-user-agent">user agent</a> supports the <a href="#conform-arch">DOM Level 3 Events Architecture</a> in the manner described in the appropriate conformance section.
               <ul>
                 <li><span class="assert must">Since DOM Level 3 Events is built on top of DOM Level 2 Events [<cite><a class="normative" href="#references-DOM2Events">DOM2 Events</a></cite>], an implementation that returns <code>true</code> for <code>"Events"</code> and <code>"3.0"</code> shall also return <code>true</code> for the parameters <code>"Events"</code> and <code>"2.0"</code>.</span></li>
                 <li><span class="assert mustnot">If the version parameter is omitted, the <a class="def" href="#glossary-user-agent">user agent</a> must not differentiate between the <a href="#conform-arch">DOM Events Architecture</a> as described in DOM Level 3 Events and DOM Level 2 Events, in terms of reporting support for the features indicated by the base feature string.</span></li>
               </ul>
             </li>
-            <li id="extended-feature-string">The extended feature string for each event type defined in DOM Level 3 Events shall be the base feature string "<code>Events</code>", followed by the period character ("."), followed by the name of that event type, with the optional version string "<code>3.0</code>", indicating that the <a class="def" href="#glossary-user-agent">user agent</a> supports that specific event type in the manner described in the appropriate <a href="#conform-module">conformance section</a>.  For example, the feature string for the <a class="eventtype" href="#event-type-textInput"><code>textInput</code></a> event would be "<code>Events.textInput</code>", with the optional version string "<code>3.0</code>".
+            <li id="extended-feature-string">The extended feature string for each event type defined in DOM Level 3 Events shall be the base feature string “<code>Events</code>”, followed by the period character ("."), followed by the name of that event type, with the optional version string “<code>3.0</code>”, indicating that the <a class="def" href="#glossary-user-agent">user agent</a> supports that specific event type in the manner described in the appropriate <a href="#conform-module">conformance section</a>.  For example, the feature string for the <a class="eventtype" href="#event-type-textInput"><code>textInput</code></a> event would be “<code>Events.textInput</code>”, with the optional version string “<code>3.0</code>”.
               <ul>
-                <li><span class="assert must">Because this specification does not retroactively define extended feature strings for DOM Level 2 Events, using the <a href="http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-5CED94D7"><code>DOMImplementation.hasFeature()</code></a> method with extended feature strings with a version string "<code>2.0</code>" must return false.</span><span class="warning" id="_42"><strong>Warning!</strong> Because this mechanism for discrete feature strings was not defined in earlier DOM Events specifications, older user agents which support those specifications but not this one may report false negatives in terms of supporting particular features.  For example, a browser which supports the the <a class="eventtype" href="#event-type-click"><code>click</code></a> event type as defined in DOM Level 2 Events, but does not support this specification, is likely to return <code>false</code> to the method call <code>document.implementation.hasFeature("Events.click", "")</code>.  The content author should not take this for definitive proof that the implementation does not support the <a class="eventtype" href="#event-type-click"><code>click</code></a> event type, but rather that other means of testing are required in that instance.  This method is best used as a means to detect positive results, not negative ones.  However, it is expected that this will prove of sufficient utility in many cases to justify its use.</span></li>
+                <li><span class="assert must">Because this specification does not retroactively define extended feature strings for DOM Level 2 Events, using the <a href="http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-5CED94D7"><code>DOMImplementation.hasFeature()</code></a> method with extended feature strings with a version string “<code>2.0</code>” must return false.</span><span class="warning" id="_42"><strong>Warning!</strong> Because this mechanism for discrete feature strings was not defined in earlier DOM Events specifications, older user agents which support those specifications but not this one may report false negatives in terms of supporting particular features.  For example, a browser which supports the the <a class="eventtype" href="#event-type-click"><code>click</code></a> event type as defined in DOM Level 2 Events, but does not support this specification, is likely to return <code>false</code> to the method call <code>document.implementation.hasFeature("Events.click", "")</code>.  The content author should not take this for definitive proof that the implementation does not support the <a class="eventtype" href="#event-type-click"><code>click</code></a> event type, but rather that other means of testing are required in that instance.  This method is best used as a means to detect positive results, not negative ones.  However, it is expected that this will prove of sufficient utility in many cases to justify its use.</span></li>
                 <li><span class="assert must">A <a class="def" href="#glossary-user-agent">user agent</a> which supports an event type in a manner conforming to DOM Level 2 Events but not conforming to DOM Level 3 Events must not report a positive result to that extended feature string, regardless of the value of the version string.</span></li>
-                <li><span class="assert must">A specification or <a class="def" href="#glossary-host-language">host language</a> which <a href="#conf-specs">conforms</a> to DOM Level 3 Events, and which extends this specification in a manner consistent with the <a href="#conf-extend">extension conformance criteria</a>, may define extended feature strings for event types defined in that specification.  These extended feature strings may be used with the feature string "<code>Events</code>".<!-- These extended feature strings may be used with the <a href="#base-feature-string">base feature string</a> of that specification, or with the feature string "<code>Events</code>"; for example, support for the SVG <code>zoom</code> event type might be tested using the method call <code>document.implementation.hasFeature("Events.zoom", "")</code> or the hypothetical <code>document.implementation.hasFeature("SVG.events.zoom", "")</code>. --></span>
+                <li><span class="assert must">A specification or <a class="def" href="#glossary-host-language">host language</a> which <a href="#conf-specs">conforms</a> to DOM Level 3 Events, and which extends this specification in a manner consistent with the <a href="#conf-extend">extension conformance criteria</a>, may define extended feature strings for event types defined in that specification.  These extended feature strings may be used with the feature string “<code>Events</code>”.<!-- These extended feature strings may be used with the <a href="#base-feature-string">base feature string</a> of that specification, or with the feature string "<code>Events</code>"; for example, support for the SVG <code>zoom</code> event type might be tested using the method call <code>document.implementation.hasFeature("Events.zoom", "")</code> or the hypothetical <code>document.implementation.hasFeature("SVG.events.zoom", "")</code>. --></span>
                     <p class="example" id="example-zoom"><strong>Example:</strong> Support for the SVG <code>zoom</code> event type might be tested using the method call <code>document.implementation.hasFeature("Events.zoom", "")</code></p>
                   <!-- <ul>
                     <li><span class="assert may">A specification or <a class="def" href="#glossary-host-language">host language</a> which extends event types defined in this specification, but which adds functionality to be detected independently.  </span></li>
@@ -388,7 +392,7 @@
                 </li>
               </ul>
             </li>
-            <li>For backwards compatibility, each interface defined in DOM Level 3 Events also has a feature string, which may act as a base feature string or as an extended feature string.  If used as a base feature string, it must follow the conventions of the <a href="#base-feature-string">primary base feature string</a> (e.g., "<code>KeyboardEvent</code>", with the optional version string "<code>3.0</code>"); if used as an extended feature string, it must follow the conventions of the <a href="#extended-feature-string">extended feature strings for event types</a> (e.g., "<code>Events.KeyboardEvent</code>", with the optional version string "<code>3.0</code>").  In either case, the <a class="def" href="#glossary-user-agent">user agent</a> must only report a positive result if it supports that specific interface and all associated event types in the manner described in the appropriate <a href="#conform-module">conformance section</a>.  <span class="warning" id="_2"><strong>Warning!</strong> because this is not as specific as testing for a specific event type and may thus be less likely to be accurate, content authors are encouraged to use the feature strings for event types rather than interfaces.</span></li>
+            <li>For backwards compatibility, each interface defined in DOM Level 3 Events also has a feature string, which may act as a base feature string or as an extended feature string.  If used as a base feature string, it must follow the conventions of the <a href="#base-feature-string">primary base feature string</a> (e.g., “<code>KeyboardEvent</code>”, with the optional version string “<code>3.0</code>”); if used as an extended feature string, it must follow the conventions of the <a href="#extended-feature-string">extended feature strings for event types</a> (e.g., “<code>Events.KeyboardEvent</code>”, with the optional version string “<code>3.0</code>”).  In either case, the <a class="def" href="#glossary-user-agent">user agent</a> must only report a positive result if it supports that specific interface and all associated event types in the manner described in the appropriate <a href="#conform-module">conformance section</a>.  <span class="warning" id="_2"><strong>Warning!</strong> because this is not as specific as testing for a specific event type and may thus be less likely to be accurate, content authors are encouraged to use the feature strings for event types rather than interfaces.</span></li>
           </ul>
           <p class="warning" id="_3"><strong>Warning!</strong> This specification does not provide a means to guarantee that any given element of a <a class="def" href="#glossary-host-language">host language</a> is capable of generating or dispatching an event of any given <a class="def" href="#glossary-event-type">event type</a> (e.g., an HTML <code>'img'</code> element may not dispatch a <a class="eventtype" href="#event-type-textInput"><code>textInput</code></a> event), or what the attributes of that event will be beyond those defined in this specification (e.g., the host language may add attributes to the event object).  A  <a class="def" href="#glossary-host-language">host language</a> may provide a different means to do so, including its own relevant feature strings.</p>
         </div>
@@ -415,7 +419,7 @@
             <p class="issue"><strong>Issue:</strong> This is an open issue.</p>
           </div>
           <p>Feedback on features at risk, new features, and open issues is especially appreciated.</p>
-          <p>In addition, certain terms are used in this specification with particular meanings.  The term "implementation" applies to a browser, content authoring tool, or other <a class="def" href="#glossary-user-agent">user agent</a> that implements this specification, while a content author is a person who writes script or code that takes advantage of the interfaces, methods, attributes, events, and other features described in this specification in order to make Web applications, and a user is the person who uses those Web applications in an implementation.</p>
+          <p>In addition, certain terms are used in this specification with particular meanings.  The term “implementation” applies to a browser, content authoring tool, or other <a class="def" href="#glossary-user-agent">user agent</a> that implements this specification, while a content author is a person who writes script or code that takes advantage of the interfaces, methods, attributes, events, and other features described in this specification in order to make Web applications, and a user is the person who uses those Web applications in an implementation.</p>
         </div>
 <!-- div3 Conformance -->
       </div>
@@ -445,7 +449,7 @@
           <dd>In the context of key values, a character value is a string representing one or more Unicode characters, such as a letter or symbol, or a set of letters.  
             <span class="note" id="note_character-value-escapes"><strong>Note:</strong> in source code, some key values, such as non-graphic characters, may be represented using the character escape syntax of the programming language in use.</span>
           </dd>
-          <!-- <dd>In the context of key values, a character value is a string representing a single Unicode character, such as a letter or symbol, as a UTF-16 character escape (e.g. <code class="value">U+0041</code> for the Latin Capital Letter A key, <code class="value charrep">A</code>.). <i class="issue" id="issue-character_value"><strong>Issue:</strong> this may not be the best way to represent a character value, see notes in key values.  Also, is "character value" the best term?</i></dd> -->
+          <!-- <dd>In the context of key values, a character value is a string representing a single Unicode character, such as a letter or symbol, as a UTF-16 character escape (e.g. <code class="value">U+0041</code> for the Latin Capital Letter A key, <code class="value charrep">A</code>.). <i class="issue" id="issue-character_value"><strong>Issue:</strong> this may not be the best way to represent a character value, see notes in key values.  Also, is “character value” the best term?</i></dd> -->
 
           <dt id="glossary-dead-key"><dfn>dead key</dfn></dt>
           <dd>A dead key is a key or combination of key that produces no character by itself, but which in combination or sequence with another key produces a modified character, such as a character with diacritical marks (e.g. <code>&#xF6;</code>, <code>&#xE9;</code>, <code>&#xE2;</code>).</dd>
@@ -464,7 +468,7 @@
           <dd>Features marked as deprecated are included in the specification as reference to older implementations or specifications, but are optional and discouraged.  Only features which have existing or in-progress replacements shall be deprecated in this specification.  Implementations which do not already include support for the feature may implement deprecated features for reasons of backwards compatibility with existing content, but content authors creating content should not use deprecated features, unless there is no other way to solve a use case.  Other specifications which reference this specification should not use deprecated features, but should point instead to the replacements of which the feature is deprecated in favor.  Features marked as deprecated in this specification are expected to be dropped from future specifications.</dd>
 
           <dt id="glossary-dispatch"><dfn>dispatch</dfn></dt>
-          <dd>To create an event with attributes and methods appropriate to its type and context, and propagate it through the DOM tree in the specified manner. Interchangeable with the term "<a href="#glossary-fire">fire</a>", e.g. "fire a 'click' event" or "dispatch a 'load' event".</dd>
+          <dd>To create an event with attributes and methods appropriate to its type and context, and propagate it through the DOM tree in the specified manner. Interchangeable with the term “<a href="#glossary-fire">fire</a>", e.g. “fire a 'click' event” or “dispatch a 'load' event”.</dd>
 
           <dt id="glossary-document"><dfn>document</dfn></dt>
           <dd>An object instantiating the <a href="http://www.w3.org/TR/DOM-Level-3-Core/core.html#i-Document" title="Document Object Model Core"><code>Document</code> interface</a> [<cite><a class="normative" href="#references-DOMCore">DOM3 Core</a></cite>], representing the entire HTML or XML text document.  Conceptually, it is the root of the document tree, and provides the primary access to the document's data.</dd>
@@ -473,11 +477,17 @@
           <dd>A DOM application is script or code, written by a content author or automatically generated, which takes advantage of the interfaces, methods, attributes, events, and other features described in this specification in order to make dynamic or interactive content, such as Web applications, exposed to users in a <a class="def" href="#glossary-user-agent">user agent</a>.</dd>
 
           <dt id="glossary-DOM-Level-0"><dfn>DOM Level 0</dfn></dt>
-          <dd>The term "DOM Level 0" refers to a mix of HTML document functionalities, often not formally specified but traditionally supported as de facto standards, implemented originally by Netscape Navigator version 3.0 or Microsoft Internet Explorer version 3.0.  In many cases, attributes or methods have been included for reasons of backward compatibility with "DOM Level 0".</dd>
+          <dd>The term “DOM Level 0” refers to a mix of HTML document functionalities, often not formally specified but traditionally supported as de facto standards, implemented originally by Netscape Navigator version 3.0 or Microsoft Internet Explorer version 3.0.  In many cases, attributes or methods have been included for reasons of backward compatibility with “DOM Level 0”.</dd>
 
           <dt id="glossary-event"><dfn>event</dfn></dt>
           <dd>An event is the representation of some occurrence (such as a mouse click on the presentation of an element, the removal of child node from an element, or any number of other possibilities) which is associated with its <a class="def" href="#glossary-proximal-event-target">proximal event target</a>.  Each event is an instantiation of one specific <a class="def" href="#glossary-event-type">event type</a>.</dd>
 
+          <dt id="glossary-event-order"><dfn>event order</dfn></dt>
+          <dd>The sequence in which events from the same event source or process occur, using the same or related event interfaces.  For example, in an environment with a a mouse, a track pad, and a keyboard, each of those input devices would constitute a separate event source, and each would follow its own event order; a <a class="eventtype" href="#event-type-mousedown"><code>mousedown</code></a> event from the trackpad, followed by a <a class="eventtype" href="#event-type-mouseup"><code>mouseup</code></a> event from the mouse would not result in a <a class="eventtype" href="#event-type-click"><code>click</code></a> event.      
+            Note that there may be interactions between different event orders; for example, a <a class="eventtype" href="#event-type-click"><code>click</code></a> event may be modified by a concurrent <a class="eventtype" href="#event-type-keypress"><code>keypress</code></a> event (<code>shift+click</code>); however, the event orders of these different event sources would be distinct.
+            The event order of some interfaces are device-independent; for example, a user may change focus using the <a href="#key-Tab"><code class="value keyname">'Tab'</code></a> key, or by clicking the new focused element with the mouse.  The event order in such cases depends on the state of the process, not on the state of the device that initiates the state change.
+          </dd>
+
           <dt id="glossary-event-phase"><dfn>event phase</dfn></dt>
           <dd>See <a class="def" href="#glossary-phase">phase</a>.</dd>
 
@@ -491,7 +501,7 @@
           <dd>Focus is a special state of receptivity and concentration on an particular element or other <a class="def" href="#glossary-event-target">event target</a> within a document.  Each element has different behavior when focused, depending on its functionality, such as priming the element for activation (as for a button or hyperlink) or toggling state (as for a checkbox), receiving text input (as for a text form field), or copying selected text.  For more details, see <a href="#events-focusevent-doc-focus">Document Focus and Focus Context</a>.</dd>
 
           <dt id="glossary-event-focus-ring"><dfn>focus ring</dfn></dt>
-          <dd>A focus ring is a an ordered set of <a class="def" href="#glossary-event-focus">focus</a> targets within a document.  A <a class="def" href="#glossary-host-language">host language</a> may define one or more ways to determine the order of targets, such as document order, a numerical index defined per focus target, explicit pointers between focus targets, or a hybrid of different models.  Each document may contain multiple focus rings, or conditional focus rings.  Typically, for document-order or indexed focus rings, focus "wraps around" from the last focus target to the first.</dd>
+          <dd>A focus ring is a an ordered set of <a class="def" href="#glossary-event-focus">focus</a> targets within a document.  A <a class="def" href="#glossary-host-language">host language</a> may define one or more ways to determine the order of targets, such as document order, a numerical index defined per focus target, explicit pointers between focus targets, or a hybrid of different models.  Each document may contain multiple focus rings, or conditional focus rings.  Typically, for document-order or indexed focus rings, focus “wraps around” from the last focus target to the first.</dd>
 
           <dt id="glossary-fire"><dfn>fire</dfn></dt>
           <dd>A synonym for <a href="#glossary-dispatch">dispatch</a>.</dd>
@@ -552,7 +562,7 @@
           <dd>The Unicode character categories, a subset of the complete Unicode general categories, comprise the categories <abbr title="Letter, Lowercase">Ll</abbr>, <abbr title="Letter, Modifier">Lm</abbr>, <abbr title="Letter, Other">Lo</abbr>, <abbr title="Letter, Titlecase">Lt</abbr>, <abbr title="Letter, Uppercase">Lu</abbr>, <abbr title="Number, Decimal Digit">Nd</abbr>, <abbr title="Number, Letter">Nl</abbr>, <abbr title="Number, Other">No</abbr>, <abbr title="Punctuation, Connector">Pc</abbr>, <abbr title="Punctuation, Dash">Pd</abbr>, <abbr title="Punctuation, Close">Pe</abbr>, <abbr title="Punctuation, Final quote">Pf</abbr>, <abbr title="Punctuation, Initial quote">Pi</abbr>, <abbr title="Punctuation, Other">Po</abbr>, <abbr title="Punctuation, Open">Ps</abbr>, <abbr title="Symbol, Currency">Sc</abbr>, <abbr title="Symbol, Modifier">Sk</abbr>, <abbr title="Symbol, Math">Sm</abbr>, and <abbr title="Symbol, Other">So</abbr>.</dd>
 
           <dt id="glossary-unicode-code-point"><dfn>Unicode code point</dfn></dt>
-          <dd>A Unicode code point is a unique hexadecimal number signifying a character by its index in the Unicode codespace (or library of characters).  In the context of key values, a Unicode code point is expressed as a string in the format "\u" followed by a hexadecimal character index in the range <code>0000</code> to <code>10FFFF</code>, using at least four digits.  See also <a class="def charrep" href="#glossary-character-value">character value</a>.</dd>
+          <dd>A Unicode code point is a unique hexadecimal number signifying a character by its index in the Unicode codespace (or library of characters).  In the context of key values, a Unicode code point is expressed as a string in the format “\u” followed by a hexadecimal character index in the range <code>0000</code> to <code>10FFFF</code>, using at least four digits.  See also <a class="def charrep" href="#glossary-character-value">character value</a>.</dd>
 
           <dt id="glossary-user-agent"><dfn>user agent</dfn></dt>
           <dd>A program, such as a browser or content authoring tool, normally running on a client machine, which acts on a user's behalf in retrieving, interpreting, executing, presenting, or creating content conforming to a specification.  Users may act on the content using different user agents at different times, for different purposes.  See the <a href="#conf-interactive-ua">Web browsers and other dynamic or interactive user agents</a> and <a href="#conf-author-tools">Authoring tools</a> conformance categories for more details.</dd>
@@ -632,7 +642,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 event order 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-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 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">
@@ -640,7 +650,20 @@
           <i class="note" id="_5"><strong>To Do:</strong> Create good example of async events.</i>
         </p>
       </div>
-<!-- div2 sync-async -->
+      
+<!-- div2 event-order-and-loops -->
+      <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>
+        
+      </div>
+
+      
+      
+<!-- div2 trusted events -->
       <div>
         <h3><a id="trusted-events" href="#trusted-events">3.4 Trusted events</a></h3>
 
@@ -655,7 +678,7 @@
         <p>Certain <a class="def" href="#glossary-proximal-event-target">proximal event targets</a> (such as a link or button element) may have associated <a class="def" href="#glossary-activation-behavior">activation behavior</a> (such a following a link) that implementations perform in response to an <em><a class="def" href="#glossary-activation-trigger">activation trigger</a></em> (such as clicking a link).</p>
         <p>A <a class="def" href="#glossary-host-language">host language</a> should indicate which, if any, elements have activation behavior, describe appropriate <a class="def" href="#glossary-activation-trigger">activation triggers</a>, and define the result of that activation behavior.  An implementation which supports a <a class="def" href="#glossary-host-language">host language</a> should initiate these <a class="def" href="#glossary-activation-behavior">activation behavior</a> when the associated <a class="def" href="#glossary-activation-trigger">activation trigger</a> occurs.</p>
         <p class="example" id="example-activation"><strong>Example:</strong> Both HTML and SVG have an <code class="element">a</code> element which indicates a link.  Relevant <a class="def" href="#glossary-activation-trigger">activation triggers</a> for an <code class="element">a</code> element are a <a class="eventtype" href="#event-type-click"><code>click</code></a> event on the text or image  content of the <code class="element">a</code> element, or a <a class="eventtype" href="#event-type-keydown"><code>keydown</code></a> event with a <a href="#events-KeyboardEvent-key">key</a> attribute value of <a href="#key-Enter"><code class="value keyname">'Enter'</code></a> key when the <code class="element">a</code> element has focus.  The activation behavior for an <code class="element">a</code> element is normally to change the content of the window to the content of the new document, in the case of external links, or to reposition the current document relative to the new anchor, in the case of internal links.</p>
-        <p>An <a class="def" href="#glossary-activation-trigger">activation trigger</a> is a user action or an event which indicates to the implementation that an activation behavior should be initiated.  User-initiated <a class="def" href="#glossary-activation-trigger">activation triggers</a> include clicking a mouse button on an activatable element, pressing the <a href="#key-Enter"><code class="value keyname">'Enter'</code></a> key when an activatable element has focus, or pressing a key that is somehow linked to an activatable element (a "hotkey" or "access key") even when that element does not have focus.  Event-based <a class="def" href="#glossary-activation-trigger">activation triggers</a> may include timer-based events that activate an element at a certain clock time or after a certain time period has elapsed, progress events after a certain action has been completed, or many other condition-based or state-based events.</p>
+        <p>An <a class="def" href="#glossary-activation-trigger">activation trigger</a> is a user action or an event which indicates to the implementation that an activation behavior should be initiated.  User-initiated <a class="def" href="#glossary-activation-trigger">activation triggers</a> include clicking a mouse button on an activatable element, pressing the <a href="#key-Enter"><code class="value keyname">'Enter'</code></a> key when an activatable element has focus, or pressing a key that is somehow linked to an activatable element (a “hotkey” or “access key”) even when that element does not have focus.  Event-based <a class="def" href="#glossary-activation-trigger">activation triggers</a> may include timer-based events that activate an element at a certain clock time or after a certain time period has elapsed, progress events after a certain action has been completed, or many other condition-based or state-based events.</p>
         <p>In some cases, a <a class="def" href="#glossary-host-language">host language</a> may define attributes or even attribute values which add to or change the native <a class="def" href="#glossary-activation-trigger">activation trigger</a> or <a class="def" href="#glossary-activation-behavior">activation behavior</a> of an element.  For example, ARIA [<cite><a class="informative" href="#ref-ARIA">ARIA</a></cite>] defines values for the <code class="attr">role</code> attribute that add semantics to the element to which it is applied, for purposes of enhanced accessibility.  In such cases, if the <a class="def" href="#glossary-host-language">host language</a> does not explicitly define the <a class="def" href="#glossary-activation-trigger">activation trigger</a> or <a class="def" href="#glossary-activation-behavior">activation behavior</a>, the content author must provide the mechanics of the <a class="def" href="#glossary-activation-trigger">activation trigger</a> (via an event listener) or <a class="def" href="#glossary-activation-behavior">activation behavior</a> (such as calling an ECMAScript function) for that element when applying that attributes or attribute value.</p>
         
         <h4><a id="click-synthesis" href="#click-synthesis">3.5.1 Activation event synthesis</a></h4>
@@ -1228,7 +1251,7 @@
           <dl>
             <dt><strong>Interface <em><a id="events-DocumentEvent">DocumentEvent</a></em></strong> (introduced in <strong class="since">DOM Level 2</strong>)</dt>
             <dd>
-              <p>The <code>DocumentEvent</code> interface provides a mechanism by which the user can create an <a href="#events-Event"><code>Event</code></a> object of a type supported by the implementation. If the feature "Events" is supported by the <code>Document</code> object, the <code>DocumentEvent</code> interface must be implemented on the same object.   Language-specific type casting may be required.</p>
+              <p>The <code>DocumentEvent</code> interface provides a mechanism by which the user can create an <a href="#events-Event"><code>Event</code></a> object of a type supported by the implementation. If the feature “Events” is supported by the <code>Document</code> object, the <code>DocumentEvent</code> interface must be implemented on the same object.   Language-specific type casting may be required.</p>
               <dl>
                 <dt>
                   <br />
@@ -2131,7 +2154,7 @@
               <p class="issue" id="issue-resize-repaint"><strong>Issue:</strong> Firing the event between reflow and repaint may be difficult in some UAs (see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=227495#c30">Mozilla Bug #227495</a>), but it seems the behavior most content authors would want.  Should we keep this, or change it to fire after repaint?</p>
 <!-- <p class="example" id="example-resize"><strong>Example:</strong> </p> -->
               <p>The <a class="def" href="#glossary-defaultView"><code>defaultView</code></a> object should always be resizable.  A <a class="def" href="#glossary-host-language">host language</a> should define which elements, if any, are resizable, and under what conditions (e.g. specific elements like <code class="element">iframe</code>, or elements with particular characteristics like width and height).</p>
-              <p class="note" id="note-resize-zoom"><strong>Note:</strong>  The <a class="eventtype" href="#event-type-resize"><code>resize</code></a> event is distinct from the SVG <code class="eventtype">zoom</code> event types, though both may occur at the same time, or as the consequence of the same user action.  In particular, browser "font zooming" or "page zooming" should not necessarily trigger a <a class="eventtype" href="#event-type-resize"><code>resize</code></a> event.</p>
+              <p class="note" id="note-resize-zoom"><strong>Note:</strong>  The <a class="eventtype" href="#event-type-resize"><code>resize</code></a> event is distinct from the SVG <code class="eventtype">zoom</code> event types, though both may occur at the same time, or as the consequence of the same user action.  In particular, browser “font zooming” or “page zooming” should not necessarily trigger a <a class="eventtype" href="#event-type-resize"><code>resize</code></a> event.</p>
               <p class="note" id="note-resize-bubbling"><strong>Note:</strong> In previous DOM Events specifications, the <a class="eventtype" href="#event-type-resize"><code>resize</code></a> event type was defined to have a <a class="def" href="#glossary-bubbling-phase">bubbling phase</a>, but for performance reasons, this was not implemented in most user agents, and this specification removes the <a class="def" href="#glossary-bubbling-phase">bubbling phase</a> for this event.</p>
             </dd>
           </dl>
@@ -2176,7 +2199,7 @@
 
       <p>This module defines the feature FocusEvents 3.0 and depends on the feature UIEvents 3.0.</p>
       
-      <p class="note" id="note-focus-uaag"><strong>Note:</strong> This interface and its associated event types and <a href="#events-focusevent-event-order">event order</a> were designed in accordance to the concepts and guidelines defined in <a href="http://www.w3.org/WAI/UA/2010/ED-UAAG20-20100308/">User Agent Accessibility Guidelines 2.0</a> [<a href="#references-UAAG2">UAAG 2.0</a>], with particular attention on the <a href="http://www.w3.org/WAI/UA/2010/ED-UAAG20-20100308/#gl-focus-mechanism">focus mechanism</a> and the terms defined in the <a href="http://www.w3.org/WAI/UA/2010/ED-UAAG20-20100308/#def-focus">glossary entry for focus</a>.</p>
+      <p class="note" id="note-focus-uaag"><strong>Note:</strong> This interface and its associated event types and <a href="#events-focusevent-event-order">focus event order</a> were designed in accordance to the concepts and guidelines defined in <a href="http://www.w3.org/WAI/UA/2010/ED-UAAG20-20100308/">User Agent Accessibility Guidelines 2.0</a> [<a href="#references-UAAG2">UAAG 2.0</a>], with particular attention on the <a href="http://www.w3.org/WAI/UA/2010/ED-UAAG20-20100308/#gl-focus-mechanism">focus mechanism</a> and the terms defined in the <a href="http://www.w3.org/WAI/UA/2010/ED-UAAG20-20100308/#def-focus">glossary entry for focus</a>.</p>
 
       <dl>
         <dt><strong>Interface <em><a id="events-FocusEvent">FocusEvent</a></em></strong> (introduced in <strong class="since">DOM Level 2</strong>)</dt>
@@ -3595,7 +3618,7 @@
                   </td>
                 </tr>
               </table>
-              <p>A <a class="def" href="#glossary-user-agent">user agent</a> must dispatch this event when one or more characters have been entered. These characters may originate from a variety of sources, e.g., characters resulting from a key being pressed or released on a keyboard device, from the processing of an <a class="def" href="#glossary-ime">input method editor</a>, or resulting from a voice command.  Where a "paste" operation generates a simple sequence of characters, i.e. a text passage without any structure or style information, this event type should be generated as well.</p>
+              <p>A <a class="def" href="#glossary-user-agent">user agent</a> must dispatch this event when one or more characters have been entered. These characters may originate from a variety of sources, e.g., characters resulting from a key being pressed or released on a keyboard device, from the processing of an <a class="def" href="#glossary-ime">input method editor</a>, or resulting from a voice command.  Where a “paste” operation generates a simple sequence of characters, i.e. a text passage without any structure or style information, this event type should be generated as well.</p>
             </dd>
           </dl>
         </div>
@@ -3718,7 +3741,7 @@
                   <dd><p><code>true</code> if the shift (Shift) key modifier is activated.</p></dd>
 
                   <dt><code class="attribute-name"><a id="events-KeyboardEvent-repeat">repeat</a></code> of type <code>boolean</code>, readonly</dt>
-                  <dd><code>true</code> if the key has been pressed in a sustained manner.  Depending on the system configuration, holding down a key results may result in multiple consecutive <a class="eventtype" href="#event-type-keydown"><code>keydown</code></a> events,  <a class="eventtype" href="#event-type-keypress"><code>keypress</code></a> events, and <a class="eventtype" href="#event-type-textInput"><code>textInput</code></a> events, for appropriate keys.   For mobile devices which have <em>long-key-press</em> behavior, the first key event with a <a href="#events-KeyboardEvent-repeat">repeat</a> attribute value of <code>'true'</code> shall serve as an indication of a <em>long-key-press</em>.  The length of time that the key must be pressed in order to begin repeating is configuration-dependent.</dd>
+                  <dd><code>true</code> if the key has been pressed in a sustained manner.  Depending on the system configuration, holding down a key results may result in multiple consecutive <a class="eventtype" href="#event-type-keydown"><code>keydown</code></a> events, <a class="eventtype" href="#event-type-keypress"><code>keypress</code></a> events, and <a class="eventtype" href="#event-type-textInput"><code>textInput</code></a> events, for appropriate keys.   For mobile devices which have <em>long-key-press</em> behavior, the first key event with a <a href="#events-KeyboardEvent-repeat">repeat</a> attribute value of <code>'true'</code> shall serve as an indication of a <em>long-key-press</em>.  The length of time that the key must be pressed in order to begin repeating is configuration-dependent.</dd>
 
                 </dl>
               </dd>
@@ -3997,8 +4020,8 @@
 
         <p>This module defines the feature CompositionEvents 3.0 and depends on the feature UIEvents 3.0.</p>
         <p>Composition Events provide a means for inputing text in a supplementary or alternate manner than by Keyboard Events, in order to allow the use of characters that may not be commonly available on keyboard. For example, Composition events may be used to add accents to characters despite their absence from standard US keyboards, to build up logograms of many Asian languages from their base components or categories, to select word choices from a combination of key presses on a mobile device keyboard, or to convert voice commands into text using a speech recognition processor.  Refer to <a href="#keys">Keyboard events and key values</a> for examples on how Composition Events are used in combination with keyboard events.</p>
-        <p>Conceptually, a composition session consists of one <a class="eventtype" href="#event-type-compositionstart"><code>compositionstart</code></a> event, one or more <a class="eventtype" href="#event-type-compositionupdate"><code>compositionupdate</code></a> events, and one <a class="eventtype" href="#event-type-compositionend"><code>compositionend</code></a> event, with the value of the <a href="#events-CompositionEvent-data">data</a> attribute persisting between each "stage" of this event chain during each session.  While a composition session is active, keyboard events should not be dispatched to the DOM (i.e., the <a class="def" href="#glossary-text-composition-system">text composition system</a> "swallows" the keyboard events), and only <a class="eventtype" href="#event-type-compositionupdate"><code>compositionupdate</code></a> events may be dispatched to indicate the composition process.</p>
-        <p>Not all <a class="def" href="#glossary-ime">IME</a> systems or devices expose the necessary data to the DOM, so the active composition string (the "Reading Window" or "candidate selection menu option") may not be available through this interface, in which case the selection may be represented by the empty string.</p>
+        <p>Conceptually, a composition session consists of one <a class="eventtype" href="#event-type-compositionstart"><code>compositionstart</code></a> event, one or more <a class="eventtype" href="#event-type-compositionupdate"><code>compositionupdate</code></a> events, and one <a class="eventtype" href="#event-type-compositionend"><code>compositionend</code></a> event, with the value of the <a href="#events-CompositionEvent-data">data</a> attribute persisting between each “stage” of this event chain during each session.  While a composition session is active, keyboard events should not be dispatched to the DOM (i.e., the <a class="def" href="#glossary-text-composition-system">text composition system</a> “swallows” the keyboard events), and only <a class="eventtype" href="#event-type-compositionupdate"><code>compositionupdate</code></a> events may be dispatched to indicate the composition process.</p>
+        <p>Not all <a class="def" href="#glossary-ime">IME</a> systems or devices expose the necessary data to the DOM, so the active composition string (the “Reading Window” or “candidate selection menu option”) may not be available through this interface, in which case the selection may be represented by the empty string.</p>
         <dl>
           <dt><strong>Interface <em><a id="events-CompositionEvent">CompositionEvent</a></em></strong> (introduced in <strong class="since">DOM Level 3</strong>)</dt>
           <dd>
@@ -4204,13 +4227,13 @@
         <div>
           <h4><a id="handwriting" href="#handwriting">5.2.7.2 Handwriting Recognition Systems</a></h4>
 
-          <p>The following example describes a possible sequence of events when composing a text passage "text" with a handwriting recognition system, such as on a pen tablet, as modeled using Composition Events.</p>
+          <p>The following example describes a possible sequence of events when composing a text passage “text” with a handwriting recognition system, such as on a pen tablet, as modeled using Composition Events.</p>
           <p class="issue"><strong>Issue:</strong> needs more investigation, particularly with regard to pen-tablet events.</p>
           <div class="example" id="example-composition-selection">
             <p><strong>Example:</strong></p>
             <ol>
               <li><a class="eventtype" href="#event-type-compositionstart"><code>compositionstart</code></a>: <code class="value">''</code></li>
-              <li><a class="eventtype" href="#event-type-compositionupdate"><code>compositionupdate</code></a>: <code class="value">'test'</code><i class="issue" id="issue-compositionupdate"><strong>Issue:</strong> what's going on here? is there a "reject" option that's being exemplified?</i></li>
+              <li><a class="eventtype" href="#event-type-compositionupdate"><code>compositionupdate</code></a>: <code class="value">'test'</code><i class="issue" id="issue-compositionupdate"><strong>Issue:</strong> what's going on here? is there a “reject” option that's being exemplified?</i></li>
               <li><a class="eventtype" href="#event-type-compositionupdate"><code>compositionupdate</code></a>: <code class="value">'text'</code></li>
               <li><a class="eventtype" href="#event-type-compositionend"><code>compositionend</code></a>: <code class="value">'text'</code></li>
               <li><a class="eventtype" href="#event-type-textInput"><code>textInput</code></a>: <code class="value">'text'</code> (<code>"inputMode"</code>: <code class="value">'DOM_INPUT_METHOD_HANDWRITING'</code>)</li>
@@ -4808,7 +4831,7 @@
         <h4><a id="key-legends" href="#key-legends">6.1.1 Key Legends</a></h4>
 
         <p><em>This section is informative</em></p>
-        <p>The visual markings normally consist of one or more characters which a keystroke on that key will produce (such as <code class="value">'F'</code>, <code class="value">'8'</code>, or <code class="value">'ш'</code>), or names or symbols which indicate that key's function (such as an upward-pointing arrow &#x21E7; indicating <code class="value">'Shift'</code>, or the string <code class="value">'Enter'</code>).  Keys are often referred to by this marking (e.g. "Press the <code class="value">'Shift'</code> and <code class="value">'F'</code> keys.").  However, the visual appearance of the key has no bearing on its digital representation, and in many configurations may be completely inaccurate; even the control and function keys, such as <code class="value">'Enter'</code>, may be mapped to different functionality, or even mapped as character keys.</p>
+        <p>The visual markings normally consist of one or more characters which a keystroke on that key will produce (such as <code class="value">'F'</code>, <code class="value">'8'</code>, or <code class="value">'ш'</code>), or names or symbols which indicate that key's function (such as an upward-pointing arrow &#x21E7; indicating <code class="value">'Shift'</code>, or the string <code class="value">'Enter'</code>).  Keys are often referred to by this marking (e.g. “Press the <code class="value">'Shift'</code> and <code class="value">'F'</code> keys.”).  However, the visual appearance of the key has no bearing on its digital representation, and in many configurations may be completely inaccurate; even the control and function keys, such as <code class="value">'Enter'</code>, may be mapped to different functionality, or even mapped as character keys.</p>
         <p>For historical reasons, the character keys are typically marked with the capital-letter equivalents of the character value they produce, e.g. the <code class="value">'F'</code> key (the key marked with the glyph <code class="value">'F'</code>), will produce the character value <code class="value">'f'</code> when pressing without an active modifier key (<code class="value">'Shift'</code>) or modifier state (<code class="value">'CapsLock'</code>).</p>
         <p>Note that the key legends for function keys do not normally produce any characters, although the symbol may have a Unicode equivalent; for example, the <code class="value">'Shift'</code> key may bear the symbol &#x21E7;, which has the <a class="def" href="#glossary-unicode-code-point">Unicode code point</a> <code class="value">'21E7'</code>, but pressing the <code class="value">'Shift'</code> key will not produce this character value, and there is no <a class="def" href="#glossary-unicode-code-point">Unicode code point</a> for <code class="value">'Shift'</code>.</p>
         <h4><a id="keyboard-layout" href="#keyboard-layout">6.1.2 Keyboard Layout</a></h4>
@@ -4958,9 +4981,9 @@
         <div>
           <h4><a id="keys-DeadKeys" href="#keys-DeadKeys">6.2.3 Dead keys</a></h4>
 
-          <p>Some keyboard input uses <a class="def" href="#glossary-dead-key">dead keys</a> for the input of composed character sequences. Unlike the handwriting sequence, in which users enter the base character first, keyboard input requires to enter a special state when a <a class="def" href="#glossary-dead-key">dead key</a> is pressed and emit the character(s) only when one of a limited number of "legal" base character is entered.  (NOTE: the MacOS and Linux operating systems use input methods to process <a class="def" href="#glossary-dead-key">dead keys</a>.)
+          <p>Some keyboard input uses <a class="def" href="#glossary-dead-key">dead keys</a> for the input of composed character sequences. Unlike the handwriting sequence, in which users enter the base character first, keyboard input requires to enter a special state when a <a class="def" href="#glossary-dead-key">dead key</a> is pressed and emit the character(s) only when one of a limited number of “legal” base character is entered.  (NOTE: the MacOS and Linux operating systems use input methods to process <a class="def" href="#glossary-dead-key">dead keys</a>.)
                           </p>
-          <p>The <a class="def" href="#glossary-dead-key">dead keys</a> are represented in the key values set using combining diacritical marks. The sequence of keystrokes "\u0302" (Combining Circumflex Accent key) and "\u0065" (key marked with the Latin Small Letter E) will likely produce (on a PC/AT french keyboard using a french mapping and without any modifier activated) the Unicode character &#xEA; (Latin Small Letter E With Circumflex), as preferred by the Unicode Normalization Form <em>NFC</em>:</p>
+          <p>The <a class="def" href="#glossary-dead-key">dead keys</a> are represented in the key values set using combining diacritical marks. The sequence of keystrokes <code>'\u0302'</code> (Combining Circumflex Accent key) and <code>'\u0065'</code> (key marked with the Latin Small Letter E) will likely produce (on a PC/AT french keyboard using a french mapping and without any modifier activated) the Unicode character &#xEA; (Latin Small Letter E With Circumflex), as preferred by the Unicode Normalization Form <em>NFC</em>:</p>
           <div class="example" id="example-deadkey">
             <p><strong>Example:</strong></p>
             <ol>
@@ -4998,9 +5021,9 @@
         <div>
           <h4><a id="keys-IME" href="#keys-IME">6.2.4 Input Method Editors</a></h4>
 
-          <p>This specification includes a model for <a class="def" href="#glossary-ime">input method editors (IMEs)</a>, through the <a href="#events-compositionevents">CompositionEvent</a> interface and events.  However, composition events and keyboard events do not necessarily map as a one-to-one relationship.  As an example, receiving a <a class="eventtype" href="#event-type-keydown"><code>keydown</code></a> for the "Accept" key value does not necessarily imply that the text currently selected in the <a class="def" href="#glossary-ime">IME</a> is being accepted, but indicates only that a keystroke happened, disconnected from the <a class="def" href="#glossary-ime">IME</a> Accept functionality (which would normally result in a <a class="eventtype" href="#event-type-compositionend"><code>compositionend</code></a> event in most <a class="def" href="#glossary-ime">IME</a> systems).  Keyboard events cannot be used to determine the current state of the input method editor, which should be obtained through the <a href="#events-CompositionEvent-data"><code>data</code></a> attribute of the <a href="#events-compositionevents">CompositionEvent</a> interface.  Additionally, <a class="def" href="#glossary-ime">IME</a> systems and devices vary in their functionality, and in which keys are used for activating that functionality, such that the <code class="value">'Convert'</code> and <code class="value">'Accept'</code> keys may be represented by other available keys.</p>
+          <p>This specification includes a model for <a class="def" href="#glossary-ime">input method editors (IMEs)</a>, through the <a href="#events-compositionevents">CompositionEvent</a> interface and events.  However, composition events and keyboard events do not necessarily map as a one-to-one relationship.  As an example, receiving a <a class="eventtype" href="#event-type-keydown"><code>keydown</code></a> for the <a href="#key-Accept"><code class="value keyname">'Accept'</code></a> key value does not necessarily imply that the text currently selected in the <a class="def" href="#glossary-ime">IME</a> is being accepted, but indicates only that a keystroke happened, disconnected from the <a class="def" href="#glossary-ime">IME</a> Accept functionality (which would normally result in a <a class="eventtype" href="#event-type-compositionend"><code>compositionend</code></a> event in most <a class="def" href="#glossary-ime">IME</a> systems).  Keyboard events cannot be used to determine the current state of the input method editor, which should be obtained through the <a href="#events-CompositionEvent-data"><code>data</code></a> attribute of the <a href="#events-compositionevents">CompositionEvent</a> interface.  Additionally, <a class="def" href="#glossary-ime">IME</a> systems and devices vary in their functionality, and in which keys are used for activating that functionality, such that the <code class="value">'Convert'</code> and <code class="value">'Accept'</code> keys may be represented by other available keys.</p>
           <p>Keyboard events correspond to the events generated by the input device after the keyboard layout mapping but before the processing of the input method editor.</p>
-          <p>The following example describes a possible sequence of keys to generate the Unicode character &#x5E02; (Kanji character, part of CJK Unified Ideographs) using Japanese input methods. This example assumes that the input method editor is activated and in the Japanese-Romaji input mode. The keys <code class="value">'Convert'</code> and <code class="value">'Accept'</code> may be replaced by others depending on the input device in use and the configuration of the IME, e.g. it could be respectively <code class="value">U+0020</code> (Space key) and <code class="value">'Enter'</code>. <span class="note" id="_54"><strong>Note:</strong><code class="value">'&#x8A69;'</code> ("poem") and <code class="value">'&#x5E02;'</code> ("city") are homophones, both pronounced "shi", so the user must use the <code class="value">'Convert'</code> key to select the proper option.</span></p>
+          <p>The following example describes a possible sequence of keys to generate the Unicode character &#x5E02; (Kanji character, part of CJK Unified Ideographs) using Japanese input methods. This example assumes that the input method editor is activated and in the Japanese-Romaji input mode. The keys <code class="value">'Convert'</code> and <code class="value">'Accept'</code> may be replaced by others depending on the input device in use and the configuration of the IME, e.g. it could be respectively <code class="value">U+0020</code> (Space key) and <code class="value">'Enter'</code>. <span class="note" id="_54"><strong>Note:</strong><code class="value">'&#x8A69;'</code> ("poem") and <code class="value">'&#x5E02;'</code> ("city") are homophones, both pronounced “shi”, so the user must use the <code class="value">'Convert'</code> key to select the proper option.</span></p>
           <div class="example" id="example-compo">
             <p><strong>Example:</strong></p>
             <ol>
@@ -5021,7 +5044,7 @@
               <li><a class="eventtype" href="#event-type-keyup"><code>keyup</code></a>: <code class="value">'Accept'</code></li>
             </ol>
           </div>
-          <p>IME composition may also be canceled as in the following example, with conditions identical to the previous example.  The key "Cancel" may also be replaced by others depending on the input device in use and the configuration of the IME, e.g. it could be "\u001B" (Escape key).</p>
+          <p>IME composition may also be canceled as in the following example, with conditions identical to the previous example.  The key <a href="#key-Cancel"><code class="value keyname">'Cancel'</code></a> may also be replaced by others depending on the input device in use and the configuration of the IME, e.g. it could be "\u001B" (Escape key).</p>
           <div class="example" id="example-compo_cancel">
             <p><strong>Example:</strong></p>
             <ol>
@@ -5191,7 +5214,7 @@
           <p>In the following list, character values for printing control characters are described as a character escape, for convenience, using the JavaScript notation for escapes.</p>
           
           <div id="js-escape" class="note">
-            <p><strong>Note:</strong> There are special internationalization considerations for ECMAScript escaped characters.  CharMod conformance [<cite><a class="normative" href="#references-charmod">CharMod</a></cite>] <a href="http://www.w3.org/TR/charmod/#C045">expects</a> the use of code points rather than surrogate pairs in escapes; ECMAScript escaped characters use surrogate pairs for characters outside the Basic Multilingual Plane ("\uD84E\uDDC2" for &#x239C2;, a Chinese character meaning "untidy"), rather than C-style fixed-length characters ("\U000239c2" for &#x239C2;) or delimited escapes such as Numeric Character References ("&amp;#x239C2;").  Characters escaped in this manner:</p>
+            <p><strong>Note:</strong> There are special internationalization considerations for ECMAScript escaped characters.  CharMod conformance [<cite><a class="normative" href="#references-charmod">CharMod</a></cite>] <a href="http://www.w3.org/TR/charmod/#C045">expects</a> the use of code points rather than surrogate pairs in escapes; ECMAScript escaped characters use surrogate pairs for characters outside the Basic Multilingual Plane ("\uD84E\uDDC2" for &#x239C2;, a Chinese character meaning “untidy”), rather than C-style fixed-length characters ("\U000239c2" for &#x239C2;) or delimited escapes such as Numeric Character References ("&amp;#x239C2;").  Characters escaped in this manner:</p>
             <ul>
               <li>are based on UTF-16 encoding, in that it uses surrogate pairs for values outside the Basic Multilingual Plane</li>
               <li>are expressed using surrogate pairs, which makes it difficult for a human to look up the value, and may require unnecessary overhead for machine processing; this can also cause problems with software written in the incorrect belief that Unicode is a 16-bit character set</li>