--- a/html/DOM3-Events.html Thu Oct 29 17:02:04 2009 +0900
+++ b/html/DOM3-Events.html Fri Oct 30 05:44:37 2009 +0900
@@ -226,7 +226,7 @@
<dl>
<dt>Editors:</dt>
<dd>Doug Schepers, <em>W3C</em></dd>
- <dd><a href="http://bjoern.hoehrmann.de/">Björn Höhrmann</a>, <em>Invited Expert (until December 2007)</em></dd>
+ <dd>Björn Höhrmann, <em>Invited Expert (until December 2007)</em></dd>
<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>
@@ -527,17 +527,6 @@
<li>
<a href="#extending_events-Custom_Events">A.2 Custom Events</a>
</li>
- <!-- <li>
- <a href="#extending_events-Namespaced_Events">A.3 Namespaced Events</a>
- <ul class="toc">
- <li>
- <a href="#extending_events-Legacy_Events">A.3.1 Legacy Events</a>
- </li>
- <li>
- <a href="#extending_events-Vendor_Extensions">A.3.2 Vendor Extensions</a>
- </li>
- </ul>
- </li> -->
</ul>
</li>
<li>
@@ -889,7 +878,7 @@
<!-- div2 Events-flow -->
<div class="div2">
<h3 class="div2"><a id="event-flow-cancelation" href="#event-flow-cancelation">3.2 Default actions and cancelable events</a></h3>
- <p>Event objects may have <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="noxref informative" href="#references-HTML40">HTML 4.01</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 <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="noxref 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><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">@@ insert example here: <input type="checkbox">'s .checked handling comes to mind.
.checked is changed just before 'click' event is dispatched, and if
@@ -1227,7 +1216,7 @@
</code>
</dt>
<dd>
- <div class="method">Registers an event listener, depending on the <code>useCapture</code> parameter, on the capture phase of the DOM event flow or its target and bubbling phases. <!-- Invoking this method shall be equivalent to invoking <code>addEventListenerNS</code> with the same values for the parameters <code>type</code>, <code>listener</code>, and <code>useCapture</code>, and the value <code>null</code> for the parameter <code>namespaceURI</code>. When this method is used to register an event listener, implementations may also dispatch events with the same <code>type</code> in other namespaces, for purposes of extensibility (e.g. this method may be used to dispatch <code>foo</code> event for the <code>null</code> namespace, or for a vendor-specific namespace); see <a href="#extending_events">Appendix A: Extending Events</a> for more details. -->
+ <div class="method">Registers an event listener, depending on the <code>useCapture</code> parameter, on the capture phase of the DOM event flow or its target and bubbling phases.
<div class="parameters"><strong>Parameters</strong>
<div class="paramtable">
<dl>
@@ -1577,7 +1566,7 @@
<p>Each event shall be associated with a type, called <em>event type</em> and available as the <a class="noxref" href="#events-event-type-type"><code class="interface-attribute">type</code></a> attribute on the event object. The event type must be of type <code>DOMString</code>.</p>
<div class="div3">
<h4 class="div3"><a id="event-types-list" href="#event-types-list">5.1.1 List of DOM3 Event Types</a></h4>
- <p>Depending on the level of DOM support, or the devices used for display (e.g. screen) or interaction (e.g., mouse, keyboard, touch screen, or voice), these event types can be generated by the implementation. When used with an [<cite><a class="noxref informative" href="#references-XML">XML 1.0</a></cite>] or [<cite><a class="noxref informative" href="#references-HTML40">HTML 4.01</a></cite>] application, the specifications of those languages may restrict the semantics and scope (in particular the possible <a class="def" href="#glossary-proximal-event-target">proximal event targets</a>) associated with an event type. Refer to the specification defining the language used in order to find those restrictions or to find event types that are not defined in this document.</p>
+ <p>Depending on the level of DOM support, or the devices used for display (e.g. screen) or interaction (e.g., mouse, keyboard, touch screen, or voice), these event types can be generated by the implementation. When used with an [<cite><a class="noxref informative" href="#references-XML">XML 1.0</a></cite>] or [<cite><a class="noxref informative" href="#references-HTML5">HTML5</a></cite>] application, the specifications of those languages may restrict the semantics and scope (in particular the possible <a class="def" href="#glossary-proximal-event-target">proximal event targets</a>) associated with an event type. Refer to the specification defining the language used in order to find those restrictions or to find event types that are not defined in this document.</p>
<p>The following table provides a non-normative summary of the event types defined in this specification. All events must accomplish the capture and target phases, but not all of them must accomplish the bubbling phase (see also <a href="#event-flow">Event dispatch and DOM event flow</a>). Some events are not <a href="#events-dt-cancelable-event">cancelable</a> (see <a href="#event-flow-cancelation">Default actions and cancelable events</a>). Some events must only be dispatched to a specific set of possible targets in the DOM event flow, specified using node types. Contextual information related to the event type must be accessible using DOM interfaces.</p>
<table border="1" cellpadding="2" cellspacing="0" summary="This table contains the complete list of event types defined by DOM Level 3 Events. The first column contains the local name of the event type. The second column indicates if the event accomplish the bubbling phase or not (all events accomplish the capture and target phases). The third column indicates if the default action associated with the event can be canceled. The fourth column indicates the nodes that can be target of the event. the fifth (and last) column indicates the DOM interface implemented by the event object.">
<tr>
@@ -1748,7 +1737,7 @@
<td>No</td>
<td>none</td>
</tr>
- <tr>
+ <!-- <tr>
<td>
<a class="eventtype" href="#event-type-DOMContentLoaded"><code>DOMContentLoaded</code></a>
</td>
@@ -1761,7 +1750,7 @@
</td>
<td>No</td>
<td>none</td>
- </tr>
+ </tr> -->
<tr>
<td>
<a class="eventtype" href="#event-type-DOMCharacterDataModified"><code>DOMCharacterDataModified</code></a>
@@ -2334,7 +2323,8 @@
<a class="eventtype noxref" href="#event-type-load"><code>load</code></a>
</dt>
<dd><table border="0" summary="This table contains information about the semantics of the given event type" cellpadding="2" cellspacing="0"><tr class="assert must"><th>Type</th><td class="eventname"><strong><code>load</code></strong></td></tr><tr class="assert must"><th>Interface</th><td><a href="#events-Events-UIEvent"><code>UIEvent</code></a> if generated from a user interface, <a href="#events-Events-Event"><code>Event</code></a> otherwise.</td></tr><tr class="assert must"><th>Bubbles</th><td>No</td></tr><tr class="assert must"><th>Target</th><td><code>Document</code>, <code>Element</code></td></tr><tr class="assert must"><th>Cancelable</th><td>No</td></tr><tr class="assert must"><th>Default action</th><td>none</td></tr><tr class="assert must"><th>Context info</th><td><a href="#events-Events-UIEvent-view"><code>UIEvent.view</code></a> may be in use.</td></tr></table>
- A <a class="def" href="#glossary-user-agent">user agent</a> must dispatch this event when the DOM implementation finishes loading the resource (such as the document) and any dependent resources (such as images, style sheets, or scripts). Dependent resources that fail to load must not prevent this event from firing if the resource that loaded them is still accessible via the DOM. If this event type is dispatched, implementations are required to dispatch this event at least on the <code>Document</code> node. This event differs from the <a class="eventtype" href="#event-type-DOMContentLoaded"><code>DOMContentLoaded</code></a> event in that it is not dispatched until all external resources are loaded.
+ A <a class="def" href="#glossary-user-agent">user agent</a> must dispatch this event when the DOM implementation finishes loading the resource (such as the document) and any dependent resources (such as images, style sheets, or scripts). Dependent resources that fail to load must not prevent this event from firing if the resource that loaded them is still accessible via the DOM. If this event type is dispatched, implementations are required to dispatch this event at least on the <code>Document</code> node.
+ <!-- This event differs from the <a class="eventtype" href="#event-type-DOMContentLoaded"><code>DOMContentLoaded</code></a> event in that it is not dispatched until all external resources are loaded. -->
</dd>
</dl>
</div>
@@ -2393,7 +2383,7 @@
</dt>
<dd><table border="0" summary="This table contains information about the semantics of the given event type" cellpadding="2" cellspacing="0"><tr class="assert must"><th>Type</th><td class="eventname"><strong><code>select</code></strong></td></tr><tr class="assert must"><th>Interface</th><td><a href="#events-Events-UIEvent"><code>UIEvent</code></a> if generated from a user interface, <a href="#events-Events-Event"><code>Event</code></a> otherwise.</td></tr><tr class="assert must"><th>Bubbles</th><td>Yes</td></tr><tr class="assert must"><th>Target</th><td><code>Element</code></td></tr><tr class="assert must"><th>Cancelable</th><td>No</td></tr><tr class="assert must"><th>Default action</th><td>none</td></tr><tr class="assert must"><th>Context info</th><td><a href="#events-Events-UIEvent-view"><code>UIEvent.view</code></a> may be in use</td></tr></table>
A <a class="def" href="#glossary-user-agent">user agent</a> must dispatch this event when a user selects some text. This specification does not provide contextual information to access the selected text. <span class="issue">@@ need to detail how the author can get at this information, perhaps through HTML5 <a href="http://dev.w3.org/html5/spec/editing.html#selection" title="7 User Interaction — HTML 5">text selection APIs</a></span> <!-- The <a class="def" href="#glossary-user-agent">user agent</a> must make the selected text passage available through the <a href="#events-Events-UIEvent-detail"><code>UIEvent.detail</code></a> attribute. <span class="issue">@@ should the selection include the markup structure, or just the text-content?</span> --> This event is dispatched after the selection has occurred.
- <p class="note"><strong>Note:</strong> The <a class="eventtype" href="#event-type-select"><code>select</code></a> event may not be available for all elements in all languages. For example, in [<cite><a class="noxref informative" href="#references-HTML40">HTML 4.01</a></cite>], <a class="eventtype" href="#event-type-select"><code>select</code></a> events will only be dispatched on only form <code>input</code> and <code>textarea</code> elements. Implementations may dispatch <a class="eventtype" href="#event-type-select"><code>select</code></a> events in any context deemed appropriate, including text selections outside of form controls, or image or markup selections such as in SVG.</p>
+ <p class="note"><strong>Note:</strong> The <a class="eventtype" href="#event-type-select"><code>select</code></a> event may not be available for all elements in all languages. For example, in [<cite><a class="noxref informative" href="#references-HTML5">HTML5</a></cite>], <a class="eventtype" href="#event-type-select"><code>select</code></a> events will only be dispatched on only form <code>input</code> and <code>textarea</code> elements. Implementations may dispatch <a class="eventtype" href="#event-type-select"><code>select</code></a> events in any context deemed appropriate, including text selections outside of form controls, or image or markup selections such as in SVG.</p>
</dd>
</dl>
</div>
@@ -4342,7 +4332,7 @@
<li>Consider the current function of the key (i.e., with modifiers), taking into consideration the keyboard layout mapping in use, to determine if a corresponding Unicode character exists from which a key identifier may be derived.
<!-- If multiple Unicode characters exist which correspond to the primary function of the key, the Unicode character with the lowest codepoint must be used. <span class="issue">@@ won't this be a problem for detecting the range for that character, if it's intended to be from a particular language? is there some way for the implementation to detect which language or code block the code point is from?</span> -->
<ol>
- <li>If the primary function of the key is to generate a character, and that character is in one of the <a class="def" href="#glossary-Unicode-character-categories">Unicode character categories</a>, then the key identifier shall be a string consisting of just that character. <!-- If the primary function of the key is to generate a character in class <abbr title="Letter, Lowercase">Ll</abbr> for which there exists an equivalent, single character in class <abbr title="Letter, Uppercase">Lu</abbr>, the uppercase character should be used instead. <br/><span class="issue">Is this necessary? Why can't we simply allow lowercase letters as well? If a script author wishes to do a comparison, they can cast the output to upper or lower case as needed. See <a href="http://www.w3.org/2008/webapps/track/issues/23" title="ISSUE-23 - Web Applications Working Group Tracker">ISSUE-23</a>.</span> --></li>
+ <li>If the primary function of the key is to generate a character, and that character is in one of the <a class="def" href="#glossary-Unicode-character-categories">Unicode character categories</a>, then the key identifier shall be a string consisting of just that character as a <a class="def" href="#glossary-character-value">character value</a>. <!-- If the primary function of the key is to generate a character in class <abbr title="Letter, Lowercase">Ll</abbr> for which there exists an equivalent, single character in class <abbr title="Letter, Uppercase">Lu</abbr>, the uppercase character should be used instead. <br/><span class="issue">Is this necessary? Why can't we simply allow lowercase letters as well? If a script author wishes to do a comparison, they can cast the output to upper or lower case as needed. See <a href="http://www.w3.org/2008/webapps/track/issues/23" title="ISSUE-23 - Web Applications Working Group Tracker">ISSUE-23</a>.</span> --></li>
<li> If the primary function of the key is to generate a character that is not in one of the above general categories, or if the primary function of the key is a function for which there exists a corresponding Unicode character that is not in one of the above general categories, then:
<ol>
<li>If there exists an appropriate key identifier in the <a href="#keyset-keyidentifiers">key identifiers set</a>, and that key identifier does not have a <a class="def" href="#glossary-unicode-code-point">Unicode code point</a>, that key identifier must be used.</li>
@@ -4376,10 +4366,12 @@
<div id"js-escape" class="issue">
<p>@@ Javascript escaped characters may have issues:</p>
<ul>
- <li>based on UTF-16 encoding</li>
<li>may not be suitable for Java or C, which use different escaping mechanisms (could be solved with a normalizing methods such as <a href="#events-Events-DocumentEvent-convertKeyIdentifier"><code>DocumentEvent.convertKeyIdentifier</code></a>)</li>
+ <li>based on UTF-16 encoding, in that it uses surrogate pairs for values outside the Basic Multilingual Plane</li>
+ <li>expressing characters using surrogate pairs makes it difficult for a human to look up the value, and requires unnecessary overhead for machine processing; can also cause problems with software written in the incorrect belief that Unicode is a 16-bit character set</li>
<li>problematic for characters on supplementary planes (emoji, or Chinese characters on plane 2), some of which are keyable</li>
- <li>Javascript escaped characters use surrogate pairs for characters outside the Basic Multilingual Plane ("\uD84C\uDFB4" for 𣎴), rather than C-style fixed-length characters ("\U000233b4"for 𣎴) or delimited escapes such as Numeric Character References ("&#x233B4;"); note: 𣎴 is a Chinese character meaning "tree stump".</li>
+ <li>CharMod conformance [<cite><a class="noxref 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</li>
+ <li>Javascript escaped characters use surrogate pairs for characters outside the Basic Multilingual Plane ("\uD84E\uDDC2" for 𣧂), rather than C-style fixed-length characters ("\U000239c2" for 𣧂) or delimited escapes such as Numeric Character References ("&#x239C2;"). <span class="note"><strong>Note:</strong> 𣧂 is a Chinese character meaning "untidy".</span></li>
</ul>
</div>
@@ -6323,19 +6315,6 @@
</div>
<br />
- <!-- <div class="atrisk">
- <h2 class="adiv2"><a id="extending_events-Namespaced_Events" href="#extending_events-Namespaced_Events">A.3 Namespaced Events</a></h2>
- <p>This specification introduces namespaces into the event model, in order to allow expansion of the set of events in a manner that doesn't introduce potential conflicts.</p>
- <h3 class="adiv2"><a id="extending_events-Legacy_Events" href="#extending_events-Legacy_Events">A.3.1 Legacy Events</a></h3>
- <p>An existing implementation which is being adapted to work with the W3C DOM Events specifications may have an existing framework and set of proprietary events. For backwards compatibility, it may be desirable that such an implementation keep these existing events, while providing the means for them to work within the DOM Events framework. In this case, the implementer can simply assign their own vendor-specific namespace to these proprietary events.</p>
- <p>In some cases, these legacy events may conflict with other implementation-specific events with the same name, but different functionality. Using the namespace-aware method <a href="#events-Events-EventTargetGroup-addEventListenerNS"><code>EventTarget.addEventListenerNS()</code></a>, an author can target that event specifically, with no risk of clashes.</p>
- <p>When there are no known conflicting events, or when such events have the same functionality, the author can simply use the non-namespace-aware method <a href="#events-Events-EventTarget-addEventListener"><code>EventTarget.addEventListener()</code></a>, which can register events without regard to the namespace.</p>
- <p class="example">As an example, a particular browser vendor, "FooCorp", may have an event, "skip", which was implemented long ago, and which also works with another FooCorp product. They need to keep this event for backwards compatibility with existing content for some of their clients, but since this event is very specific to their product lines, they don't anticipate that it will be of general use in competing browsers. This vendor implements "skip" in their browser, using their namespace, <code class="value">'http://example.com/foo/browser/events/'</code>. Their event continues to work using their existing event registration system, and also works with W3C DOM Events methods, both <code>someElement.addEventListener( "skip", doSkip, false )</code> and <code>someElement.addEventListenerNS( "http://example.com/foo/browser/events/", "skip", doSkip, false )</code>. Other browsers simply ignore this event, and legacy content continues to work in the FooCorp browser.</p>
- <h3 class="adiv2"><a id="extending_events-Vendor_Extensions" href="#extending_events-Vendor_Extensions">A.3.2 Vendor Extensions</a></h3>
- <p>While a new event is being designed and prototyped, or when an event is intended for implementation-specific functionality, it is desirable to distinguish it from standardized events. In CSS, the mechanism for doing this is to provide <a href="http://www.w3.org/TR/CSS21/syndata.html#vendor-keywords" title="Syntax and basic data types">vendor-specific keyword prefixes</a>; however, this has the unfortunate side-effect of forcing authors to maintain code that may be identical between vendors, but which nevertheless must retain the prefix.</p>
- <p>In DOM Events, by using namespaces for vendor-specific events, an author can choose either to target a particular snapshot of an implementation-specific event by using the namespace-aware method <a href="#events-Events-EventTargetGroup-addEventListenerNS"><code>EventTarget.addEventListenerNS()</code></a>, or to write code that assumes broader future implementation by using the non-namespace-aware method <a href="#events-Events-EventTarget-addEventListener"><code>EventTarget.addEventListener()</code></a>.</p>
- <p class="example">As an example, a particular browser vendor, "FooCorp", may wish to introduce a new event, "jump". This vendor implements "jump" in their browser, using their namespace, <code class="value">'http://example.com/foo/browser/events/'</code>. Early adopters start experimenting with the event, using <code>someElement.addEventListenerNS( "http://example.com/foo/browser/events/", "jump", doJump, false )</code>, and provide feedback to FooCorp, who change the behavior of "jump" accordingly. After some time, another vendor, "BarOrg", decides they also want the functionality, but implement it slightly differently, so they use their own namespace, <code class="value">'http://example.org/bar/browser/events/'</code> but with the same event type, "jump". Authors experimenting with this version of "jump" register events with BarOrg's namespace. Authors who wish to write code that accounts for both browsers can either register each event type separately with specific handlers, or use the same handler and switch on the namespace of the event; thus, early experiments in different codebases do not conflict, and the easrly-adopter is able to write easily-maintained code for multiple implementations. Eventually, as the feature matures, the behavior of both browsers stabilizes and may converge due to author and user feedback or through formal standardization; as this stabilization occurs, and risk of conflicts decrease, authors can remove the forked code, and assume the "jump" event is in the <code>null</code> namespace (even before it is formally standardized), using the same event handler and the more generic registration method <code>someElement.addEventListener( "jump", doJump, false )</code>.</p>
- </div> -->
</div>
<!-- div1 Events -->
<div class="div1">
@@ -6432,13 +6411,23 @@
<div class="div1" id="references-References">
<h1 class="references"><a id="references-role-references" href="#references-role-references">Appendix E: References</a></h1>
<p class="1st">For the latest version of any W3C specification please consult the list of <a class="normative" href="http://www.w3.org/TR">W3C Technical Reports</a> available at http://www.w3.org/TR.</p>
+
+
+
<div class="div2">
<h2 class="adiv2"><a id="references-References-Normative" href="#references-References-Normative">E.1 Normative References</a></h2>
<dl>
+
+ <dt>
+ <strong>[<a id="references-charmod">CharMod</a>]</strong>
+ </dt>
+ <dd><cite><a href="http://www.w3.org/TR/2005/REC-charmod-20050215/">Character Model for the World Wide Web 1.0: Fundamentals</a></cite>, M. Dürst, F. Yergeau, R. Ishida, M. Wolf, T. Texin, Editors. World Wide Web Consortium, 15 February 2005. This version of the Character Model for the World Wide Web 1.0: Fundamentals specification is http://www.w3.org/TR/2005/REC-charmod-20050215/. The <a class="normative" href="http://www.w3.org/TR/charmod/">latest version of Character Model for the World Wide Web 1.0: Fundamentals</a> is available at http://www.w3.org/TR/charmod/.</dd>
+
<dt>
<strong>[<a id="references-DOMCore">DOM Level 3 Core</a>]</strong>
</dt>
<dd><cite><a href="http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407">Document Object Model Level 3 Core Specification</a></cite>, A. Le Hors, et al., Editors. World Wide Web Consortium, April 2004. This version of the Document Object Model Level 3 Core Specification is http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407. The <a class="normative" href="http://www.w3.org/TR/DOM-Level-3-Core">latest version of DOM Level 3 Core</a> is available at http://www.w3.org/TR/DOM-Level-3-Core.</dd>
+
<dt>
<strong>[<a id="references-DOM2Events">DOM Level 2 Events</a>]</strong>
</dt>
@@ -6463,9 +6452,7 @@
<strong>[<a id="references-Unicode">Unicode</a>]</strong>
</dt>
<dd><cite>The Unicode Standard, Version 5.0</cite>, ISBN 0-321-48091-0, as updated periodically by the publication of new versions. See also <a class="normative" href="http://www.unicode.org/unicode/standard/versions">Versions of the Unicode Standard</a>, available at http://www.unicode.org/unicode/standard/versions, for latest version and additional information on versions of the standard and of the Unicode Character Database.</dd>
-
- Unicode 5.1.0
-
+
<dt>
<strong>[<a id="references-UnicodeNormalization">UAX #15</a>]</strong>
</dt>
@@ -6477,6 +6464,9 @@
</dl>
</div>
<!-- div2 References-Normative -->
+
+
+
<div class="div2">
<h2 class="adiv2"><a id="references-References-Informative" href="#references-References-Informative">E.2 Informative References</a></h2>
<dl>