--- a/html/DOM3-Events.html Mon Feb 08 18:18:43 2010 +0900
+++ b/html/DOM3-Events.html Thu Feb 18 03:45:53 2010 +0900
@@ -23,13 +23,13 @@
<h2 id="Overview-W3C-doctype">W3C Editor's Draft <time datetime="2010-02-08">08 February 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.119">http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html?rev=1.119</a></dd>
+ <dd><a href="http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html?rev=1.120">http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html?rev=1.120</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.118">http://dev.w3.org/cvsweb/~checkout~/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html?rev=1.118</a></dd>
+ <dd><a href="http://dev.w3.org/cvsweb/~checkout~/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html?rev=1.119">http://dev.w3.org/cvsweb/~checkout~/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html?rev=1.119</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>
@@ -304,7 +304,7 @@
<h2><a id="dom-events-overview" href="#dom-events-overview">1.1 Introduction</a></h2>
<p>DOM Events is designed with two main goals. The first goal is the design of an <a class="def" href="#glossary-event">event</a> system which allows registration of event listeners and describes event flow through a tree structure. Additionally, the specification will provide standard modules of events for user interface control and document mutation notifications, including defined contextual information for each of these event modules.</p>
- <p>The second goal of DOM Events is to provide a common subset of the current event systems used in <a class="def" href="#glossary-DOM-Level-0">DOM Level 0</a> browsers. This is intended to foster interoperability of existing scripts and content. It is not expected that this goal will be met with full backwards compatibility. However, the specification attempts to achieve this when possible.</p>
+ <p>The second goal of DOM Events is to provide a common subset of the current event systems used in existing browsers. This is intended to foster interoperability of existing scripts and content. It is not expected that this goal will be met with full backwards compatibility. However, the specification attempts to achieve this when possible.</p>
<div>
<h3><a id="dom-events-conformance" href="#dom-events-conformance">1.2 Conformance</a></h3>
@@ -323,13 +323,13 @@
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>
- <p>This specification is to be understood in the context of the DOM Level 3 Core specification [<cite><a class="normative" href="#references-DOMCore">DOM3 Core</a></cite>] and the general considerations for DOM implementations apply. For example, behavior in exceptional circumstances (such as when a <code>null</code> argument is passed when <code>null</code> was not expected) is discussed under <a class="normative" href="http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-17189187"><em>DOMException</em></a>, and handling of <a class="def" href="#glossary-namespaceURI">namespace URIs</a> is discussed in <a class="normative" href="http://www.w3.org/TR/DOM-Level-3-Core/core.html#Namespaces-Considerations"><em>XML Namespaces</em></a>. For additional information about <a class="normative" href="http://www.w3.org/TR/DOM-Level-3-Core/introduction.html#ID-Conformance"><em>conformance</em></a>, please see the DOM Level 3 Core specification [<cite><a class="normative" href="#references-DOMCore">DOM3 Core</a></cite>].</p>
+ <p>This specification is to be understood in the context of the DOM Level 3 Core specification [<cite><a class="normative" href="#references-DOMCore">DOM3 Core</a></cite>] and the general considerations for DOM implementations apply. For example, behavior in exceptional circumstances (such as when a <code>null</code> argument is passed when <code>null</code> was not expected) is discussed under <a class="normative" href="http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-17189187"><em>DOMException</em></a>, and handling of <a class="def" href="#glossary-namespaceURI">namespace URIs</a> is discussed in <a class="normative" href="http://www.w3.org/TR/DOM-Level-3-Core/core.html#Namespaces-Considerations"><em>XML Namespaces</em></a>. For additional information about <a class="normative" href="http://www.w3.org/TR/DOM-Level-3-Core/introduction.html#ID-Conformance"><em>conformance</em></a>, please see the DOM Level 3 Core specification [<cite><a class="normative" href="#references-DOMCore">DOM3 Core</a></cite>]. A <a class="def" href="#glossary-user-agent">user agents</a> is not required to conform to the entirety of another specification in order to conform to this specification, but it must conform to the specific parts of any other specification which are called out in this specification (e.g. a conforming DOM3 Events <a class="def" href="#glossary-user-agent">user agent</a> must support the <code>DOMString</code> data type as defined in DOM3 Core, but need not support every method or data type defined in DOM3 Core in order to conform to DOM3 Events).</p>
<p>This specification defines several classes of conformance for different <a class="def" href="#glossary-user-agent">user agents</a>, specifications, and authors:</p>
<dl>
<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-name">key names</a> in the <a href="#key-values">Key Values Set</a>, 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-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-name">key names</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-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>
@@ -361,7 +361,7 @@
<p><em>This section is normative</em></p>
<p>A conforming DOM Level 3 Events <a class="def" href="#glossary-user-agent">user agent</a> must implement the <a href="http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-5CED94D7"><code>DOMImplementation.hasFeature()</code></a> method to allow authors to detect for support of features defined in this specification. Refer to <a class="normative" href="http://www.w3.org/TR/DOM-Level-3-Core/core.html#DOMFeatures"><em>DOM Features</em></a> in [<cite><a class="normative" href="#references-DOMCore">DOM3 Core</a></cite>] for additional information on feature strings.</p>
- <p class="note"><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 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 class="note" id=""><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 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.
@@ -372,21 +372,27 @@
</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>".
<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"><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 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=""><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 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>"; 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>.<!-- 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>
+ <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-sync"><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>
+ </ul> -->
+ </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"><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, 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=""><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, authors are encouraged to use the feature strings for event types rather than interfaces.</span></li>
</ul>
- <p class="warning"><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>
+ <p class="warning" id=""><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>
<div>
<h3><a id="style-conventions" href="#style-conventions">1.4 Stylistic Conventions</a></h3>
- <p>The following stylistic conventions are followed in this specification:</p>
+ <p>The following stylistic conventions are followed in this specification, per the <a href="http://www.w3.org/S /spec-conventions.html">Proposed W3C Specification Conventions</a>:</p>
+
<div style="margin-left: 3em;">
<p class=""><code>'This is a keyword or value'</code></p>
<p>
@@ -470,7 +476,7 @@
<dd>The object to which an <a class="def" href="#glossary-event">event</a> is targeted.</dd>
<dt id="glossary-event-type"><dfn>event type</dfn></dt>
- <dd>The name of an <a class="def" href="#glossary-event">event</a> object which defines particular trigger conditions, attributes, interfaces, and other characteristics which distinguish it from other event types. For example, the <a class="eventtype" href="#event-type-click"><code>click</code></a> event type has different characteristics than the <a class="eventtype" href="#event-type-mouseover"><code>mouseover</code></a> or <a class="eventtype" href="#event-type-load"><code>load</code></a> event types. The event type is exposed as the the <a href="#events-event-type-type"><code class="interface-attribute">Event.type</code></a> attribute on the event object. See <a href="#event-types">event types</a> for more details. Also loosely referred to as 'event', such as the <em><a class="eventtype" href="#event-type-click"><code>click</code></a> event</em>.</dd>
+ <dd>The name of an <a class="def" href="#glossary-event">event</a> object which defines particular trigger conditions and other characteristics which distinguish it from other event types. For example, the <a class="eventtype" href="#event-type-click"><code>click</code></a> event type has different characteristics than the <a class="eventtype" href="#event-type-mouseover"><code>mouseover</code></a> or <a class="eventtype" href="#event-type-load"><code>load</code></a> event types. The event type is exposed as the the <a href="#events-event-type-type"><code class="interface-attribute">Event.type</code></a> attribute on the event object. See <a href="#event-types">event types</a> for more details. Also loosely referred to as 'event', such as the <em><a class="eventtype" href="#event-type-click"><code>click</code></a> event</em>.</dd>
<dt id="glossary-event-focus"><dfn>focus</dfn></dt>
<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>
@@ -595,7 +601,7 @@
</p>
<p><span class="assert must">As the final step of the event dispatch, for reasons of backwards compatibility, the implementation must reset the event object's internal-propagation and default-action-prevention states.</span> This ensures that an event object may be properly dispatched multiple times while also allowing to prevent the event objects propagation or <a class="def" href="#glossary-default-action">default actions</a> prior to the event dispatch.</p>
<p>In the production of the <a class="def" href="#glossary-propagation-path">propagation path</a>, if the <a class="def" href="#glossary-defaultView">defaultView</a> implements the <a href="#events-Events-EventTarget">EventTarget</a> interface, the event propagates from <a class="def" href="#glossary-defaultView">defaultView</a> to the <code>document</code> object during the <a class="def" href="#glossary-capture-phase">capture phase</a>, and from the <code>document</code> object to the <a class="def" href="#glossary-defaultView">defaultView</a> during the <a class="def" href="#glossary-bubbling-phase">bubble phase</a>.
- <span class="note"><strong>Note:</strong> for legacy reasons, the <a class="eventtype" href="#event-type-load"><code>load</code></a> event does not propagate to the <a class="def" href="#glossary-defaultView">defaultView</a> in HTML implementations.</span></p>
+ <span class="note" id=""><strong>Note:</strong> for legacy reasons, the <a class="eventtype" href="#event-type-load"><code>load</code></a> event does not propagate to the <a class="def" href="#glossary-defaultView">defaultView</a> in HTML implementations.</span></p>
<p>The model defined above must be applied regardless of the specific event flow associated with an event target. Each event flow must define how the propagation path shall be determined and which event phases are supported. The <em>DOM event flow</em> is an application of this model: the propagation path for a <code>Node</code> object shall be determined by its <code>Node.parentNode</code> chain, and if applicable, the document's containing <a class="def" href="#glossary-defaultView">defaultView</a>; all events accomplish the capture and target phases; whether an event accomplishes the bubble phase shall be defined individually for each <a class="def" href="#glossary-event-type">event type</a>. An alternate application of this model can be found in [<cite><a class="informative" href="#references-DOMLS">DOM3 Load and Save</a></cite>].</p>
<p>Implementations of the DOM event model must be reentrant. Event listeners may perform actions that cause additional events to be dispatched. Such events are handled in a synchronous manner, the event propagation that causes the event listener to be triggered must resume only after the event dispatch of the new event is completed.</p>
</div>
@@ -621,14 +627,14 @@
<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">
<strong>Example:</strong>
- <i class="note"><strong>To Do:</strong> Create good example of async events.</i>
+ <i class="note" id=""><strong>To Do:</strong> Create good example of async events.</i>
</p>
</div>
<!-- div2 sync-async -->
<div>
<h3><a id="trusted-events" href="#trusted-events">3.4 Trusted events</a></h3>
- <p>Events which are generated by the user agent, either as a result of user interaction, or as a direct result of changes to the DOM, are trusted by the user agent with privileges that are not afforded to events generated by script through the <a href="#events-Events-DocumentEvent-createEvent"><code>DocumentEvent.createEvent("Event")</code></a> method or the <a href="#events-Events-CustomEvent">CustomEvent</a> interface, modified using the <a href="#events-event-type-initEvent"><code>Event.initEvent()</code></a> method, or dispatched via the <a href="#events-Events-EventTarget-dispatchEvent"><code>EventTarget.dispatchEvent()</code></a> method. The <a href="#events-event-type-trusted"><code>trusted</code></a> attribute of trusted events has a value of <code>true</code>, while untrusted events have a <a href="#events-event-type-trusted"><code>trusted</code></a> attribute value of <code>false</code>.</p>
+ <p>Events which are generated by the user agent, either as a result of user interaction, or as a direct result of changes to the DOM, are trusted by the user agent with privileges that are not afforded to events generated by script through the <a href="#events-Events-DocumentEvent-createEvent"><code>DocumentEvent.createEvent("Event")</code></a> method, modified using the <a href="#events-event-type-initEvent"><code>Event.initEvent()</code></a> method, or dispatched via the <a href="#events-Events-EventTarget-dispatchEvent"><code>EventTarget.dispatchEvent()</code></a> method. The <a href="#events-event-type-trusted"><code>trusted</code></a> attribute of trusted events has a value of <code>true</code>, while untrusted events have a <a href="#events-event-type-trusted"><code>trusted</code></a> attribute value of <code>false</code>.</p>
<p>Most untrusted events should not trigger <a class="def" href="#glossary-default-action">default actions</a>, with the exception of <a class="eventtype" href="#event-type-click"><code>click</code></a> or <a class="eventtype" href="#event-type-DOMActivate"><code>DOMActivate</code></a> events which have been synthesized and are managed by the <a class="def" href="#glossary-user-agent">user agents</a> event as the <a class="def" href="#glossary-default-action">default action</a> of an <a class="def" href="#glossary-activation-trigger">activation trigger</a> (see <a href="#event-flow-activation">Activation triggers and behavior</a> for more details); these <a class="def" href="#glossary-user-agent">user-agent</a>-managed synthesized events have a have a <a href="#events-event-type-trusted"><code>trusted</code></a> attribute value of <code>false</code>, but still initiate any <a class="def" href="#glossary-default-action">default actions</a>. All other untrusted events must behave as if the <a href="#events-event-type-preventDefault"><code>Event.preventDefault()</code></a> method had been called on that event.</p>
<p>For security reasons, a <a class="def" href="#glossary-host-language">host language</a> should not define events which are not cancelable (see <a href="#event-flow-default-cancel">Default actions and cancelable events</a>), but also have <a class="def" href="#glossary-default-action">default actions</a>, since these <a class="def" href="#glossary-default-action">default actions</a> may be initiated by untrusted events.</p>
<p class="issue" id="issue-trusted-nonui"><strong>Issue:</strong> Are all non-script-generated events trusted events, or are only user-interaction-based events trusted events?</p>
@@ -637,7 +643,7 @@
<div>
<h3><a id="event-flow-activation" href="#event-flow-activation">3.5 Activation triggers and behavior</a></h3>
- <p class="warning" id="activation-deprecated"><strong>Warning!</strong> The <a class="eventtype" href="#event-type-DOMActivate"><code>DOMActivate</code></a><a class="def" href="#glossary-event-type">event type</a> is deprecated in this specification.</p>
+ <p class="warning" id="activation-deprecated"><strong>Warning!</strong> The <a class="eventtype" href="#event-type-DOMActivate"><code>DOMActivate</code></a> <a class="def" href="#glossary-event-type">event type</a> is deprecated in this specification.</p>
<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-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>
@@ -652,7 +658,7 @@
<p class="note" id="application-dependent-activation"><strong>Note:</strong> The activation of an event target is device dependent, but is also application dependent, e.g. a link in a document can be activated using a mouse click or a mouse double click.</p>
<p>Implementations which support the <a class="eventtype" href="#event-type-DOMActivate"><code>DOMActivate</code></a> <a class="def" href="#glossary-event-type">event type</a> should also dispatch a <a class="eventtype" href="#event-type-DOMActivate"><code>DOMActivate</code></a> event as a <a class="def" href="#glossary-default-action">default action</a> of a <a class="eventtype" href="#event-type-click"><code>click</code></a> event which is associated with an <a class="def" href="#glossary-activation-trigger">activation trigger</a>. However, such implementations should only initiate the associated <a class="def" href="#glossary-activation-behavior">activation behavior</a> once for any given occurrence of an <a class="def" href="#glossary-activation-trigger">activation trigger</a>.</p>
<p class="example" id="example-activation-DOMActivate"><strong>Example:</strong> The <a class="eventtype" href="#event-type-DOMActivate"><code>DOMActivate</code></a> <a class="def" href="#glossary-event-type">event type</a> is required to be supported for XForms [<cite><a class="informative" href="#ref-xforms">XFORMS</a></cite>], which is intended for implementation within a <a class="def" href="#glossary-host-language">host language</a>. In a scenario where a plugin or script-based implementation of XForms is intended for installation in a native implementation of this specification which does not support the <a class="eventtype" href="#event-type-DOMActivate"><code>DOMActivate</code></a> <a class="def" href="#glossary-event-type">event type</a>, the XForms <a class="def" href="#glossary-user-agent">user agent</a> must synthesize and dispatch its own <a class="eventtype" href="#event-type-DOMActivate"><code>DOMActivate</code></a> events based on the appropriate <a class="def" href="#glossary-activation-trigger">activation triggers</a>. Thus, when a <a class="eventtype" href="#event-type-click"><code>click</code></a> event is dispatched by the DOM Level 3 Events <a class="def" href="#glossary-user-agent">user agent</a>, the XForms <a class="def" href="#glossary-user-agent">user agent</a> must determine whether to synthesize a <a class="eventtype" href="#event-type-DOMActivate"><code>DOMActivate</code></a> event with the same relevant properties as a <a class="def" href="#glossary-default-action">default action</a> of that <a class="eventtype" href="#event-type-click"><code>click</code></a> event; appropriate cues may be whether the <a class="eventtype" href="#event-type-click"><code>click</code></a> event is <a href="#trusted-events">trusted</a>, or whether its <a class="def" href="#glossary-proximal-event-target">proximal event target</a> has a <a class="eventtype" href="#event-type-DOMActivate"><code>DOMActivate</code></a> event listener registered.</p>
- <p class="note" id="authors-activation"><strong>Note:</strong> Authors should not rely upon the interoperable support of <a class="eventtype" href="#event-type-DOMActivate"><code>DOMActivate</code></a> in many <a class="def" href="#glossary-user-agent">user agents</a>. Thus, authors may use the <a class="eventtype" href="#event-type-DOMActivate"><code>DOMActivate</code></a><a class="def" href="#glossary-event-type">event type</a> whenever they wish to make or react to an <a class="def" href="#glossary-activation-trigger">activation trigger</a>, but should use the <a class="eventtype" href="#event-type-click"><code>click</code></a><a class="def" href="#glossary-event-type">event type</a> for more accessible behavior instead, due to wider implementation.</p>
+ <p class="note" id="authors-activation"><strong>Note:</strong> Authors should not rely upon the interoperable support of <a class="eventtype" href="#event-type-DOMActivate"><code>DOMActivate</code></a> in many <a class="def" href="#glossary-user-agent">user agents</a>. Thus, authors may use the <a class="eventtype" href="#event-type-DOMActivate"><code>DOMActivate</code></a> <a class="def" href="#glossary-event-type">event type</a> whenever they wish to make or react to an <a class="def" href="#glossary-activation-trigger">activation trigger</a>, but should use the <a class="eventtype" href="#event-type-click"><code>click</code></a><a class="def" href="#glossary-event-type">event type</a> for more accessible behavior instead, due to wider implementation.</p>
<h4 class="needswork">
<a id="events-activation-event-order" href="#events-activation-event-order">3.5.1 Activation Event Order</a>
</h4>
@@ -726,8 +732,7 @@
<strong>IDL Definition</strong>
</dt>
<dd>
- <div class="idl-code">
- <pre>
+ <pre class="idl" id="idl-interface-Event"><code>
// Introduced in DOM Level 2:
interface <a href="#events-Events-Event">Event</a> {
@@ -755,9 +760,7 @@
// Introduced in DOM Level 3:
readonly attribute boolean <a href="#events-event-type-trusted">trusted</a>;
};
- </pre>
- </div>
- <br />
+ </code></pre>
</dd>
<dt>
@@ -787,31 +790,31 @@
<dd>
<dl>
<dt><code class="attribute-name"><a id="events-event-type-canBubble">bubbles</a></code> of type <code>boolean</code>, readonly</dt>
- <dd>Used to indicate whether or not an event is a bubbling event. If the event can bubble the value shall be <code>true</code>, otherwise the value shall be <code>false</code>.<br /></dd>
+ <dd><p>Used to indicate whether or not an event is a bubbling event. If the event can bubble the value shall be <code>true</code>, otherwise the value shall be <code>false</code>.</p></dd>
<dt><code class="attribute-name"><a id="events-event-type-canCancel">cancelable</a></code> of type <code>boolean</code>, readonly</dt>
- <dd>Used to indicate whether or not an event can have its <a class="def" href="#glossary-default-action">default action</a> prevented (see also <a href="#event-flow-default-cancel">Default actions and cancelable events</a>). If the <a class="def" href="#glossary-default-action">default action</a> can be prevented the value shall be <code>true</code>, otherwise the value shall be <code>false</code>.<br /></dd>
+ <dd><p>Used to indicate whether or not an event can have its <a class="def" href="#glossary-default-action">default action</a> prevented (see also <a href="#event-flow-default-cancel">Default actions and cancelable events</a>). If the <a class="def" href="#glossary-default-action">default action</a> can be prevented the value shall be <code>true</code>, otherwise the value shall be <code>false</code>.</p></dd>
<dt><code class="attribute-name"><a id="events-event-type-currentTarget">currentTarget</a></code> of type <a href="#events-Events-EventTarget"><code>EventTarget</code></a>, readonly</dt>
- <dd>Used to indicate the <a href="#events-Events-EventTarget"><code>EventTarget</code></a> whose <a href="#events-Events-EventListener"><code>EventListeners</code></a> are currently being processed. This is particularly useful during the capture and bubbling phases. When used with the <a href="#event-flow">Event dispatch and DOM event flow</a>, this attribute contains the <a class="def" href="#glossary-proximal-event-target">proximal event target</a> or a target ancestor.<br /></dd>
+ <dd><p>Used to indicate the <a href="#events-Events-EventTarget"><code>EventTarget</code></a> whose <a href="#events-Events-EventListener"><code>EventListeners</code></a> are currently being processed. This is particularly useful during the capture and bubbling phases. When used with the <a href="#event-flow">Event dispatch and DOM event flow</a>, this attribute contains the <a class="def" href="#glossary-proximal-event-target">proximal event target</a> or a target ancestor.</p></dd>
<dt><code class="attribute-name"><a id="events-event-type-defaultPrevented">defaultPrevented</a></code> of type <code>boolean</code>, readonly, introduced in <strong class="version">DOM Level 3</strong></dt>
- <dd>Used to indicate whether <a href="#events-event-type-preventDefault"><code>Event.preventDefault()</code></a> has been called for this event.<br /></dd>
+ <dd><p>Used to indicate whether <a href="#events-event-type-preventDefault"><code>Event.preventDefault()</code></a> has been called for this event.</p></dd>
<dt><code class="attribute-name"><a id="events-event-type-trusted">trusted</a></code> of type <code>boolean</code>, readonly, introduced in <strong class="version">DOM Level 3</strong></dt>
- <dd>Used to indicate whether this event was generated by the <a class="def" href="#glossary-user-agent">user agent</a> (trusted) or by script (untrusted). See <a href="#trusted-events">trusted events</a> for more details.<br /></dd>
+ <dd><p>Used to indicate whether this event was generated by the <a class="def" href="#glossary-user-agent">user agent</a> (trusted) or by script (untrusted). See <a href="#trusted-events">trusted events</a> for more details.</p></dd>
<dt><code class="attribute-name"><a id="events-event-type-eventPhase">eventPhase</a></code> of type <code>unsigned short</code>, readonly</dt>
- <dd>Used to indicate which phase of event flow is currently being accomplished.<br /></dd>
+ <dd><p>Used to indicate which phase of event flow is currently being accomplished.</p></dd>
<dt><code class="attribute-name"><a id="events-event-type-target">target</a></code> of type <a href="#events-Events-EventTarget"><code>EventTarget</code></a>, readonly</dt>
- <dd>Used to indicate the <a class="def" href="#glossary-event-target">event target</a>. This attribute contains the <a class="def" href="#glossary-proximal-event-target">proximal event target</a> when used with the <a href="#event-flow">Event dispatch and DOM event flow</a>.<br /></dd>
+ <dd><p>Used to indicate the <a class="def" href="#glossary-event-target">event target</a>. This attribute contains the <a class="def" href="#glossary-proximal-event-target">proximal event target</a> when used with the <a href="#event-flow">Event dispatch and DOM event flow</a>.</p></dd>
<dt><code class="attribute-name"><a id="events-event-type-timeStamp">timeStamp</a></code> of type <code>DOMTimeStamp</code>, readonly</dt>
- <dd>Used to specify the time at which the event was created in milliseconds relative to 1970-01-01T00:00:00Z. Due to the fact that some systems may not provide this information the value of <code>timeStamp</code> may be not available for all events. When not available, the value shall be <code>0</code>.<br /></dd>
+ <dd><p>Used to specify the time at which the event was created in milliseconds relative to 1970-01-01T00:00:00Z. Due to the fact that some systems may not provide this information the value of <code>timeStamp</code> may be not available for all events. When not available, the value shall be <code>0</code>.</p></dd>
<dt><code class="attribute-name"><a id="events-event-type-type">type</a></code> of type <code>DOMString</code>, readonly</dt>
- <dd>The name of the event type. The name must be a <code>DOMString</code>. <a href="#conf-specs">Specifications that define events</a>, <a href="#conf-authors">authors</a>, and <a href="#conf-author-tools">authoring tools</a> must use case-sensitive event type names that do not contain whitespace characters.<br /></dd>
+ <dd><p>The name of the event type. The name must be a <code>DOMString</code>. <a href="#conf-specs">Specifications that define events</a>, <a href="#conf-authors">authors</a>, and <a href="#conf-author-tools">authoring tools</a> must use case-sensitive event type names that do not contain whitespace characters.</p></dd>
</dl>
</dd>
@@ -825,15 +828,26 @@
</code>
</dt>
<dd>
- <div class="method">Initializes attributes of an <code>Event</code> created through the <a href="#events-Events-DocumentEvent-createEvent"><code>DocumentEvent.createEvent</code></a> method. This method may only be called before the <code>Event</code> has been dispatched via the <a href="#events-Events-EventTarget-dispatchEvent"><code>EventTarget.dispatchEvent()</code></a> method. If the method is called several times before invoking <a href="#events-Events-EventTarget-dispatchEvent"><code>EventTarget.dispatchEvent</code></a>, only the final invocation takes precedence. This method has no effect if called after the event has been dispatched. If called from a subclass of the <code>Event</code> interface only the values specified in this method are modified, all other attributes are left unchanged.
- <br /><br />
-This method sets the <a href="#events-event-type-type"><code>Event.type</code></a> attribute to <code>eventTypeArg</code>.
+ <div class="method">
+ <p>Initializes attributes of an <code>Event</code> created through the <a href="#events-Events-DocumentEvent-createEvent"><code>DocumentEvent.createEvent</code></a> method. This method may only be called before the <code>Event</code> has been dispatched via the <a href="#events-Events-EventTarget-dispatchEvent"><code>EventTarget.dispatchEvent()</code></a> method. If the method is called several times before invoking <a href="#events-Events-EventTarget-dispatchEvent"><code>EventTarget.dispatchEvent</code></a>, only the final invocation takes precedence. This method has no effect if called after the event has been dispatched. If called from a subclass of the <code>Event</code> interface only the values specified in this method are modified, all other attributes are left unchanged.</p>
+ <p>This method sets the <a href="#events-event-type-type"><code>Event.type</code></a> attribute to <code>eventTypeArg</code>.</p>
<p class="warning" id="warning-initEvent-untrusted"><strong>Warning!</strong> For security reasons, events modified using <a href="#events-event-type-initEvent"><code>Event.initEvent()</code></a> must have a <code class="attribute-name"><a href="#events-event-type-trusted">trusted</a></code> attribute value of <code>false</code>. See <a href="#trusted-events">trusted events</a> for more details.</p>
- <div class="parameters"><strong>Parameters</strong><div class="paramtable"><dl><dt><code class="parameter-name">eventTypeArg</code> of type <code>DOMString</code></dt><dd>Specifies <a href="#events-event-type-type"><code>Event.type</code></a>, the name of the event type.<br /></dd>
-<dt><code class="parameter-name">canBubbleArg</code> of type <code>boolean</code></dt><dd>Specifies <a href="#events-event-type-canBubble"><code>Event.bubbles</code></a>. This parameter overrides the intrinsic bubbling behavior of the event.<br /></dd>
-<dt><code class="parameter-name">cancelableArg</code> of type <code>boolean</code></dt><dd>Specifies <a href="#events-event-type-canCancel"><code>Event.cancelable</code></a>. This parameter overrides the intrinsic cancelable behavior of the event.<br /></dd>
-</dl></div></div>
+ <div class="parameters">
+ <strong>Parameters</strong>
+ <div class="paramtable">
+ <dl>
+ <dt><code class="parameter-name">eventTypeArg</code> of type <code>DOMString</code></dt>
+ <dd><p>Specifies <a href="#events-event-type-type"><code>Event.type</code></a>, the name of the event type.</p></dd>
+
+ <dt><code class="parameter-name">canBubbleArg</code> of type <code>boolean</code></dt>
+ <dd><p>Specifies <a href="#events-event-type-canBubble"><code>Event.bubbles</code></a>. This parameter overrides the intrinsic bubbling behavior of the event.</p></dd>
+
+ <dt><code class="parameter-name">cancelableArg</code> of type <code>boolean</code></dt>
+ <dd><p>Specifies <a href="#events-event-type-canCancel"><code>Event.cancelable</code></a>. This parameter overrides the intrinsic cancelable behavior of the event.</p></dd>
+ </dl>
+ </div>
+ </div>
<!-- parameters -->
<div><strong>No Return Value</strong></div>
@@ -849,7 +863,7 @@
</dt>
<dd>
<div class="method">When this method is evoked, the event must be canceled, meaning any <a class="def" href="#glossary-default-action">default actions</a> normally taken by the implementation as a result of the event must not occur (see also <a href="#event-flow-default-cancel">Default actions and cancelable events</a>). Calling this method for a non-cancelable event shall have no effect. If an event has more than one <a class="def" href="#glossary-default-action">default action</a>, each cancelable <a class="def" href="#glossary-default-action">default action</a> must be canceled.
-<p class="note"><strong>Note:</strong> This method does not stop the event propagation; use <a href="#events-event-type-stopPropagation"><code>Event.stopPropagation()</code></a> or <a href="#events-event-type-stopImmediatePropagation"><code>Event.stopImmediatePropagation()</code></a> for that effect.</p>
+<p class="note" id="note-preventDefault-prop"><strong>Note:</strong> This method does not stop the event propagation; use <a href="#events-event-type-stopPropagation"><code>Event.stopPropagation()</code></a> or <a href="#events-event-type-stopImmediatePropagation"><code>Event.stopImmediatePropagation()</code></a> for that effect.</p>
<div><strong>No Parameters</strong></div>
<div><strong>No Return Value</strong></div>
@@ -863,7 +877,7 @@
<dd>
<div class="method">
Prevents other event listeners from being triggered and, unlike <a href="#events-event-type-stopPropagation"><code>Event.stopPropagation()</code></a> its effect shall be immediate . Once it has been called, further calls to this method have no additional effect.
- <p class="note"><strong>Note:</strong> This method does not prevent the <a class="def" href="#glossary-default-action">default action</a> from being invoked; use <a href="#events-event-type-preventDefault"><code>Event.preventDefault()</code></a> for that effect.</p>
+ <p class="note" id="note-stopImmediatePropagation-default"><strong>Note:</strong> This method does not prevent the <a class="def" href="#glossary-default-action">default action</a> from being invoked; use <a href="#events-event-type-preventDefault"><code>Event.preventDefault()</code></a> for that effect.</p>
<div><strong>No Parameters</strong></div>
<div><strong>No Return Value</strong></div>
@@ -881,7 +895,7 @@
<dd>
<div class="method">
Prevents other event listeners from being triggered but its effect shall be deferred until all event listeners attached on the <a href="#events-event-type-currentTarget"><code>Event.currentTarget</code></a> have been triggered . Once it has been called, further calls to this method have no additional effect.
- <p class="note"><strong>Note:</strong> This method does not prevent the <a class="def" href="#glossary-default-action">default action</a> from being invoked; use <a href="#events-event-type-preventDefault"><code>Event.preventDefault()</code></a> for that effect.</p>
+ <p class="note" id="note-stopPropagation-default"><strong>Note:</strong> This method does not prevent the <a class="def" href="#glossary-default-action">default action</a> from being invoked; use <a href="#events-event-type-preventDefault"><code>Event.preventDefault()</code></a> for that effect.</p>
<div><strong>No Parameters</strong></div>
<div><strong>No Return Value</strong></div>
@@ -900,17 +914,16 @@
<dl>
<dt><strong>Interface <em><a id="events-Events-CustomEvent">CustomEvent</a></em></strong> (introduced in <strong class="since">DOM Level 3</strong>)</dt>
<dd>
- <p>The CustomEvent interface is the recommended interface for application-specific event types. Unlike the <a href="#events-Events-Event"><code>Event</code></a> interface, it allows applications to provide contextual information about the event type. Application-specific event types should use a prefix string on the event type name to avoid clashes with future general-purpose event types.</p>
+ <p>The <a id="events-Events-CustomEvent"><code>CustomEvent</code></a> interface is the recommended interface for application-specific event types. Unlike the <a href="#events-Events-Event"><code>Event</code></a> interface, it allows applications to provide contextual information about the event type. Application-specific event types should use a prefix string on the event type name to avoid clashes with future general-purpose event types.</p>
<p>To create an instance of the <code>CustomEvent</code> interface, use the <a href="#events-Events-DocumentEvent-createEvent"><code>DocumentEvent.createEvent("CustomEvent")</code></a> method call.</p>
- <p class="warning" id="warning-CustomEvent-untrusted"><strong>Warning!</strong> For security reasons, <a href="#events-Events-CustomEvent">CustomEvent</a> events must have a <code class="attribute-name"><a href="#events-event-type-trusted">trusted</a></code> attribute value of <code>false</code>. See <a href="#trusted-events">trusted events</a> for more details.</p>
<dl>
<dt>
<br />
<strong>IDL Definition</strong>
</dt>
<dd>
- <div class="idl-code">
- <pre>
+
+ <pre class="idl" id="idl-interface-"><code>
// Introduced in DOM Level 3:
interface <a href="#events-Events-CustomEvent">CustomEvent</a> : <a href="#events-Events-Event">Event</a> {
readonly attribute DOMObject <a href="#events-Events-CustomEvent-detail">detail</a>;
@@ -919,16 +932,14 @@
in boolean cancelableArg,
in DOMObject detailArg);
};
- </pre>
- </div>
- <br />
+ </code></pre>
</dd>
<dt><strong>Attributes</strong></dt>
<dd>
<dl>
<dt><code class="attribute-name"><a id="events-Events-CustomEvent-detail">detail</a></code> of type <code>DOMObject</code>, readonly</dt>
- <dd>Specifies some detail information about the <a href="#events-Events-Event"><code>Event</code></a>.<br /></dd>
+ <dd><p>Specifies some detail information about the <a href="#events-Events-Event"><code>Event</code></a>.</p></dd>
</dl>
</dd>
@@ -943,11 +954,24 @@
</dt>
<dd>
<div class="method">Initializes attributes of a <code>CustomEvent</code> object. This method has the same behavior as <a href="#events-event-type-initEvent"><code>Event.initEvent()</code></a>.
- <div class="parameters"><strong>Parameters</strong><div class="paramtable"><dl><dt><code class="parameter-name">typeArg</code> of type <code>DOMString</code></dt><dd>Refer to the <a href="#events-event-type-initEvent"><code>Event.initEvent()</code></a> method for a description of this parameter.<br /></dd>
-<dt><code class="parameter-name">canBubbleArg</code> of type <code>boolean</code></dt><dd>Refer to the <a href="#events-event-type-initEvent"><code>Event.initEvent()</code></a> method for a description of this parameter.<br /></dd>
-<dt><code class="parameter-name">cancelableArg</code> of type <code>boolean</code></dt><dd>Refer to the <a href="#events-event-type-initEvent"><code>Event.initEvent()</code></a> method for a description of this parameter.<br /></dd>
-<dt><code class="parameter-name">detailArg</code> of type <code>DOMObject</code></dt><dd>Specifies <a href="#events-Events-CustomEvent-detail"><code>CustomEvent.detail</code></a>. This value may be <code>null</code>.<br /></dd>
-</dl></div></div>
+ <div class="parameters">
+ <strong>Parameters</strong>
+ <div class="paramtable">
+ <dl>
+ <dt><code class="parameter-name">typeArg</code> of type <code>DOMString</code></dt>
+ <dd><p>Refer to the <a href="#events-event-type-initEvent"><code>Event.initEvent()</code></a> method for a description of this parameter.</p></dd>
+
+ <dt><code class="parameter-name">canBubbleArg</code> of type <code>boolean</code></dt>
+ <dd><p>Refer to the <a href="#events-event-type-initEvent"><code>Event.initEvent()</code></a> method for a description of this parameter.</p></dd>
+
+ <dt><code class="parameter-name">cancelableArg</code> of type <code>boolean</code></dt>
+ <dd><p>Refer to the <a href="#events-event-type-initEvent"><code>Event.initEvent()</code></a> method for a description of this parameter.</p></dd>
+
+ <dt><code class="parameter-name">detailArg</code> of type <code>DOMObject</code></dt>
+ <dd><p>Specifies <a href="#events-Events-CustomEvent-detail"><code>CustomEvent.detail</code></a>. This value may be <code>null</code>.</p></dd>
+ </dl>
+ </div>
+ </div>
<!-- parameters -->
<div><strong>No Return Value</strong></div>
@@ -976,8 +1000,7 @@
<strong>IDL Definition</strong>
</dt>
<dd>
- <div class="idl-code">
- <pre>
+ <pre class="idl" id="idl-interface-"><code>
// Introduced in DOM Level 2:
interface <a href="#events-Events-EventTarget">EventTarget</a> {
void <a href="#events-Events-EventTarget-addEventListener">addEventListener</a>(in DOMString type,
@@ -992,9 +1015,7 @@
DOMException);
};
- </pre>
- </div>
- <br />
+ </code></pre>
</dd>
<dt><strong>Methods</strong></dt>
@@ -1007,10 +1028,21 @@
</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.
- <div class="parameters"><strong>Parameters</strong><div class="paramtable"><dl><dt><code class="parameter-name">type</code> of type <code>DOMString</code></dt><dd>Specifies the <a href="#events-event-type-type"><code>Event.type</code></a> associated with the event for which the user is registering.<br /></dd>
-<dt><code class="parameter-name">listener</code> of type <a href="#events-Events-EventListener"><code>EventListener</code></a></dt><dd>The <code>listener</code> parameter takes an object implemented by the user which implements the <a href="#events-Events-EventListener"><code>EventListener</code></a> interface and contains the method to be called when the event occurs.<br /></dd>
-<dt><code class="parameter-name">useCapture</code> of type <code>boolean</code></dt><dd>If true, <code>useCapture</code> indicates that the user wishes to add the event listener for the <a class="def" href="#glossary-capture-phase">capture phase</a> only, i.e. this event listener will not be triggered during the <a class="def" href="#glossary-target-phase">target</a> and <a class="def" href="#glossary-bubbling-phase">bubbling</a> phases. If <code>false</code>, the event listener must only be triggered during the target and bubbling phases.<br /></dd>
-</dl></div></div>
+ <div class="parameters">
+ <strong>Parameters</strong>
+ <div class="paramtable">
+ <dl>
+ <dt><code class="parameter-name">type</code> of type <code>DOMString</code></dt>
+ <dd><p>Specifies the <a href="#events-event-type-type"><code>Event.type</code></a> associated with the event for which the user is registering.</p></dd>
+
+ <dt><code class="parameter-name">listener</code> of type <a href="#events-Events-EventListener"><code>EventListener</code></a></dt>
+ <dd><p>The <code>listener</code> parameter takes an object implemented by the user which implements the <a href="#events-Events-EventListener"><code>EventListener</code></a> interface and contains the method to be called when the event occurs.</p></dd>
+
+ <dt><code class="parameter-name">useCapture</code> of type <code>boolean</code></dt>
+ <dd><p>If true, <code>useCapture</code> indicates that the user wishes to add the event listener for the <a class="def" href="#glossary-capture-phase">capture phase</a> only, i.e. this event listener will not be triggered during the <a class="def" href="#glossary-target-phase">target</a> and <a class="def" href="#glossary-bubbling-phase">bubbling</a> phases. If <code>false</code>, the event listener must only be triggered during the target and bubbling phases.</p></dd>
+ </dl>
+ </div>
+ </div>
<!-- parameters -->
<div><strong>No Return Value</strong></div>
@@ -1024,8 +1056,15 @@
<div class="method">Dispatches an event into the implementation's event model. The <a class="def" href="#glossary-event-target">event target</a> of the event shall be the <code>EventTarget</code> object on which <code>dispatchEvent</code> is called.
<p class="warning" id="warning-dispatchEvent-untrusted"><strong>Warning!</strong> For security reasons, events dispatched using <a href="#events-Events-EventTarget-dispatchEvent"><code>EventTarget.dispatchEvent()</code></a> must have a <code class="attribute-name"><a href="#events-event-type-trusted">trusted</a></code> attribute value of <code>false</code>. See <a href="#trusted-events">trusted events</a> for more details.</p>
-<div class="parameters"><strong>Parameters</strong><div class="paramtable"><dl><dt><code class="parameter-name">evt</code> of type <a href="#events-Events-Event"><code>Event</code></a></dt><dd>The event to be dispatched.<br /></dd>
-</dl></div></div>
+ <div class="parameters">
+ <strong>Parameters</strong>
+ <div class="paramtable">
+ <dl>
+ <dt><code class="parameter-name">evt</code> of type <a href="#events-Events-Event"><code>Event</code></a></dt>
+ <dd><p>The event to be dispatched.</p></dd>
+ </dl>
+ </div>
+ </div>
<!-- parameters -->
<div class="return"><strong>Return Value</strong><div class="returntable"><table summary="Layout table: the first cell contains the type of the return value, the second contains a short description" border="0"><tr><td><p><code>boolean</code></p></td><td><p>Indicates whether any of the listeners which handled the event called <a href="#events-event-type-preventDefault"><code>Event.preventDefault()</code></a>. If <a href="#events-event-type-preventDefault"><code>Event.preventDefault()</code></a> was called the returned value shall be <code>false</code>, else it shall be <code>true</code>.</p></td></tr></table></div></div>
<!-- return -->
@@ -1041,10 +1080,19 @@
</dt>
<dd>
<div class="method">Removes an event listener. Calling <code>removeEventListener</code> with arguments which do not identify any currently registered <a href="#events-Events-EventListener"><code>EventListener</code></a> on the <code>EventTarget</code> has no effect.
- <div class="parameters"><strong>Parameters</strong><div class="paramtable"><dl><dt><code class="parameter-name">type</code> of type <code>DOMString</code></dt><dd>Specifies the <a href="#events-event-type-type"><code>Event.type</code></a> for which the user registered the event listener.<br /></dd>
-<dt><code class="parameter-name">listener</code> of type <a href="#events-Events-EventListener"><code>EventListener</code></a></dt><dd>The <a href="#events-Events-EventListener"><code>EventListener</code></a> to be removed.<br /></dd>
-<dt><code class="parameter-name">useCapture</code> of type <code>boolean</code></dt><dd>Specifies whether the <a href="#events-Events-EventListener"><code>EventListener</code></a> being removed was registered for the capture phase or not. If a listener was registered twice, once for the capture phase and once for the target and bubbling phases, each must be removed separately. Removal of an event listener registered for the capture phase does not affect the same event listener registered for the target and bubbling phases, and vice versa.<br /></dd>
-</dl></div></div>
+ <div class="parameters">
+ <strong>Parameters</strong>
+ <div class="paramtable">
+ <dl>
+ <dt><code class="parameter-name">type</code> of type <code>DOMString</code></dt>
+ <dd><p>Specifies the <a href="#events-event-type-type"><code>Event.type</code></a> for which the user registered the event listener.</p></dd>
+ <dt><code class="parameter-name">listener</code> of type <a href="#events-Events-EventListener"><code>EventListener</code></a></dt>
+ <dd><p>The <a href="#events-Events-EventListener"><code>EventListener</code></a> to be removed.</p></dd>
+ <dt><code class="parameter-name">useCapture</code> of type <code>boolean</code></dt>
+ <dd><p>Specifies whether the <a href="#events-Events-EventListener"><code>EventListener</code></a> being removed was registered for the capture phase or not. If a listener was registered twice, once for the capture phase and once for the target and bubbling phases, each must be removed separately. Removal of an event listener registered for the capture phase does not affect the same event listener registered for the target and bubbling phases, and vice versa.</p></dd>
+ </dl>
+ </div>
+ </div>
<!-- parameters -->
<div><strong>No Return Value</strong></div>
@@ -1078,15 +1126,12 @@
<strong>IDL Definition</strong>
</dt>
<dd>
- <div class="idl-code">
- <pre>
+ <pre class="idl" id="idl-interface-"><code>
// Introduced in DOM Level 2:
interface <a href="#events-Events-EventListener">EventListener</a> {
void <a href="#events-Events-EventListener-handleEvent">handleEvent</a>(in <a href="#events-Events-Event">Event</a> evt);
};
- </pre>
- </div>
- <br />
+ </code></pre>
</dd>
<dt><strong>Methods</strong></dt>
@@ -1098,9 +1143,17 @@
</code>
</dt>
<dd>
- <div class="method">This method shall be called whenever an event occurs of the event type for which the <code>EventListener</code> interface was registered.
-<div class="parameters"><strong>Parameters</strong><div class="paramtable"><dl><dt><code class="parameter-name">evt</code> of type <a href="#events-Events-Event"><code>Event</code></a></dt><dd>The <a href="#events-Events-Event"><code>Event</code></a> contains contextual information about the <a class="def" href="#glossary-event">event</a>.<br /></dd>
-</dl></div></div>
+ <div class="method">
+ <p>This method shall be called whenever an event occurs of the event type for which the <code>EventListener</code> interface was registered.</p>
+ <div class="parameters">
+ <strong>Parameters</strong>
+ <div class="paramtable">
+ <dl>
+ <dt><code class="parameter-name">evt</code> of type <a href="#events-Events-Event"><code>Event</code></a></dt>
+ <dd><p>The <a href="#events-Events-Event"><code>Event</code></a> contains contextual information about the <a class="def" href="#glossary-event">event</a>.</p></dd>
+ </dl>
+ </div>
+ </div>
<!-- parameters -->
<div><strong>No Return Value</strong></div>
@@ -1122,19 +1175,17 @@
<strong>IDL Definition</strong>
</dt>
<dd>
- <div class="idl-code">
- <pre>
+ <pre class="idl" id="idl-interface-"><code>
// Introduced in DOM Level 2:
exception <a href="#events-Events-EventException">EventException</a> {
- unsigned short code;
+ unsigned short code;
};
+
// EventExceptionCode
const unsigned short <a href="#events-UNSPECIFIED_EVENT_TYPE_ERR">UNSPECIFIED_EVENT_TYPE_ERR</a> = 0;
// Introduced in DOM Level 3:
const unsigned short <a href="#events-DISPATCH_REQUEST_ERR">DISPATCH_REQUEST_ERR</a> = 1;
- </pre>
- </div>
- <br />
+ </code></pre>
</dd>
<dt>
@@ -1167,15 +1218,14 @@
<dl>
<dt><strong>Interface <em><a id="events-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-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. If the feature "+Events" is supported by the <code>Document</code> object, an object that supports the <code>DocumentEvent</code> interface must be returned by invoking the method <code>Node.getFeature("+Events", "3.0")</code> on the <code>Document</code> object.</p>
+ <p>The <code>DocumentEvent</code> interface provides a mechanism by which the user can create an <a href="#events-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 />
<strong>IDL Definition</strong>
</dt>
<dd>
- <div class="idl-code">
- <pre>
+ <pre class="idl" id="idl-interface-"><code>
// Introduced in DOM Level 2:
interface <a href="#events-Events-DocumentEvent">DocumentEvent</a> {
@@ -1187,17 +1237,15 @@
const unsigned long <a href="#events-DOM_KEY_FORMAT_ENTITY">DOM_KEY_FORMAT_ENTITY</a> = 0x03;
// Modified in DOM Level 3:
- <a href="#events-Events-Event">Event</a> <a href="#events-Events-DocumentEvent-createEvent">createEvent</a>(in DOMString eventInterface)
+ <a href="#events-Events-Event">Event</a> <a href="#events-Events-DocumentEvent-createEvent">createEvent</a>(in DOMString eventInterface)
raises(DOMException);
<!-- <div class="proposal"> -->
// Introduced in DOM Level 3:
- DOMString <a href="#events-Events-DocumentEvent-convertKeyValue">convertKeyValue</a>(in DOMString keyArg,
- in unsigned long KeyValueFormatArg);
+ DOMString <a href="#events-Events-DocumentEvent-convertKeyValue">convertKeyValue</a>(in DOMString keyArg,
+ in unsigned long KeyValueFormatArg);
<!-- </div> -->
};
- </pre>
- </div>
- <br />
+ </code></pre>
</dd>
<dt>
@@ -1236,13 +1284,36 @@
</dt>
<dd>
<div class="method">Creates an event object of the type specified.
- <div class="parameters"><strong>Parameters</strong><div class="paramtable"><dl><dt><code class="parameter-name">eventInterface</code> of type <code>DOMString</code></dt><dd><p>The <code>eventInterface</code> parameter specifies the name of the DOM Events interface to be supported by the created event object, e.g. <code>"Event"</code>, <code>"MouseEvent"</code>, <code>"MutationEvent"</code>, and so on. If the <a href="#events-Events-Event"><code>Event</code></a> is to be dispatched via the <a href="#events-Events-EventTarget-dispatchEvent"><code>EventTarget.dispatchEvent()</code></a> method, the appropriate event initialization method must be called after creation in order to initialize the <a class="noxref" href="#events-Events-Event"><code>Event</code></a>'s values.</p><p class="example" id="example-createEvent"><strong>Example:</strong> An author wishing to synthesize some kind of <a href="#events-Events-UIEvent"><code>UIEvent</code></a> would invoke <a href="#events-Events-DocumentEvent-createEvent"><code>DocumentEvent.createEvent("UIEvent")</code></a>. The <a href="#events-event-type-initUIEvent"><code>UIEvent.initUIEvent()</code></a> method could then be called on the newly created <a class="noxref" href="#events-Events-UIEvent"><code>UIEvent</code></a> object to set the specific type of user interface event to be dispatched, <a class="eventtype" href="#event-type-scroll"><code>scroll</code></a> for example, and set its context information, e.g. <a href="#events-Events-UIEvent-detail"><code>UIEvent.detail</code></a>.</p><p>For backward compatibility reason, <code>"UIEvents"</code>, <code>"MouseEvents"</code>, <code>"MutationEvents"</code>, and <code>"HTMLEvents"</code> feature names are valid values for the parameter <code>eventInterface</code> and represent respectively the interfaces <a href="#events-Events-UIEvent"><code>UIEvent</code></a>, <a href="#events-Events-MouseEvent"><code>MouseEvent</code></a>, <a href="#events-Events-MutationEvent"><code>MutationEvent</code></a>, and <a href="#interface-Event"><code>Event</code></a>, and the characters <code>'a'..'z'</code> are considered equivalent to the characters <code>'A'..'Z'</code>.</p><p>If the parameter does not match an event interface name supported by the implementation, the implementation must raise a <code>NOT_SUPPORTED_ERR</code> <code>DOMException</code></p><p class="warning" id="warning-createEvent-untrusted"><strong>Warning!</strong> For security reasons, events generated using <a href="#events-Events-DocumentEvent-createEvent"><code>DocumentEvent.createEvent("Event")</code></a> must have a <code class="attribute-name"><a href="#events-event-type-trusted">trusted</a></code> attribute value of <code>false</code>. See <a href="#trusted-events">trusted events</a> for more details.</p><br /></dd>
-</dl></div></div>
- <!-- parameters -->
- <div class="return"><strong>Return Value</strong><div class="returntable"><table summary="Layout table: the first cell contains the type of the return value, the second contains a short description" border="0"><tr><td><p><a href="#events-Events-Event"><code>Event</code></a></p></td><td><p>The newly created event object.</p></td></tr></table></div></div>
- <!-- return -->
- <div class="exceptions"><strong>Exceptions</strong><div class="exceptiontable"><table summary="Layout table: the first cell contains the type of the exception, the second contains the specific error code and a short description" border="0"><tr><td><p><code>DOMException</code></p></td><td><p>NOT_SUPPORTED_ERR: Raised if the implementation does not support the <a href="#events-Events-Event"><code>Event</code></a> interface requested.</p></td></tr></table></div></div>
- <!-- exceptions --></div>
+ <div class="parameters">
+ <strong>Parameters</strong>
+ <div class="paramtable">
+ <dl>
+ <dt><code class="parameter-name">eventInterface</code> of type <code>DOMString</code></dt>
+ <dd>
+ <p>The <code>eventInterface</code> parameter specifies the name of the DOM Events interface to be supported by the created event object, e.g. <code>"Event"</code>, <code>"MouseEvent"</code>, <code>"MutationEvent"</code>, and so on. If the <a href="#events-Events-Event"><code>Event</code></a> is to be dispatched via the <a href="#events-Events-EventTarget-dispatchEvent"><code>EventTarget.dispatchEvent()</code></a> method, the appropriate event initialization method must be called after creation in order to initialize the <a class="noxref" href="#events-Events-Event"><code>Event</code></a>'s values.</p>
+ <p class="example" id="example-createEvent"><strong>Example:</strong> An author wishing to synthesize some kind of <a href="#events-Events-UIEvent"><code>UIEvent</code></a> would invoke <a href="#events-Events-DocumentEvent-createEvent"><code>DocumentEvent.createEvent("UIEvent")</code></a>. The <a href="#events-event-type-initUIEvent"><code>UIEvent.initUIEvent()</code></a> method could then be called on the newly created <a class="noxref" href="#events-Events-UIEvent"><code>UIEvent</code></a> object to set the specific type of user interface event to be dispatched, <a class="eventtype" href="#event-type-scroll"><code>scroll</code></a> for example, and set its context information, e.g. <a href="#events-Events-UIEvent-detail"><code>UIEvent.detail</code></a>.</p>
+ <p>For backward compatibility reason, <code>"UIEvents"</code>, <code>"MouseEvents"</code>, <code>"MutationEvents"</code>, and <code>"HTMLEvents"</code> feature names are valid values for the parameter <code>eventInterface</code> and represent respectively the interfaces <a href="#events-Events-UIEvent"><code>UIEvent</code></a>, <a href="#events-Events-MouseEvent"><code>MouseEvent</code></a>, <a href="#events-Events-MutationEvent"><code>MutationEvent</code></a>, and <a href="#interface-Event"><code>Event</code></a>, and the characters <code>'a'..'z'</code> are considered equivalent to the characters <code>'A'..'Z'</code>.</p>
+ <p>If the parameter does not match an event interface name supported by the implementation, the implementation must raise a <code>NOT_SUPPORTED_ERR</code> <code>DOMException</code></p><p class="warning" id="warning-createEvent-untrusted"><strong>Warning!</strong> For security reasons, events generated using <a href="#events-Events-DocumentEvent-createEvent"><code>DocumentEvent.createEvent("Event")</code></a> must have a <code class="attribute-name"><a href="#events-event-type-trusted">trusted</a></code> attribute value of <code>false</code>. See <a href="#trusted-events">trusted events</a> for more details.</p>
+ </dd>
+ </dl>
+ </div>
+ </div>
+ <!-- parameters -->
+ <div class="return">
+ <strong>Return Value</strong>
+ <div class="returntable">
+ <table summary="Layout table: the first cell contains the type of the return value, the second contains a short description" border="0"><tr><td><p><a href="#events-Events-Event"><code>Event</code></a></p></td><td><p>The newly created event object.</p></td></tr></table>
+ </div>
+ </div>
+ <!-- return -->
+ <div class="exceptions">
+ <strong>Exceptions</strong>
+ <div class="exceptiontable">
+ <table summary="Layout table: the first cell contains the type of the exception, the second contains the specific error code and a short description" border="0"><tr><td><p><code>DOMException</code></p></td><td><p>NOT_SUPPORTED_ERR: Raised if the implementation does not support the <a href="#events-Events-Event"><code>Event</code></a> interface requested.</p></td></tr></table>
+ </div>
+ </div>
+ <!-- exceptions -->
+ </div>
<!-- method -->
</dd>
@@ -1256,13 +1327,17 @@
Given a key value and the desired format, this method returns the equivalent key value in the specified format, if the key value exists in that format.
<p class="issue"><strong>Issue:</strong> some disagreement on including this (see <a href="http://lists.w3.org/Archives/Public/www-dom/2009JulSep/0412.html">Re: convertKeyValue from Anne van Kesteren on 2009-09-22</a>)</p>
- <div class="parameters"><strong>Parameters</strong><div class="paramtable"><dl><dt><code class="parameter-name">key</code> of type <code>DOMString</code></dt><dd><p>The <code>key</code> parameter specifies the string to be converted, as a key value. This parameter must be one of the following formats: a single character, or a key name (as from the <a href="#key-values">Key Values Set</a>).</p><p>The key value need not be represent a value capable of being produced by the system keyboard in order to be converted. For example, this method may be used to find the raw <a class="def" href="#glossary-unicode-code-point">Unicode code point</a> of a Chinese ideographic glyph on a computer with only a <a class="def" href="#glossary-qwerty">QWERTY</a> keyboard and no <a class="def" href="#glossary-ime">IME</a> software.
- <br />
- </p></dd>
-<dt><code class="parameter-name">KeyValueFormat</code> of type <code>unsigned long</code></dt><dd><p>The <code>KeyValueFormat</code> parameter specifies the format to which the key value must be converted.
- <br />
- </p></dd>
-</dl></div></div>
+ <div class="parameters">
+ <strong>Parameters</strong>
+ <div class="paramtable">
+ <dl>
+ <dt><code class="parameter-name">key</code> of type <code>DOMString</code></dt>
+ <dd><p>The <code>key</code> parameter specifies the string to be converted, as a key value. This parameter must be one of the following formats: a single character, or a key name (as from the <a href="#key-values">Key Values Set</a>).</p><p>The key value need not be represent a value capable of being produced by the system keyboard in order to be converted. For example, this method may be used to find the raw <a class="def" href="#glossary-unicode-code-point">Unicode code point</a> of a Chinese ideographic glyph on a computer with only a <a class="def" href="#glossary-qwerty">QWERTY</a> keyboard and no <a class="def" href="#glossary-ime">IME</a> software.</p></dd>
+ <dt><code class="parameter-name">KeyValueFormat</code> of type <code>unsigned long</code></dt>
+ <dd><p>The <code>KeyValueFormat</code> parameter specifies the format to which the key value must be converted.</p></dd>
+ </dl>
+ </div>
+ </div>
<!-- parameters -->
<div class="return"><strong>Return Value</strong><div class="returntable"><table summary="Layout table: the first cell contains the type of the return value, the second contains a short description" border="0"><tr><td><p><a href="#events-Events-Event"><code>DOMString</code></a></p></td><td><p>The key value in the converted format, or the empty string if no equivalent of the key value exists in the format indicated.</p></td></tr></table></div></div>
@@ -1290,7 +1365,7 @@
<p>Creating <a href="#events-Events-Event"><code>Event</code></a> objects that are known to the DOM Events implementation is done using <a href="#events-Events-DocumentEvent-createEvent"><code>DocumentEvent.createEvent()</code></a>. The author must then initialize the <a href="#events-Events-Event"><code>Event</code></a> object by directly setting the <a href="#events-Events-Event"><code>Event</code></a>'s property values, by using the generic <a href="#events-event-type-initEvent"><code>Event.initEvent()</code></a> method, or by using any existing event initialization method for that interface, before invoking <a href="#events-Events-EventTarget-dispatchEvent"><code>EventTarget.dispatchEvent()</code></a>. The <a href="#events-Events-Event"><code>Event</code></a> objects created must be known by the DOM Events implementation; otherwise an event exception shall be thrown.</p>
<p class="example" id="example-create-event">
<strong>Example:</strong>
- <i class="note"><strong>To Do:</strong> Create examples of creating and dispatching an event.</i>
+ <i class="note" id=""><strong>To Do:</strong> Create examples of creating and dispatching an event.</i>
</p>
</div>
<!-- div3 Events-document -->
@@ -1753,7 +1828,7 @@
<td><a class="eventtype" href="#event-type-wheel">
<code>wheel</code>
</a></td>
- <td>Sync</td>
+ <td>Async</td>
<td>Yes</td>
<td><a class="def" href="#glossary-defaultView"><code>defaultView</code></a>, <code>Document</code>, <code>Element</code></td>
<td><a href="#events-Events-WheelEvent"><code>WheelEvent</code></a></td>
@@ -1761,8 +1836,8 @@
<td>Scroll (or zoom) the document</td>
</tr>
<tr>
- <td><a class="eventtype" href="#event-type-zoom">
- <code>zoom</code>
+ <td><a class="eventtype" href="#event-type-magnify">
+ <code>magnify</code>
</a></td>
<td>Async</td>
<td>No</td>
@@ -1798,31 +1873,28 @@
<strong>IDL Definition</strong>
</dt>
<dd>
- <div class="idl-code">
- <pre>
+ <pre class="idl" id="idl-interface-"><code>
// Introduced in DOM Level 2:
interface <a href="#events-Events-UIEvent">UIEvent</a> : <a href="#events-Events-Event">Event</a> {
readonly attribute views::AbstractView <a href="#events-Events-UIEvent-view">view</a>;
readonly attribute long <a href="#events-Events-UIEvent-detail">detail</a>;
- void <a href="#events-event-type-initUIEvent">initUIEvent</a>(in DOMString typeArg,
- in boolean canBubbleArg,
- in boolean cancelableArg,
- in views::AbstractView viewArg,
- in long detailArg);
+ void <a href="#events-event-type-initUIEvent">initUIEvent</a>(in DOMString typeArg,
+ in boolean canBubbleArg,
+ in boolean cancelableArg,
+ in views::AbstractView viewArg,
+ in long detailArg);
};
- </pre>
- </div>
- <br />
+ </code></pre>
</dd>
<dt><strong>Attributes</strong></dt>
<dd>
<dl>
<dt><code class="attribute-name"><a id="events-Events-UIEvent-detail">detail</a></code> of type <code>long</code>, readonly</dt>
- <dd>Specifies some detail information about the <a href="#events-Events-Event"><code>Event</code></a>, depending on the type of event.<br /></dd>
+ <dd><p>Specifies some detail information about the <a href="#events-Events-Event"><code>Event</code></a>, depending on the type of event.</p></dd>
<dt><code class="attribute-name"><a id="events-Events-UIEvent-view">view</a></code> of type <code>views::AbstractView</code>, readonly</dt>
- <dd>The <code>view</code> attribute identifies the <code>AbstractView</code> from which the event was generated.<br /></dd>
+ <dd><p>The <code>view</code> attribute identifies the <code>AbstractView</code> from which the event was generated.</p></dd>
</dl>
</dd>
@@ -1836,18 +1908,34 @@
</code>
</dt>
<dd>
- <div class="method">Initializes attributes of an <code>UIEvent</code> object. This method has the same behavior as <a href="#events-event-type-initEvent"><code>Event.initEvent()</code></a>.
- <div class="parameters"><strong>Parameters</strong><div class="paramtable"><dl><dt><code class="parameter-name">typeArg</code> of type <code>DOMString</code></dt><dd>Refer to the <a href="#events-event-type-initEvent"><code>Event.initEvent()</code></a> method for a description of this parameter.<br /></dd>
-<dt><code class="parameter-name">canBubbleArg</code> of type <code>boolean</code></dt><dd>Refer to the <a href="#events-event-type-initEvent"><code>Event.initEvent()</code></a> method for a description of this parameter.<br /></dd>
-<dt><code class="parameter-name">cancelableArg</code> of type <code>boolean</code></dt><dd>Refer to the <a href="#events-event-type-initEvent"><code>Event.initEvent()</code></a> method for a description of this parameter.<br /></dd>
-<dt><code class="parameter-name">viewArg</code> of type <code>views::AbstractView</code></dt><dd>Specifies <a href="#events-Events-UIEvent-view"><code>UIEvent.view</code></a>. This value may be <code>null</code>.<br /></dd>
-<dt><code class="parameter-name">detailArg</code> of type <code>long</code></dt><dd>Specifies <a href="#events-Events-UIEvent-detail"><code>UIEvent.detail</code></a>.<br /></dd>
-</dl></div></div>
- <!-- parameters -->
- <div><strong>No Return Value</strong></div>
-
- <div><strong>No Exceptions</strong></div>
- </div>
+ <div class="method">
+ <p>Initializes attributes of an <code>UIEvent</code> object. This method has the same behavior as <a href="#events-event-type-initEvent"><code>Event.initEvent()</code></a>.</p>
+ <div class="parameters">
+ <strong>Parameters</strong>
+ <div class="paramtable">
+ <dl>
+ <dt><code class="parameter-name">typeArg</code> of type <code>DOMString</code></dt>
+ <dd><p>Refer to the <a href="#events-event-type-initEvent"><code>Event.initEvent()</code></a> method for a description of this parameter.</p></dd>
+
+ <dt><code class="parameter-name">canBubbleArg</code> of type <code>boolean</code></dt>
+ <dd><p>Refer to the <a href="#events-event-type-initEvent"><code>Event.initEvent()</code></a> method for a description of this parameter.</p></dd>
+
+ <dt><code class="parameter-name">cancelableArg</code> of type <code>boolean</code></dt>
+ <dd><p>Refer to the <a href="#events-event-type-initEvent"><code>Event.initEvent()</code></a> method for a description of this parameter.</p></dd>
+
+ <dt><code class="parameter-name">viewArg</code> of type <code>views::AbstractView</code></dt>
+ <dd><p>Specifies <a href="#events-Events-UIEvent-view"><code>UIEvent.view</code></a>. This value may be <code>null</code>.</p></dd>
+
+ <dt><code class="parameter-name">detailArg</code> of type <code>long</code></dt>
+ <dd><p>Specifies <a href="#events-Events-UIEvent-detail"><code>UIEvent.detail</code></a>.</p></dd>
+ </dl>
+ </div>
+ </div>
+ <!-- parameters -->
+ <div><strong>No Return Value</strong></div>
+
+ <div><strong>No Exceptions</strong></div>
+ </div>
<!-- method -->
</dd>
</dl>
@@ -1875,8 +1963,8 @@
<tr class="assert must"><th>Context info</th><td><a href="#events-Events-UIEvent-view"><code>UIEvent.view</code></a> is in use.</td></tr>
</table>
<p>A <a class="def" href="#glossary-user-agent">user agent</a> must dispatch this event when a button, link, or other state-changing element is activated. Refer to <a href="#event-flow-activation">Activation triggers and behavior</a> for more details.</p>
- <p class="warning" id="DOMActivate-deprecated"><strong>Warning!</strong> The <a class="eventtype" href="#event-type-DOMActivate"><code>DOMActivate</code></a><a class="def" href="#glossary-event-type">event type</a> is defined in this specification for reference and completeness, but this specification <a class="def" href="#glossary-deprecated">deprecates</a> the use of this event type in favor of the related <a class="def" href="#glossary-event-type">event type</a><a class="eventtype" href="#event-type-click"><code>click</code></a>. Other specifications may define and maintain their own <a class="eventtype" href="#event-type-DOMActivate"><code>DOMActivate</code></a><a class="def" href="#glossary-event-type">event type</a> for backwards compatibility.</p>
- <p class="note" id="DOMActivate-click"><strong>Note:</strong> While <a class="eventtype" href="#event-type-DOMActivate"><code>DOMActivate</code></a> and <a class="eventtype" href="#event-type-click"><code>click</code></a> are not completely equivalent, implemented behavior for the <a class="eventtype" href="#event-type-click"><code>click</code></a><a class="def" href="#glossary-event-type">event type</a> has developed to encompass the most critical accessibility aspects for which the <a class="eventtype" href="#event-type-DOMActivate"><code>DOMActivate</code></a><a class="def" href="#glossary-event-type">event type</a> was designed, and is more widely implemented. Authors are encouraged to use the <a class="eventtype" href="#event-type-click"><code>click</code></a><a class="def" href="#glossary-event-type">event type</a> rather than the related <a class="eventtype" href="#event-type-mousedown"><code>mousedown</code></a> or <a class="eventtype" href="#event-type-mouseup"><code>mouseup</code></a><a class="def" href="#glossary-event-type">event type</a> to ensure maximum accessibility.</p>
+ <p class="warning" id="DOMActivate-deprecated"><strong>Warning!</strong> The <a class="eventtype" href="#event-type-DOMActivate"><code>DOMActivate</code></a> <a class="def" href="#glossary-event-type">event type</a> is defined in this specification for reference and completeness, but this specification <a class="def" href="#glossary-deprecated">deprecates</a> the use of this event type in favor of the related <a class="def" href="#glossary-event-type">event type</a><a class="eventtype" href="#event-type-click"><code>click</code></a>. Other specifications may define and maintain their own <a class="eventtype" href="#event-type-DOMActivate"><code>DOMActivate</code></a> <a class="def" href="#glossary-event-type">event type</a> for backwards compatibility.</p>
+ <p class="note" id="DOMActivate-click"><strong>Note:</strong> While <a class="eventtype" href="#event-type-DOMActivate"><code>DOMActivate</code></a> and <a class="eventtype" href="#event-type-click"><code>click</code></a> are not completely equivalent, implemented behavior for the <a class="eventtype" href="#event-type-click"><code>click</code></a><a class="def" href="#glossary-event-type">event type</a> has developed to encompass the most critical accessibility aspects for which the <a class="eventtype" href="#event-type-DOMActivate"><code>DOMActivate</code></a> <a class="def" href="#glossary-event-type">event type</a> was designed, and is more widely implemented. Authors are encouraged to use the <a class="eventtype" href="#event-type-click"><code>click</code></a><a class="def" href="#glossary-event-type">event type</a> rather than the related <a class="eventtype" href="#event-type-mousedown"><code>mousedown</code></a> or <a class="eventtype" href="#event-type-mouseup"><code>mouseup</code></a><a class="def" href="#glossary-event-type">event type</a> to ensure maximum accessibility.</p>
</dd>
</dl>
</div>
@@ -2015,7 +2103,7 @@
<p class="note" id="note-get-select"><strong>Note:</strong> In order to access to user-selected content, authors should use native capabilities of the <a class="def" href="#glossary-host-language">host languages</a>, such as the <code>Document.getSelection()</code> method of HTML's <a href="http://dev.w3.org/html5/spec/editing.html#selection" title="7 User Interaction — HTML 5">text selection APIs</a> [<cite><a class="informative" href="#references-HTML5">HTML5</a></cite>].</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="informative" href="#references-HTML5">HTML5</a></cite>], <a class="eventtype" href="#event-type-select"><code>select</code></a> events may 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" id="note-select-na"><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="informative" href="#references-HTML5">HTML5</a></cite>], <a class="eventtype" href="#event-type-select"><code>select</code></a> events may 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>
@@ -2048,7 +2136,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 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 <a class="eventtype" href="#event-type-zoom"><code>zoom</code></a> event, 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-magnify"><strong>Note:</strong> The <a class="eventtype" href="#event-type-resize"><code>resize</code></a> event is distinct from the <a class="eventtype" href="#event-type-magnify"><code>magnify</code></a> or 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>
@@ -2076,13 +2164,13 @@
</dl>
</div>
-<!-- zoom -->
+<!-- magnify -->
<div class="event-definition assert must">
<dl>
- <dt id="event-type-zoom"><dfn><a class="eventtype" href="#event-type-zoom"><code>zoom</code></a></dfn></dt>
+ <dt id="event-type-magnify"><dfn><a class="eventtype" href="#event-type-magnify"><code>magnify</code></a></dfn></dt>
<dd>
<table border="0" summary="This table contains information about the semantics of the given event type" cellpadding="2" cellspacing="0">
- <tr class="assert must"><th>Type</th><td class="eventname"><strong><code>zoom</code></strong></td></tr>
+ <tr class="assert must"><th>Type</th><td class="eventname"><strong><code>magnify</code></strong></td></tr>
<tr class="assert must"><th>Interface</th><td><a href="#events-Events-UIEvent"><code>UIEvent</code></a></td></tr>
<tr class="assert must"><th>Sync / Async</th><td>Async</td></tr>
<tr class="assert must"><th>Bubbles</th><td>No</td></tr>
@@ -2093,8 +2181,8 @@
<!-- <tr class="assert must"><th>Context info</th><td><a href="#events-Events-UIEvent-view"><code>UIEvent.view</code></a> is in use. The <a href="#events-Events-UIEvent-detail"><code>UIEvent.detail</code></a> attribute indicates the <a href="#events-current-scale-coefficient">current scale coefficient</a> of the <a class="def" href="#glossary-event-target">event target</a>.</td></tr> -->
</table>
- <p>A <a class="def" href="#glossary-user-agent">user agent</a> must dispatch this event when a document view or an element has been zoomed. This event type is dispatched after the scroll has occurred.</p>
- <p class="note"><strong>Note:</strong> The <a class="eventtype" href="#event-type-zoom"><code>zoom</code></a> event may not be available for all elements in all languages. For example, in [<cite><a class="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>
+ <p>A <a class="def" href="#glossary-user-agent">user agent</a> must dispatch this event when a document view or an element has been increased or decreased in rendered size, as associated with the browser "font zooming" or "page zooming" functionality. This event type is dispatched after the size change has occurred.</p>
+ <p class="note" id="note-magnify-resize-zoom"><strong>Note:</strong> The <a class="eventtype" href="#event-type-magnify"><code>magnify</code></a> event is distinct from the <a class="eventtype" href="#event-type-resize"><code>resize</code></a> or 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.</p>
<!-- <p>A <a class="def" href="#glossary-host-language">host language</a> which can be zoomed should define a way for authors to access the manner</p> -->
<!-- <p>The value of <a href="#events-Events-UIEvent-detail"><code>UIEvent.detail</code></a> must reflect the <dfn id="events-current-scale-coefficient">current scale coefficient</dfn> (or "zoom level") of the document or element. The initial value for the current scale coefficient must be 1. Each doubling in size of the <a class="def" href="#glossary-event-target">event target</a> must multiply the current scale coefficient, and each halving</p> -->
@@ -2120,28 +2208,31 @@
<strong>IDL Definition</strong>
</dt>
<dd>
- <div class="idl-code">
- <pre>
+ <pre class="idl" id="idl-interface-"><code>
// Introduced in DOM Level 3:
interface <a href="#events-Events-FocusEvent">FocusEvent</a> : <a href="#events-Events-UIEvent">UIEvent</a> {
- readonly attribute <a href="#events-Events-EventTarget">EventTarget</a> <a href="#events-Events-FocusEvent-relatedTarget">relatedTarget</a>;
- void <a href="#events-event-type-initFocusEvent">initFocusEvent</a>(in DOMString typeArg,
- in boolean canBubbleArg,
- in boolean cancelableArg,
- in views::AbstractView viewArg,
- in long detailArg,
- in <a href="#events-Events-EventTarget">EventTarget</a> relatedTargetArg);
+ readonly attribute <a href="#events-Events-EventTarget">EventTarget</a> <a href="#events-Events-FocusEvent-relatedTarget">relatedTarget</a>;
+ void <a href="#events-event-type-initFocusEvent">initFocusEvent</a>(in DOMString typeArg,
+ in boolean canBubbleArg,
+ in boolean cancelableArg,
+ in views::AbstractView viewArg,
+ in long detailArg,
+ in <a href="#events-Events-EventTarget">EventTarget</a> relatedTargetArg);
};
- </pre>
- </div>
- <br />
+ </code></pre>
</dd>
<dt><strong>Attributes</strong></dt>
<dd>
<dl>
<dt><code class="attribute-name"><a id="events-Events-FocusEvent-relatedTarget">relatedTarget</a></code> of type <a href="#events-Events-EventTarget"><code>EventTarget</code></a>, readonly</dt>
- <dd>Used to identify a secondary <a href="#events-Events-EventTarget"><code>EventTarget</code></a> related to a Focus event, depending on the type of event.<br /></dd>
+ <dd>
+ <p>Used to identify a secondary <a href="#events-Events-EventTarget"><code>EventTarget</code></a> related to a Focus event, depending on the type of event.</p>
+
+ <p class="issue" id="issue-relatedTarget-null-document"><strong>Issue:</strong> Should relatedTarget be null when it would point to an element outside the current document? See [<a href="http://lists.w3.org/Archives/Public/www-dom/2010JanMar/0010.html">Comments from Olli Pettay</a>]</p>
+
+ <p class="issue" id="issue-relatedTarget-null-document"><strong>Issue:</strong> Should relatedTarget be null when it points to the same element as 'target'? See [<a href="http://lists.w3.org/Archives/Public/www-dom/2010JanMar/0010.html">Comments from Olli Pettay</a>]</p>
+ </dd>
</dl>
</dd>
@@ -2156,13 +2247,31 @@
</dt>
<dd>
<div class="method">Initializes attributes of a <code>FocusEvent</code> object. This method has the same behavior as <a href="#events-event-type-initUIEvent"><code>UIEvent.initUIEvent()</code></a>.
- <div class="parameters"><strong>Parameters</strong><div class="paramtable"><dl><dt><code class="parameter-name">typeArg</code> of type <code>DOMString</code></dt><dd>Refer to the <a href="#events-event-type-initUIEvent"><code>UIEvent.initUIEvent()</code></a> method for a description of this parameter.<br /></dd>
-<dt><code class="parameter-name">canBubbleArg</code> of type <code>boolean</code></dt><dd>Refer to the <a href="#events-event-type-initUIEvent"><code>UIEvent.initUIEvent()</code></a> method for a description of this parameter.<br /></dd>
-<dt><code class="parameter-name">cancelableArg</code> of type <code>boolean</code></dt><dd>Refer to the <a href="#events-event-type-initUIEvent"><code>UIEvent.initUIEvent()</code></a> method for a description of this parameter.<br /></dd>
-<dt><code class="parameter-name">viewArg</code> of type <code>views::AbstractView</code></dt><dd>Refer to the <a href="#events-event-type-initUIEvent"><code>UIEvent.initUIEvent()</code></a> method for a description of this parameter.<br /></dd>
-<dt><code class="parameter-name">detailArg</code> of type <code>long</code></dt><dd>Refer to the <a href="#events-event-type-initUIEvent"><code>UIEvent.initUIEvent()</code></a> method for a description of this parameter.<br /></dd>
-<dt><code class="parameter-name">relatedTargetArg</code> of type <a href="#events-Events-EventTarget"><code>EventTarget</code></a></dt><dd>Specifies <a href="#events-Events-FocusEvent-relatedTarget"><code>FocusEvent.relatedTarget</code></a>. This value may be <code>null</code>.<br /></dd>
-</dl></div></div>
+ <div class="parameters">
+ <strong>Parameters</strong>
+ <div class="paramtable">
+ <dl>
+ <dt><code class="parameter-name">typeArg</code> of type <code>DOMString</code></dt>
+ <dd><p>Refer to the <a href="#events-event-type-initUIEvent"><code>UIEvent.initUIEvent()</code></a> method for a description of this parameter.</p></dd>
+
+ <dt><code class="parameter-name">canBubbleArg</code> of type <code>boolean</code></dt>
+ <dd><p>Refer to the <a href="#events-event-type-initUIEvent"><code>UIEvent.initUIEvent()</code></a> method for a description of this parameter.</p></dd>
+
+ <dt><code class="parameter-name">cancelableArg</code> of type <code>boolean</code></dt>
+ <dd><p>Refer to the <a href="#events-event-type-initUIEvent"><code>UIEvent.initUIEvent()</code></a> method for a description of this parameter.</p></dd>
+
+ <dt><code class="parameter-name">viewArg</code> of type <code>views::AbstractView</code></dt>
+ <dd><p>Refer to the <a href="#events-event-type-initUIEvent"><code>UIEvent.initUIEvent()</code></a> method for a description of this parameter.</p></dd>
+
+ <dt><code class="parameter-name">detailArg</code> of type <code>long</code></dt>
+ <dd><p>Refer to the <a href="#events-event-type-initUIEvent"><code>UIEvent.initUIEvent()</code></a> method for a description of this parameter.</p></dd>
+
+ <dt><code class="parameter-name">relatedTargetArg</code> of type <a href="#events-Events-EventTarget"><code>EventTarget</code></a></dt>
+ <dd><p>Specifies <a href="#events-Events-FocusEvent-relatedTarget"><code>FocusEvent.relatedTarget</code></a>. This value may be <code>null</code>.</p>
+ </dd>
+ </dl>
+ </div>
+ </div>
<!-- parameters -->
<div><strong>No Return Value</strong></div>
@@ -2181,10 +2290,10 @@
</h4>
<p>The focus events defined in this specification occur in a set order relative to one another. The following is the typical sequence of events when a focus is shifted between elements (this order assumes that no element is initially focused):</p>
<ol>
- <li><em>[user shifts focus]</em><a class="eventtype" href="#event-type-focusin"><code>focusin</code></a> (before first target element receives focus)</li>
+ <li><em>[user shifts focus]</em> <a class="eventtype" href="#event-type-focusin"><code>focusin</code></a> (before first target element receives focus)</li>
<li><a class="eventtype" href="#event-type-focus"><code>focus</code></a> (after first target element receives focus)</li>
<li><a class="eventtype" href="#event-type-DOMFocusIn"><code>DOMFocusIn</code></a> (if supported)</li>
- <li><em>[user shifts focus]</em><a class="eventtype" href="#event-type-focusout"><code>focusout</code></a> (before first target element loses focus)</li>
+ <li><em>[user shifts focus]</em> <a class="eventtype" href="#event-type-focusout"><code>focusout</code></a> (before first target element loses focus)</li>
<li><a class="eventtype" href="#event-type-focusin"><code>focusin</code></a> (before second target element receives focus)</li>
<li><a class="eventtype" href="#event-type-blur"><code>blur</code></a> (after first target element loses focus)</li>
<li><a class="eventtype" href="#event-type-DOMFocusOut"><code>DOMFocusOut</code></a> (if supported)</li>
@@ -2238,7 +2347,7 @@
<tr class="assert must"><th>Context info</th><td><a href="#events-Events-UIEvent-view"><code>UIEvent.view</code></a> is in use. The value of the <code class="attribute-name"><a href="#events-event-type-target">Event.target</a></code> and <code class="attribute-name"><a href="#events-Events-FocusEvent-relatedTarget">FocusEvent.relatedTarget</a></code> attributes is the <a class="def" href="#glossary-event-target">event target</a> receiving focus.</td></tr>
</table>
<p>A <a class="def" href="#glossary-user-agent">user agent</a> must dispatch this event when an <a class="def" href="#glossary-event-target">event target</a> receives focus. The focus shall be given to the element before the dispatch of this event type. This event type shall be dispatched after the event type <a class="eventtype" href="#event-type-focus"><code>focus</code></a>.</p>
- <p class="warning"><strong>Warning!</strong> the <a class="eventtype" href="#event-type-DOMFocusIn"><code>DOMFocusIn</code></a> event type is defined in this specification for reference and completeness, but this specification <a class="def" href="#glossary-deprecated">deprecates</a> the use of this event type in favor of the related event types <a class="eventtype" href="#event-type-focus"><code>focus</code></a> and <a class="eventtype" href="#event-type-focusin"><code>focusin</code></a>.</p>
+ <p class="warning" id=""><strong>Warning!</strong> the <a class="eventtype" href="#event-type-DOMFocusIn"><code>DOMFocusIn</code></a> event type is defined in this specification for reference and completeness, but this specification <a class="def" href="#glossary-deprecated">deprecates</a> the use of this event type in favor of the related event types <a class="eventtype" href="#event-type-focus"><code>focus</code></a> and <a class="eventtype" href="#event-type-focusin"><code>focusin</code></a>.</p>
</dd>
</dl>
</div>
@@ -2261,7 +2370,7 @@
<tr class="assert must"><th>Context info</th><td><a href="#events-Events-UIEvent-view"><code>UIEvent.view</code></a> is in use. The value of the <code class="attribute-name"><a href="#events-event-type-target">Event.target</a></code> and <code class="attribute-name"><a href="#events-Events-FocusEvent-relatedTarget">FocusEvent.relatedTarget</a></code> attributes is the <a class="def" href="#glossary-event-target">event target</a> losing focus.</td></tr>
</table>
<p>A <a class="def" href="#glossary-user-agent">user agent</a> must dispatch this event when an <a class="def" href="#glossary-event-target">event target</a> loses focus. The focus shall be taken from the element before the dispatch of this event type. This event type shall be dispatched after the event type <a class="eventtype" href="#event-type-blur"><code>blur</code></a>.</p>
- <p class="warning"><strong>Warning!</strong> the <a class="eventtype" href="#event-type-DOMFocusOut"><code>DOMFocusOut</code></a> event type is defined in this specification for reference and completeness, but this specification <a class="def" href="#glossary-deprecated">deprecates</a> the use of this event type in favor of the related event types <a class="eventtype" href="#event-type-blur"><code>blur</code></a> and <a class="eventtype" href="#event-type-focusout"><code>focusout</code></a>.</p>
+ <p class="warning" id=""><strong>Warning!</strong> the <a class="eventtype" href="#event-type-DOMFocusOut"><code>DOMFocusOut</code></a> event type is defined in this specification for reference and completeness, but this specification <a class="def" href="#glossary-deprecated">deprecates</a> the use of this event type in favor of the related event types <a class="eventtype" href="#event-type-blur"><code>blur</code></a> and <a class="eventtype" href="#event-type-focusout"><code>focusout</code></a>.</p>
</dd>
</dl>
</div>
@@ -2306,7 +2415,7 @@
<tr class="assert must"><th>Context info</th><td><a href="#events-Events-UIEvent-view"><code>UIEvent.view</code></a> is in use. The value of the <code class="attribute-name"><a href="#events-event-type-target">Event.target</a></code> attribute is is the <a class="def" href="#glossary-event-target">event target</a> receiving focus, and the value of the <code class="attribute-name"><a href="#events-Events-FocusEvent-relatedTarget">FocusEvent.relatedTarget</a></code> attribute is the <a class="def" href="#glossary-event-target">event target</a> losing focus (if any).</td></tr>
</table>
<p>A <a class="def" href="#glossary-user-agent">user agent</a> must dispatch this event when an <a class="def" href="#glossary-event-target">event target</a> is about to receive focus. This event type must be dispatched before the element is given focus. The <a class="def" href="#glossary-event-target">event target</a> must be the element which is about to receive focus. This event type is similar to <a class="eventtype" href="#event-type-focus"><code>focus</code></a>, but is dispatched before focus is shifted, and does bubble.</p>
- <p class="note"><strong>Note:</strong> When using this event type, the author may use the event's <code class="attribute-name"><a href="#events-Events-FocusEvent-relatedTarget">FocusEvent.relatedTarget</a></code> attribute (or a host-language-specific method or means) to get the currently focused element before the focus shifts to the next focus <a class="def" href="#glossary-event-target">event target</a>, thus having optional access to both the element losing focus and the element gaining focus without the use of the <a class="eventtype" href="#event-type-blur"><code>blur</code></a> or <a class="eventtype" href="#event-type-focusout">focusout</a> event types.</p>
+ <p class="note" id=""><strong>Note:</strong> When using this event type, the author may use the event's <code class="attribute-name"><a href="#events-Events-FocusEvent-relatedTarget">FocusEvent.relatedTarget</a></code> attribute (or a host-language-specific method or means) to get the currently focused element before the focus shifts to the next focus <a class="def" href="#glossary-event-target">event target</a>, thus having optional access to both the element losing focus and the element gaining focus without the use of the <a class="eventtype" href="#event-type-blur"><code>blur</code></a> or <a class="eventtype" href="#event-type-focusout">focusout</a> event types.</p>
</dd>
</dl>
</div>
@@ -2346,15 +2455,14 @@
<p>The <code>MouseEvent</code> interface provides specific contextual information associated with Mouse events.</p>
<p>In the case of nested elements mouse events are always targeted at the most deeply nested element. Ancestors of the targeted element may use bubbling to obtain notification of mouse events which occur within their descendent elements.</p>
<p>To create an instance of the <code>MouseEvent</code> interface, use the <a href="#events-Events-DocumentEvent-createEvent"><code>DocumentEvent.createEvent("MouseEvent")</code></a> method call.</p>
- <p class="note"><strong>Note:</strong> When initializing <code>MouseEvent</code> objects using <code>initMouseEvent</code> or <code>initMouseEventNS</code>, implementations should use the client coordinates <code>clientX</code> and <code>clientY</code> for calculation of other coordinates (such as target coordinates exposed by <a class="def" href="#glossary-DOM-Level-0">DOM Level 0</a> implementations or other proprietary attributes, e.g. <code>pageX</code>).</p>
+ <p class="note" id=""><strong>Note:</strong> When initializing <code>MouseEvent</code> objects using <code>initMouseEvent</code> or <code>initMouseEventNS</code>, implementations should use the client coordinates <code>clientX</code> and <code>clientY</code> for calculation of other coordinates (such as target coordinates exposed by <a class="def" href="#glossary-DOM-Level-0">DOM Level 0</a> implementations or other proprietary attributes, e.g. <code>pageX</code>).</p>
<dl>
<dt>
<br />
<strong>IDL Definition</strong>
</dt>
<dd>
- <div class="idl-code">
- <pre>
+ <pre class="idl" id="idl-interface-"><code>
// Modified in DOM Level 3:
interface <a href="#events-Events-MouseEvent">MouseEvent</a> : <a href="#events-Events-UIEvent">UIEvent</a> {
readonly attribute long <a href="#events-Events-MouseEvent-screenX">screenX</a>;
@@ -2367,36 +2475,34 @@
readonly attribute boolean <a href="#events-Events-MouseEvent-metaKey">metaKey</a>;
readonly attribute unsigned short <a href="#events-Events-MouseEvent-button">button</a>;
readonly attribute unsigned short <a href="#events-Events-MouseEvent-buttons">buttons</a>;
- readonly attribute <a href="#events-Events-EventTarget">EventTarget</a> <a href="#events-Events-MouseEvent-relatedTarget">relatedTarget</a>;
- void <a href="#events-event-type-initMouseEvent">initMouseEvent</a>(in DOMString typeArg,
- in boolean canBubbleArg,
- in boolean cancelableArg,
- in views::AbstractView viewArg,
- in long detailArg,
- in long screenXArg,
- in long screenYArg,
- in long clientXArg,
- in long clientYArg,
- in boolean ctrlKeyArg,
- in boolean altKeyArg,
- in boolean shiftKeyArg,
- in boolean metaKeyArg,
- in unsigned short buttonArg,
- in unsigned short buttonsArg,
- in <a href="#events-Events-EventTarget">EventTarget</a> relatedTargetArg);
+ readonly attribute <a href="#events-Events-EventTarget">EventTarget</a> <a href="#events-Events-MouseEvent-relatedTarget">relatedTarget</a>;
+ void <a href="#events-event-type-initMouseEvent">initMouseEvent</a>(in DOMString typeArg,
+ in boolean canBubbleArg,
+ in boolean cancelableArg,
+ in views::AbstractView viewArg,
+ in long detailArg,
+ in long screenXArg,
+ in long screenYArg,
+ in long clientXArg,
+ in long clientYArg,
+ in boolean ctrlKeyArg,
+ in boolean altKeyArg,
+ in boolean shiftKeyArg,
+ in boolean metaKeyArg,
+ in unsigned short buttonArg,
+ in unsigned short buttonsArg,
+ in <a href="#events-Events-EventTarget">EventTarget</a> relatedTargetArg);
// Introduced in DOM Level 3:
- boolean <a href="#events-Events-MouseEvent-getModifierState">getModifierState</a>(in DOMString keyArg);
+ boolean <a href="#events-Events-MouseEvent-getModifierState">getModifierState</a>(in DOMString keyArg);
};
- </pre>
- </div>
- <br />
+ </code></pre>
</dd>
<dt><strong>Attributes</strong></dt>
<dd>
<dl>
<dt><code class="attribute-name"><a id="events-Events-MouseEvent-altKey">altKey</a></code> of type <code>boolean</code>, readonly</dt>
- <dd>Refer to the <a href="#events-Events-KeyboardEvent-altKey"><code>KeyboardEvent.altKey</code></a> attribute.<br /></dd>
+ <dd><p>Refer to the <a href="#events-Events-KeyboardEvent-altKey"><code>KeyboardEvent.altKey</code></a> attribute.</p></dd>
<dt><code class="attribute-name"><a id="events-Events-MouseEvent-button">button</a></code> of type <code>unsigned short</code>, readonly</dt>
<dd>
@@ -2411,7 +2517,7 @@
</dd>
<dt><code class="attribute-name"><a id="events-Events-MouseEvent-buttons">buttons</a></code> of type <code>unsigned short</code>, readonly</dt>
- <dd>During mouse events caused by the depression or release of a mouse button, <code>buttons</code> shall be used to indicate which combination of mouse buttons are currently being pressed, expressed as a bitmask. <span class="note"><strong>Note:</strong> This should not be confused with the <a href="#events-Events-MouseEvent-button">button</a> attribute.</span>
+ <dd>During mouse events caused by the depression or release of a mouse button, <code>buttons</code> shall be used to indicate which combination of mouse buttons are currently being pressed, expressed as a bitmask. <span class="note" id=""><strong>Note:</strong> This should not be confused with the <a href="#events-Events-MouseEvent-button">button</a> attribute.</span>
<p>The value of the <a href="#events-Events-MouseEvent-buttons"><code>MouseEvent.buttons</code></a> attribute must be as follows:</p>
<ul>
<li><code>0</code> must indicates no button is currently active.</li>
@@ -2424,28 +2530,28 @@
</dd>
<dt><code class="attribute-name"><a id="events-Events-MouseEvent-clientX">clientX</a></code> of type <code>long</code>, readonly</dt>
- <dd>The horizontal coordinate at which the event occurred relative to the viewport associated with the event.<br /></dd>
+ <dd><p>The horizontal coordinate at which the event occurred relative to the viewport associated with the event.</p></dd>
<dt><code class="attribute-name"><a id="events-Events-MouseEvent-clientY">clientY</a></code> of type <code>long</code>, readonly</dt>
- <dd>The vertical coordinate at which the event occurred relative to the viewport associated with the event.<br /></dd>
+ <dd><p>The vertical coordinate at which the event occurred relative to the viewport associated with the event.</p></dd>
<dt><code class="attribute-name"><a id="events-Events-MouseEvent-ctrlKey">ctrlKey</a></code> of type <code>boolean</code>, readonly</dt>
- <dd>Refer to the <a href="#events-Events-KeyboardEvent-ctrlKey"><code>KeyboardEvent.ctrlKey</code></a> attribute.<br /></dd>
+ <dd><p>Refer to the <a href="#events-Events-KeyboardEvent-ctrlKey"><code>KeyboardEvent.ctrlKey</code></a> attribute.</p></dd>
<dt><code class="attribute-name"><a id="events-Events-MouseEvent-metaKey">metaKey</a></code> of type <code>boolean</code>, readonly</dt>
- <dd>Refer to the <a href="#events-Events-KeyboardEvent-metaKey"><code>KeyboardEvent.metaKey</code></a> attribute.<br /></dd>
+ <dd><p>Refer to the <a href="#events-Events-KeyboardEvent-metaKey"><code>KeyboardEvent.metaKey</code></a> attribute.</p></dd>
<dt><code class="attribute-name"><a id="events-Events-MouseEvent-relatedTarget">relatedTarget</a></code> of type <a href="#events-Events-EventTarget"><code>EventTarget</code></a>, readonly</dt>
- <dd>Used to identify a secondary <a href="#events-Events-EventTarget"><code>EventTarget</code></a> related to a UI event, depending on the type of event.<br /></dd>
+ <dd><p>Used to identify a secondary <a href="#events-Events-EventTarget"><code>EventTarget</code></a> related to a UI event, depending on the type of event.</p></dd>
<dt><code class="attribute-name"><a id="events-Events-MouseEvent-screenX">screenX</a></code> of type <code>long</code>, readonly</dt>
- <dd>The horizontal coordinate at which the event occurred relative to the origin of the screen coordinate system.<br /></dd>
+ <dd><p>The horizontal coordinate at which the event occurred relative to the origin of the screen coordinate system.</p></dd>
<dt><code class="attribute-name"><a id="events-Events-MouseEvent-screenY">screenY</a></code> of type <code>long</code>, readonly</dt>
- <dd>The vertical coordinate at which the event occurred relative to the origin of the screen coordinate system.<br /></dd>
+ <dd><p>The vertical coordinate at which the event occurred relative to the origin of the screen coordinate system.</p></dd>
<dt><code class="attribute-name"><a id="events-Events-MouseEvent-shiftKey">shiftKey</a></code> of type <code>boolean</code>, readonly</dt>
- <dd>Refer to the <a href="#events-Events-KeyboardEvent-shiftKey"><code>KeyboardEvent.shiftKey</code></a> attribute.<br /></dd>
+ <dd><p>Refer to the <a href="#events-Events-KeyboardEvent-shiftKey"><code>KeyboardEvent.shiftKey</code></a> attribute.</p></dd>
</dl>
</dd>
@@ -2456,8 +2562,15 @@
<dt><code class="method-name"><a id="events-Events-MouseEvent-getModifierState">getModifierState</a></code> introduced in <strong class="since">DOM Level 3</strong></dt>
<dd>
<div class="method">Queries the state of a modifier using a key value. See also <a href="#keyset-Modifiers">Modifier keys</a>.
- <div class="parameters"><strong>Parameters</strong><div class="paramtable"><dl><dt><code class="parameter-name">keyArg</code> of type <code>DOMString</code></dt><dd>Refer to the <a href="#events-Events-KeyboardEvent-getModifierState"><code>KeyboardEvent.getModifierState()</code></a> method for a description of this parameter.<br /></dd>
-</dl></div></div>
+ <div class="parameters">
+ <strong>Parameters</strong>
+ <div class="paramtable">
+ <dl>
+ <dt><code class="parameter-name">keyArg</code> of type <code>DOMString</code></dt>
+ <dd><p>Refer to the <a href="#events-Events-KeyboardEvent-getModifierState"><code>KeyboardEvent.getModifierState()</code></a> method for a description of this parameter.</p></dd>
+ </dl>
+ </div>
+ </div>
<!-- parameters -->
<div class="return"><strong>Return Value</strong><div class="returntable"><table summary="Layout table: the first cell contains the type of the return value, the second contains a short description" border="0"><tr class="assert must"><td><p><code>boolean</code></p></td><td><p><code>true</code> if it is a modifier key and the modifier is activated, <code>false</code> otherwise.</p></td></tr></table></div></div>
<!-- return -->
@@ -2472,23 +2585,59 @@
</code>
</dt>
<dd>
- <div class="method">Initializes attributes of a <code>MouseEvent</code> object. This method has the same behavior as <a href="#events-event-type-initUIEvent"><code>UIEvent.initUIEvent()</code></a>.
- <div class="parameters"><strong>Parameters</strong><div class="paramtable"><dl><dt><code class="parameter-name">typeArg</code> of type <code>DOMString</code></dt><dd>Refer to the <a href="#events-event-type-initUIEvent"><code>UIEvent.initUIEvent()</code></a> method for a description of this parameter.<br /></dd>
-<dt><code class="parameter-name">canBubbleArg</code> of type <code>boolean</code></dt><dd>Refer to the <a href="#events-event-type-initUIEvent"><code>UIEvent.initUIEvent()</code></a> method for a description of this parameter.<br /></dd>
-<dt><code class="parameter-name">cancelableArg</code> of type <code>boolean</code></dt><dd>Refer to the <a href="#events-event-type-initUIEvent"><code>UIEvent.initUIEvent()</code></a> method for a description of this parameter.<br /></dd>
-<dt><code class="parameter-name">viewArg</code> of type <code>views::AbstractView</code></dt><dd>Refer to the <a href="#events-event-type-initUIEvent"><code>UIEvent.initUIEvent()</code></a> method for a description of this parameter.<br /></dd>
-<dt><code class="parameter-name">detailArg</code> of type <code>long</code></dt><dd>Refer to the <a href="#events-event-type-initUIEvent"><code>UIEvent.initUIEvent()</code></a> method for a description of this parameter.<br /></dd>
-<dt><code class="parameter-name">screenXArg</code> of type <code>long</code></dt><dd>Specifies <a href="#events-Events-MouseEvent-screenX"><code>MouseEvent.screenX</code></a>.<br /></dd>
-<dt><code class="parameter-name">screenYArg</code> of type <code>long</code></dt><dd>Specifies <a href="#events-Events-MouseEvent-screenY"><code>MouseEvent.screenY</code></a>.<br /></dd>
-<dt><code class="parameter-name">clientXArg</code> of type <code>long</code></dt><dd>Specifies <a href="#events-Events-MouseEvent-clientX"><code>MouseEvent.clientX</code></a>.<br /></dd>
-<dt><code class="parameter-name">clientYArg</code> of type <code>long</code></dt><dd>Specifies <a href="#events-Events-MouseEvent-clientY"><code>MouseEvent.clientY</code></a>.<br /></dd>
-<dt><code class="parameter-name">ctrlKeyArg</code> of type <code>boolean</code></dt><dd>Specifies <a href="#events-Events-MouseEvent-ctrlKey"><code>MouseEvent.ctrlKey</code></a>.<br /></dd>
-<dt><code class="parameter-name">altKeyArg</code> of type <code>boolean</code></dt><dd>Specifies <a href="#events-Events-MouseEvent-altKey"><code>MouseEvent.altKey</code></a>.<br /></dd>
-<dt><code class="parameter-name">shiftKeyArg</code> of type <code>boolean</code></dt><dd>Specifies <a href="#events-Events-MouseEvent-shiftKey"><code>MouseEvent.shiftKey</code></a>.<br /></dd>
-<dt><code class="parameter-name">metaKeyArg</code> of type <code>boolean</code></dt><dd>Specifies <a href="#events-Events-MouseEvent-metaKey"><code>MouseEvent.metaKey</code></a>.<br /></dd>
-<dt><code class="parameter-name">buttonArg</code> of type <code>unsigned short</code></dt><dd>Specifies <a href="#events-Events-MouseEvent-button"><code>MouseEvent.button</code></a>.<br /></dd>
-<dt><code class="parameter-name">relatedTargetArg</code> of type <a href="#events-Events-EventTarget"><code>EventTarget</code></a></dt><dd>Specifies <a href="#events-Events-MouseEvent-relatedTarget"><code>MouseEvent.relatedTarget</code></a>. This value may be <code>null</code>.<br /></dd>
-</dl></div></div>
+ <div class="method">
+ <p>Initializes attributes of a <code>MouseEvent</code> object. This method has the same behavior as <a href="#events-event-type-initUIEvent"><code>UIEvent.initUIEvent()</code></a>.</p>
+ <div class="parameters">
+ <strong>Parameters</strong>
+ <div class="paramtable">
+ <dl>
+ <dt><code class="parameter-name">typeArg</code> of type <code>DOMString</code></dt>
+ <dd><p>Refer to the <a href="#events-event-type-initUIEvent"><code>UIEvent.initUIEvent()</code></a> method for a description of this parameter.</p></dd>
+
+ <dt><code class="parameter-name">canBubbleArg</code> of type <code>boolean</code></dt>
+ <dd><p>Refer to the <a href="#events-event-type-initUIEvent"><code>UIEvent.initUIEvent()</code></a> method for a description of this parameter.</p></dd>
+
+ <dt><code class="parameter-name">cancelableArg</code> of type <code>boolean</code></dt>
+ <dd><p>Refer to the <a href="#events-event-type-initUIEvent"><code>UIEvent.initUIEvent()</code></a> method for a description of this parameter.</p></dd>
+
+ <dt><code class="parameter-name">viewArg</code> of type <code>views::AbstractView</code></dt>
+ <dd><p>Refer to the <a href="#events-event-type-initUIEvent"><code>UIEvent.initUIEvent()</code></a> method for a description of this parameter.</p></dd>
+
+ <dt><code class="parameter-name">detailArg</code> of type <code>long</code></dt>
+ <dd><p>Refer to the <a href="#events-event-type-initUIEvent"><code>UIEvent.initUIEvent()</code></a> method for a description of this parameter.</p></dd>
+
+ <dt><code class="parameter-name">screenXArg</code> of type <code>long</code></dt>
+ <dd><p>Specifies <a href="#events-Events-MouseEvent-screenX"><code>MouseEvent.screenX</code></a>.</p></dd>
+
+ <dt><code class="parameter-name">screenYArg</code> of type <code>long</code></dt>
+ <dd><p>Specifies <a href="#events-Events-MouseEvent-screenY"><code>MouseEvent.screenY</code></a>.</p></dd>
+
+ <dt><code class="parameter-name">clientXArg</code> of type <code>long</code></dt>
+ <dd><p>Specifies <a href="#events-Events-MouseEvent-clientX"><code>MouseEvent.clientX</code></a>.</p></dd>
+
+ <dt><code class="parameter-name">clientYArg</code> of type <code>long</code></dt>
+ <dd><p>Specifies <a href="#events-Events-MouseEvent-clientY"><code>MouseEvent.clientY</code></a>.</p></dd>
+
+ <dt><code class="parameter-name">ctrlKeyArg</code> of type <code>boolean</code></dt>
+ <dd><p>Specifies <a href="#events-Events-MouseEvent-ctrlKey"><code>MouseEvent.ctrlKey</code></a>.</p></dd>
+
+ <dt><code class="parameter-name">altKeyArg</code> of type <code>boolean</code></dt>
+ <dd><p>Specifies <a href="#events-Events-MouseEvent-altKey"><code>MouseEvent.altKey</code></a>.</p></dd>
+
+ <dt><code class="parameter-name">shiftKeyArg</code> of type <code>boolean</code></dt>
+ <dd><p>Specifies <a href="#events-Events-MouseEvent-shiftKey"><code>MouseEvent.shiftKey</code></a>.</p></dd>
+
+ <dt><code class="parameter-name">metaKeyArg</code> of type <code>boolean</code></dt>
+ <dd><p>Specifies <a href="#events-Events-MouseEvent-metaKey"><code>MouseEvent.metaKey</code></a>.</p></dd>
+
+ <dt><code class="parameter-name">buttonArg</code> of type <code>unsigned short</code></dt>
+ <dd><p>Specifies <a href="#events-Events-MouseEvent-button"><code>MouseEvent.button</code></a>.</p></dd>
+
+ <dt><code class="parameter-name">relatedTargetArg</code> of type <a href="#events-Events-EventTarget"><code>EventTarget</code></a></dt>
+ <dd><p>Specifies <a href="#events-Events-MouseEvent-relatedTarget"><code>MouseEvent.relatedTarget</code></a>. This value may be <code>null</code>.</p></dd>
+ </dl>
+ </div>
+ </div>
<!-- parameters -->
<div><strong>No Return Value</strong></div>
@@ -2503,7 +2652,7 @@
</dl>
<p>The Mouse event types are listed below. In the case of nested elements, mouse event types are always targeted at the most deeply nested element. Ancestors of the targeted element may use bubbling to obtain notification of mouse events which occur within its descendent elements.</p>
<p id="events-dt-current-click-count">Implementations must maintain the <em>current click count</em> when generating mouse events. This shall be a non-negative integer indicating the number of consecutive clicks of a pointing device button during a user action. The notion of consecutive clicks depends on the environment configuration. For example, a <code><a class="eventtype" href="#event-type-dblclick"><code>dblclick</code></a></code> event type might not happen if there is a long delay between the two clicks.
- <span class="note"><strong>Note:</strong> The value of <a href="#events-Events-UIEvent-detail"><code>UIEvent.detail</code></a> for a number of clicks greater than 2 is platform-dependent. For example, on the Windows OS, the click-count series seems to be <code>1, 2, 3, 2, 3</code>, while on MacOS, the click-count series seems to be <code>1, 2, 3, 4, 5, ...</code>.</span></p>
+ <span class="note" id=""><strong>Note:</strong> The value of <a href="#events-Events-UIEvent-detail"><code>UIEvent.detail</code></a> for a number of clicks greater than 2 is platform-dependent. For example, on the Windows OS, the click-count series seems to be <code>1, 2, 3, 2, 3</code>, while on MacOS, the click-count series seems to be <code>1, 2, 3, 4, 5, ...</code>.</span></p>
<!-- click -->
<h4 class="needswork">
<a id="events-mouseevent-event-order" href="#events-mouseevent-event-order">5.2.3.2 Mouse Event Order</a>
@@ -2636,7 +2785,7 @@
<tr class="assert must"><th>Context info</th><td><a href="#events-Events-MouseEvent-screenX"><code>MouseEvent.screenX</code></a>, <a href="#events-Events-MouseEvent-screenY"><code>MouseEvent.screenY</code></a>, <a href="#events-Events-MouseEvent-clientX"><code>MouseEvent.clientX</code></a>, <a href="#events-Events-MouseEvent-clientY"><code>MouseEvent.clientY</code></a>, <a href="#events-Events-MouseEvent-altKey"><code>MouseEvent.altKey</code></a>, <a href="#events-Events-MouseEvent-ctrlKey"><code>MouseEvent.ctrlKey</code></a>, <a href="#events-Events-MouseEvent-shiftKey"><code>MouseEvent.shiftKey</code></a>, <a href="#events-Events-MouseEvent-metaKey"><code>MouseEvent.metaKey</code></a>, <a href="#events-Events-MouseEvent-button"><code>MouseEvent.button</code></a>, <a href="#events-Events-MouseEvent-buttons"><code>MouseEvent.buttons</code></a>, and <a href="#events-Events-UIEvent-view"><code>UIEvent.view</code></a> are in use. The <a href="#events-Events-UIEvent-detail"><code>UIEvent.detail</code></a> attribute indicates the <a href="#events-dt-current-click-count">current click count</a>.</td></tr>
</table>
<p>A <a class="def" href="#glossary-user-agent">user agent</a> must dispatch this event when a pointing device button is clicked twice over an element. The definition of a double click depends on the environment configuration, except that the event target must be the same between <a class="eventtype" href="#event-type-mousedown"><code>mousedown</code></a>, <a class="eventtype" href="#event-type-mouseup"><code>mouseup</code></a>, and <a class="eventtype" href="#event-type-dblclick"><code>dblclick</code></a>. This event type must be dispatched after the event type <a class="eventtype" href="#event-type-click"><code>click</code></a> if a click and double click occur simultaneously, and after the event type <a class="eventtype" href="#event-type-mouseup"><code>mouseup</code></a> otherwise.</p>
- <p class="note"><strong>Note:</strong> Canceling the <a class="eventtype" href="#event-type-click"><code>click</code></a> event must not not affect the firing of a <a class="eventtype" href="#event-type-dblclick"><code>dblclick</code></a> event.</p>
+ <p class="note" id=""><strong>Note:</strong> Canceling the <a class="eventtype" href="#event-type-click"><code>click</code></a> event must not not affect the firing of a <a class="eventtype" href="#event-type-dblclick"><code>dblclick</code></a> event.</p>
<p>As with the <a class="eventtype" href="#event-type-click"><code>click</code></a> event type, the <a class="def" href="#glossary-default-action">default action</a> of the <a class="eventtype" href="#event-type-dblclick"><code>dblclick</code></a> event type varies based on the <a class="def" href="#glossary-proximal-event-target">proximal event target</a> of the event and the value of the <a href="#events-Events-MouseEvent-button"><code>MouseEvent.button</code></a> or <a href="#events-Events-MouseEvent-buttons"><code>MouseEvent.buttons</code></a> attributes. Normally, the typical <a class="def" href="#glossary-default-action">default actions</a> of the <a class="eventtype" href="#event-type-dblclick"><code>dblclick</code></a> event type match those of the <a class="eventtype" href="#event-type-click"><code>click</code></a> event type, with the following additional behavior:</p>
<ul>
<li><em>Left click</em> (<a href="#events-Events-MouseEvent-button"><code>MouseEvent.button</code></a> value is <code>0</code>, <a href="#events-Events-MouseEvent-buttons"><code>MouseEvent.buttons</code></a> value is <code>1</code>):
@@ -2689,7 +2838,7 @@
<tr class="assert must"><th>Context info</th><td><a href="#events-Events-MouseEvent-screenX"><code>MouseEvent.screenX</code></a>, <a href="#events-Events-MouseEvent-screenY"><code>MouseEvent.screenY</code></a>, <a href="#events-Events-MouseEvent-clientX"><code>MouseEvent.clientX</code></a>, <a href="#events-Events-MouseEvent-clientY"><code>MouseEvent.clientY</code></a>, <a href="#events-Events-MouseEvent-altKey"><code>MouseEvent.altKey</code></a>, <a href="#events-Events-MouseEvent-ctrlKey"><code>MouseEvent.ctrlKey</code></a>, <a href="#events-Events-MouseEvent-shiftKey"><code>MouseEvent.shiftKey</code></a>, <a href="#events-Events-MouseEvent-metaKey"><code>MouseEvent.metaKey</code></a>, and <a href="#events-Events-UIEvent-view"><code>UIEvent.view</code></a> are in use. <a href="#events-Events-MouseEvent-relatedTarget"><code>MouseEvent.relatedTarget</code></a> indicates the <a class="def" href="#glossary-event-target">event target</a> a pointing device is exiting, if any.</td></tr>
</table>
<p>A <a class="def" href="#glossary-user-agent">user agent</a> must dispatch this event when a pointing device is moved onto the boundaries of an element or one of its descendent elements. This event type is similar to <a class="eventtype" href="#event-type-mouseover"><code>mouseover</code></a>, but differs in that it does not bubble, and must not be dispatched when the pointer device moves from an element onto the boundaries of one of its descendent elements.</p>
- <p class="note"><strong>Note:</strong> This is the event type equivalent of the CSS <a href="http://www.w3.org/TR/CSS2/selector.html#dynamic-pseudo-classes" title="Selectors"><code>:hover</code> pseudo-class</a><a href="#references-CSS2">[CSS2]</a>. See also the <a class="eventtype" href="#event-type-mouseleave"><code>mouseleave</code></a> event type.</p>
+ <p class="note" id=""><strong>Note:</strong> There are similarities between this event type and the CSS <a href="http://www.w3.org/TR/CSS2/selector.html#dynamic-pseudo-classes" title="Selectors"><code>:hover</code> pseudo-class</a><a href="#references-CSS2">[CSS2]</a>. See also the <a class="eventtype" href="#event-type-mouseleave"><code>mouseleave</code></a> event type.</p>
</dd>
</dl>
</div>
@@ -2712,7 +2861,7 @@
<tr class="assert must"><th>Context info</th><td><a href="#events-Events-MouseEvent-screenX"><code>MouseEvent.screenX</code></a>, <a href="#events-Events-MouseEvent-screenY"><code>MouseEvent.screenY</code></a>, <a href="#events-Events-MouseEvent-clientX"><code>MouseEvent.clientX</code></a>, <a href="#events-Events-MouseEvent-clientY"><code>MouseEvent.clientY</code></a>, <a href="#events-Events-MouseEvent-altKey"><code>MouseEvent.altKey</code></a>, <a href="#events-Events-MouseEvent-ctrlKey"><code>MouseEvent.ctrlKey</code></a>, <a href="#events-Events-MouseEvent-shiftKey"><code>MouseEvent.shiftKey</code></a>, <a href="#events-Events-MouseEvent-metaKey"><code>MouseEvent.metaKey</code></a>, and <a href="#events-Events-UIEvent-view"><code>UIEvent.view</code></a> are in use. <a href="#events-Events-MouseEvent-relatedTarget"><code>MouseEvent.relatedTarget</code></a> indicates the <a class="def" href="#glossary-event-target">event target</a> a pointing device is entering, if any.</td></tr>
</table>
<p>A <a class="def" href="#glossary-user-agent">user agent</a> must dispatch this event when a pointing device is moved off of the boundaries of an element and all of its descendent elements. This event type is similar to <a class="eventtype" href="#event-type-mouseout"><code>mouseout</code></a>, but differs in that does not bubble, and that it must not be dispatched until the pointing device has left the boundaries of the element and the boundaries of all of its children.</p>
- <p class="note"><strong>Note:</strong> This is the event type equivalent of the CSS <a href="http://www.w3.org/TR/CSS2/selector.html#dynamic-pseudo-classes" title="Selectors"><code>:hover</code> pseudo-class</a><a href="#references-CSS2">[CSS2]</a>. See also the <a class="eventtype" href="#event-type-mouseenter"><code>mouseenter</code></a> event type.</p>
+ <p class="note" id=""><strong>Note:</strong> There are similarities between this event type and the CSS <a href="http://www.w3.org/TR/CSS2/selector.html#dynamic-pseudo-classes" title="Selectors"><code>:hover</code> pseudo-class</a><a href="#references-CSS2">[CSS2]</a>. See also the <a class="eventtype" href="#event-type-mouseenter"><code>mouseenter</code></a> event type.</p>
</dd>
</dl>
</div>
@@ -2757,7 +2906,7 @@
<tr class="assert must"><th>Context info</th><td><a href="#events-Events-MouseEvent-screenX"><code>MouseEvent.screenX</code></a>, <a href="#events-Events-MouseEvent-screenY"><code>MouseEvent.screenY</code></a>, <a href="#events-Events-MouseEvent-clientX"><code>MouseEvent.clientX</code></a>, <a href="#events-Events-MouseEvent-clientY"><code>MouseEvent.clientY</code></a>, <a href="#events-Events-MouseEvent-altKey"><code>MouseEvent.altKey</code></a>, <a href="#events-Events-MouseEvent-ctrlKey"><code>MouseEvent.ctrlKey</code></a>, <a href="#events-Events-MouseEvent-shiftKey"><code>MouseEvent.shiftKey</code></a>, <a href="#events-Events-MouseEvent-metaKey"><code>MouseEvent.metaKey</code></a>, and <a href="#events-Events-UIEvent-view"><code>UIEvent.view</code></a> are in use. <a href="#events-Events-MouseEvent-relatedTarget"><code>MouseEvent.relatedTarget</code></a> indicates the <a class="def" href="#glossary-event-target">event target</a> a pointing device is entering, if any.</td></tr>
</table>
<p>A <a class="def" href="#glossary-user-agent">user agent</a> must dispatch this event when a pointing device is moved off of the boundaries of an element. This event type is similar to <a class="eventtype" href="#event-type-mouseleave"><code>mouseleave</code></a>, but differs in that does bubble, and that it must be dispatched when the pointer device moves from an element onto the boundaries of one of its descendent elements.</p>
- <p class="note"><strong>Note:</strong> See also the <a class="eventtype" href="#event-type-mouseover"><code>mouseover</code></a> event type.</p>
+ <p class="note" id=""><strong>Note:</strong> See also the <a class="eventtype" href="#event-type-mouseover"><code>mouseover</code></a> event type.</p>
</dd>
</dl>
</div>
@@ -2782,7 +2931,7 @@
</tbody>
</table>
<p>A <a class="def" href="#glossary-user-agent">user agent</a> must dispatch this event when a pointing device is moved onto the boundaries of an element. This event type is similar to <a class="eventtype" href="#event-type-mouseenter"><code>mouseenter</code></a>, but differs in that does bubble, and that it must be dispatched when the pointer device moves onto the boundaries of an element whose ancestor element is the <a class="def" href="#glossary-event-target">event target</a> for the same event listener instance.</p>
- <p class="note"><strong>Note:</strong> See also the <a class="eventtype" href="#event-type-mouseout"><code>mouseout</code></a> event type.</p>
+ <p class="note" id=""><strong>Note:</strong> See also the <a class="eventtype" href="#event-type-mouseout"><code>mouseout</code></a> event type.</p>
</dd>
</dl>
</div>
@@ -2827,40 +2976,37 @@
<strong>IDL Definition</strong>
</dt>
<dd>
- <div class="idl-code">
- <pre>
+ <pre class="idl" id="idl-interface-"><code>
// Introduced in DOM Level 3:
interface <a href="#events-Events-WheelEvent">WheelEvent</a> : <a href="#events-Events-MouseEvent">MouseEvent</a> {
// DeltaModeCode
- const unsigned long <a href="#events-DOM_DELTA_PIXEL">DOM_DELTA_PIXEL</a> = 0x00;
- const unsigned long <a href="#events-DOM_DELTA_LINE">DOM_DELTA_LINE</a> = 0x01;
- const unsigned long <a href="#events-DOM_DELTA_PAGE">DOM_DELTA_PAGE</a> = 0x02;
+ const unsigned long <a href="#events-DOM_DELTA_PIXEL">DOM_DELTA_PIXEL</a> = 0x00;
+ const unsigned long <a href="#events-DOM_DELTA_LINE">DOM_DELTA_LINE</a> = 0x01;
+ const unsigned long <a href="#events-DOM_DELTA_PAGE">DOM_DELTA_PAGE</a> = 0x02;
readonly attribute long <a href="#events-Events-WheelEvent-deltaX">deltaX</a>;
readonly attribute long <a href="#events-Events-WheelEvent-deltaY">deltaY</a>;
readonly attribute long <a href="#events-Events-WheelEvent-deltaZ">deltaZ</a>;
readonly attribute unsigned long <a href="#events-Events-WheelEvent-deltaMode">deltaMode</a>;
- void <a href="#events-event-type-initWheelEvent">initWheelEvent</a>(in DOMString typeArg,
- in boolean canBubbleArg,
- in boolean cancelableArg,
- in views::AbstractView viewArg,
- in long detailArg,
- in long screenXArg,
- in long screenYArg,
- in long clientXArg,
- in long clientYArg,
- in unsigned short buttonArg,
- in <a href="#events-Events-EventTarget">EventTarget</a> relatedTargetArg,
- in DOMString modifiersListArg,
- in long deltaXArg,
- in long deltaYArg,
- in long deltaZArg,
- in unsigned long deltaMode);
+ void <a href="#events-event-type-initWheelEvent">initWheelEvent</a>(in DOMString typeArg,
+ in boolean canBubbleArg,
+ in boolean cancelableArg,
+ in views::AbstractView viewArg,
+ in long detailArg,
+ in long screenXArg,
+ in long screenYArg,
+ in long clientXArg,
+ in long clientYArg,
+ in unsigned short buttonArg,
+ in <a href="#events-Events-EventTarget">EventTarget</a> relatedTargetArg,
+ in DOMString modifiersListArg,
+ in long deltaXArg,
+ in long deltaYArg,
+ in long deltaZArg,
+ in unsigned long deltaMode);
};
- </pre>
- </div>
- <br />
+ </code></pre>
</dd>
<dt>
@@ -2890,13 +3036,13 @@
<dd>
<dl>
<dt><code class="attribute-name"><a id="events-Events-WheelEvent-deltaX">deltaX</a></code> of type <code>long</code>, readonly</dt>
- <dd>The distance the wheel has rotated around the x-axis.<br /></dd>
+ <dd><p>The distance the wheel has rotated around the x-axis.</p></dd>
<dt><code class="attribute-name"><a id="events-Events-WheelEvent-deltaY">deltaY</a></code> of type <code>long</code>, readonly</dt>
- <dd>The distance the wheel has rotated around the y-axis.<br /></dd>
+ <dd><p>The distance the wheel has rotated around the y-axis.</p></dd>
<dt><code class="attribute-name"><a id="events-Events-WheelEvent-deltaZ">deltaZ</a></code> of type <code>long</code>, readonly</dt>
- <dd>The distance the wheel has rotated around the z-axis.<br /></dd>
+ <dd><p>The distance the wheel has rotated around the z-axis.</p></dd>
<dt><code class="attribute-name"><a id="events-Events-WheelEvent-deltaMode">deltaMode</a></code> of type <code>unsigned long</code>, readonly</dt>
<dd>
@@ -2911,24 +3057,62 @@
<dl>
<dt><code class="method-name"><a id="events-event-type-initWheelEvent">initWheelEvent</a></code> introduced in <strong class="since">DOM Level 3</strong></dt>
<dd>
- <div class="method">Initializes attributes of a <code>WheelEvent</code> object. This method has the same behavior as <a href="#events-event-type-initMouseEvent"><code>MouseEvent.initMouseEvent()</code></a>.
- <div class="parameters"><strong>Parameters</strong><div class="paramtable"><dl><dt><code class="parameter-name">typeArg</code> of type <code>DOMString</code></dt><dd>Refer to the <a href="#events-event-type-initUIEvent"><code>UIEvent.initUIEvent()</code></a> method for a description of this parameter.<br /></dd>
-<dt><code class="parameter-name">canBubbleArg</code> of type <code>boolean</code></dt><dd>Refer to the <a href="#events-event-type-initUIEvent"><code>UIEvent.initUIEvent()</code></a> method for a description of this parameter.<br /></dd>
-<dt><code class="parameter-name">cancelableArg</code> of type <code>boolean</code></dt><dd>Refer to the <a href="#events-event-type-initUIEvent"><code>UIEvent.initUIEvent()</code></a> method for a description of this parameter.<br /></dd>
-<dt><code class="parameter-name">viewArg</code> of type <code>views::AbstractView</code></dt><dd>Refer to the <a href="#events-event-type-initUIEvent"><code>UIEvent.initUIEvent()</code></a> method for a description of this parameter.<br /></dd>
-<dt><code class="parameter-name">detailArg</code> of type <code>long</code></dt><dd>Refer to the <a href="#events-event-type-initUIEvent"><code>UIEvent.initUIEvent()</code></a> method for a description of this parameter.<br /></dd>
-<dt><code class="parameter-name">screenXArg</code> of type <code>long</code></dt><dd>Refer to the <a href="#events-event-type-initMouseEvent"><code>MouseEvent.initMouseEvent()</code></a> method for a description of this parameter.<br /></dd>
-<dt><code class="parameter-name">screenYArg</code> of type <code>long</code></dt><dd>Refer to the <a href="#events-event-type-initMouseEvent"><code>MouseEvent.initMouseEvent()</code></a> method for a description of this parameter.<br /></dd>
-<dt><code class="parameter-name">clientXArg</code> of type <code>long</code></dt><dd>Refer to the <a href="#events-event-type-initMouseEvent"><code>MouseEvent.initMouseEvent()</code></a> method for a description of this parameter.<br /></dd>
-<dt><code class="parameter-name">clientYArg</code> of type <code>long</code></dt><dd>Refer to the <a href="#events-event-type-initMouseEvent"><code>MouseEvent.initMouseEvent()</code></a> method for a description of this parameter.<br /></dd>
-<dt><code class="parameter-name">buttonArg</code> of type <code>unsigned short</code></dt><dd>Refer to the <a href="#events-event-type-initMouseEvent"><code>MouseEvent.initMouseEvent()</code></a> method for a description of this parameter.<br /></dd>
-<dt><code class="parameter-name">relatedTargetArg</code> of type <a href="#events-Events-EventTarget"><code>EventTarget</code></a></dt><dd>Refer to the <a href="#events-event-type-initMouseEvent"><code>MouseEvent.initMouseEvent()</code></a> method for a description of this parameter.<br /></dd>
-<dt><code class="parameter-name">modifiersListArg</code> of type <code>DOMString</code></dt><dd>Refer to the <a href="#events-event-type-initMouseEvent"><code>MouseEvent.initMouseEvent()</code></a> method for a description of this parameter.<br /></dd>
-<dt><code class="parameter-name">deltaXArg</code> of type <code>long</code></dt><dd>Specifies <a href="#events-Events-WheelEvent-deltaX"><code>WheelEvent.deltaX</code></a>.<br /></dd>
-<dt><code class="parameter-name">deltaYArg</code> of type <code>long</code></dt><dd>Specifies <a href="#events-Events-WheelEvent-deltaY"><code>WheelEvent.deltaY</code></a>.<br /></dd>
-<dt><code class="parameter-name">deltaZArg</code> of type <code>long</code></dt><dd>Specifies <a href="#events-Events-WheelEvent-deltaZ"><code>WheelEvent.deltaZ</code></a>.<br /></dd>
-<dt><code class="parameter-name">deltaModeArg</code> of type <code>unsigned long</code></dt><dd>Specifies <a href="#events-Events-WheelEvent-deltaMode"><code>WheelEvent.deltaMode</code></a>.<br /></dd>
-</dl></div></div>
+ <div class="method">
+ <p>Initializes attributes of a <code>WheelEvent</code> object. This method has the same behavior as <a href="#events-event-type-initMouseEvent"><code>MouseEvent.initMouseEvent()</code></a>.</p>
+ <div class="parameters">
+ <strong>Parameters</strong>
+ <div class="paramtable">
+ <dl>
+ <dt><code class="parameter-name">typeArg</code> of type <code>DOMString</code></dt>
+ <dd><p>Refer to the <a href="#events-event-type-initUIEvent"><code>UIEvent.initUIEvent()</code></a> method for a description of this parameter.</p></dd>
+
+ <dt><code class="parameter-name">canBubbleArg</code> of type <code>boolean</code></dt>
+ <dd><p>Refer to the <a href="#events-event-type-initUIEvent"><code>UIEvent.initUIEvent()</code></a> method for a description of this parameter.</p></dd>
+
+ <dt><code class="parameter-name">cancelableArg</code> of type <code>boolean</code></dt>
+ <dd><p>Refer to the <a href="#events-event-type-initUIEvent"><code>UIEvent.initUIEvent()</code></a> method for a description of this parameter.</p></dd>
+
+ <dt><code class="parameter-name">viewArg</code> of type <code>views::AbstractView</code></dt>
+ <dd><p>Refer to the <a href="#events-event-type-initUIEvent"><code>UIEvent.initUIEvent()</code></a> method for a description of this parameter.</p></dd>
+
+ <dt><code class="parameter-name">detailArg</code> of type <code>long</code></dt>
+ <dd><p>Refer to the <a href="#events-event-type-initUIEvent"><code>UIEvent.initUIEvent()</code></a> method for a description of this parameter.</p></dd>
+
+ <dt><code class="parameter-name">screenXArg</code> of type <code>long</code></dt>
+ <dd><p>Refer to the <a href="#events-event-type-initMouseEvent"><code>MouseEvent.initMouseEvent()</code></a> method for a description of this parameter.</p></dd>
+
+ <dt><code class="parameter-name">screenYArg</code> of type <code>long</code></dt>
+ <dd><p>Refer to the <a href="#events-event-type-initMouseEvent"><code>MouseEvent.initMouseEvent()</code></a> method for a description of this parameter.</p></dd>
+
+ <dt><code class="parameter-name">clientXArg</code> of type <code>long</code></dt>
+ <dd><p>Refer to the <a href="#events-event-type-initMouseEvent"><code>MouseEvent.initMouseEvent()</code></a> method for a description of this parameter.</p></dd>
+
+ <dt><code class="parameter-name">clientYArg</code> of type <code>long</code></dt>
+ <dd><p>Refer to the <a href="#events-event-type-initMouseEvent"><code>MouseEvent.initMouseEvent()</code></a> method for a description of this parameter.</p></dd>
+
+ <dt><code class="parameter-name">buttonArg</code> of type <code>unsigned short</code></dt>
+ <dd><p>Refer to the <a href="#events-event-type-initMouseEvent"><code>MouseEvent.initMouseEvent()</code></a> method for a description of this parameter.</p></dd>
+
+ <dt><code class="parameter-name">relatedTargetArg</code> of type <a href="#events-Events-EventTarget"><code>EventTarget</code></a></dt>
+ <dd><p>Refer to the <a href="#events-event-type-initMouseEvent"><code>MouseEvent.initMouseEvent()</code></a> method for a description of this parameter.</p></dd>
+
+ <dt><code class="parameter-name">modifiersListArg</code> of type <code>DOMString</code></dt>
+ <dd><p>Refer to the <a href="#events-event-type-initMouseEvent"><code>MouseEvent.initMouseEvent()</code></a> method for a description of this parameter.</p></dd>
+
+ <dt><code class="parameter-name">deltaXArg</code> of type <code>long</code></dt>
+ <dd><p>Specifies <a href="#events-Events-WheelEvent-deltaX"><code>WheelEvent.deltaX</code></a>.</p></dd>
+
+ <dt><code class="parameter-name">deltaYArg</code> of type <code>long</code></dt>
+ <dd><p>Specifies <a href="#events-Events-WheelEvent-deltaY"><code>WheelEvent.deltaY</code></a>.</p></dd>
+
+ <dt><code class="parameter-name">deltaZArg</code> of type <code>long</code></dt>
+ <dd><p>Specifies <a href="#events-Events-WheelEvent-deltaZ"><code>WheelEvent.deltaZ</code></a>.</p></dd>
+
+ <dt><code class="parameter-name">deltaModeArg</code> of type <code>unsigned long</code></dt>
+ <dd><p>Specifies <a href="#events-Events-WheelEvent-deltaMode"><code>WheelEvent.deltaMode</code></a>.</p></dd>
+ </dl>
+ </div>
+ </div>
<!-- parameters -->
<div><strong>No Return Value</strong></div>
@@ -2952,7 +3136,8 @@
<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>wheel</code></strong></td></tr>
<tr class="assert must"><th>Interface</th><td><a href="#events-Events-WheelEvent"><code>WheelEvent</code></a></td></tr>
- <tr class="assert must"><th>Sync / Async</th><td>Sync</td></tr>
+ <tr class="assert must"><th>Sync / Async</th><td>Async <i class="issue" id="issue-wheel-async"><strong>Issue:</strong> sync/async? See [<a href="http://lists.w3.org/Archives/Public/www-dom/2010JanMar/0010.html">Comments from Olli Pettay</a>]</i>
+ </td></tr>
<tr class="assert must"><th>Bubbles</th><td>Yes</td></tr>
<tr class="assert must"><th>Target</th><td><a class="def" href="#glossary-defaultView"><code>defaultView</code></a>, <code>Document</code>, <code>Element</code></td></tr>
<tr class="assert must"><th>Cancelable</th><td>Yes</td></tr>
@@ -3014,35 +3199,32 @@
<strong>IDL Definition</strong>
</dt>
<dd>
- <div class="idl-code">
- <pre>
+ <pre class="idl" id="idl-interface-"><code>
// Introduced in DOM Level 3:
interface <a href="#events-Events-TextEvent">TextEvent</a> : <a href="#events-Events-UIEvent">UIEvent</a> {
// InputModeCode
- const unsigned long <a href="#events-DOM_INPUT_METHOD_UNKNOWN">DOM_INPUT_METHOD_UNKNOWN</a> = 0x00;
- const unsigned long <a href="#events-DOM_INPUT_METHOD_KEYBOARD">DOM_INPUT_METHOD_KEYBOARD</a> = 0x01;
- const unsigned long <a href="#events-DOM_INPUT_METHOD_PASTE">DOM_INPUT_METHOD_PASTE</a> = 0x02;
- const unsigned long <a href="#events-DOM_INPUT_METHOD_DROP">DOM_INPUT_METHOD_DROP</a> = 0x03;
- const unsigned long <a href="#events-DOM_INPUT_METHOD_IME">DOM_INPUT_METHOD_IME</a> = 0x04;
- const unsigned long <a href="#events-DOM_INPUT_METHOD_OPTION">DOM_INPUT_METHOD_OPTION</a> = 0x05;
- const unsigned long <a href="#events-DOM_INPUT_METHOD_HANDWRITING">DOM_INPUT_METHOD_HANDWRITING</a> = 0x06;
- const unsigned long <a href="#events-DOM_INPUT_METHOD_VOICE">DOM_INPUT_METHOD_VOICE</a> = 0x07;
- const unsigned long <a href="#events-DOM_INPUT_METHOD_MULTIMODAL">DOM_INPUT_METHOD_MULTIMODAL</a> = 0x08;
- const unsigned long <a href="#events-DOM_INPUT_METHOD_SCRIPT">DOM_INPUT_METHOD_SCRIPT</a> = 0x09;
+ const unsigned long <a href="#events-DOM_INPUT_METHOD_UNKNOWN">DOM_INPUT_METHOD_UNKNOWN</a> = 0x00;
+ const unsigned long <a href="#events-DOM_INPUT_METHOD_KEYBOARD">DOM_INPUT_METHOD_KEYBOARD</a> = 0x01;
+ const unsigned long <a href="#events-DOM_INPUT_METHOD_PASTE">DOM_INPUT_METHOD_PASTE</a> = 0x02;
+ const unsigned long <a href="#events-DOM_INPUT_METHOD_DROP">DOM_INPUT_METHOD_DROP</a> = 0x03;
+ const unsigned long <a href="#events-DOM_INPUT_METHOD_IME">DOM_INPUT_METHOD_IME</a> = 0x04;
+ const unsigned long <a href="#events-DOM_INPUT_METHOD_OPTION">DOM_INPUT_METHOD_OPTION</a> = 0x05;
+ const unsigned long <a href="#events-DOM_INPUT_METHOD_HANDWRITING">DOM_INPUT_METHOD_HANDWRITING</a> = 0x06;
+ const unsigned long <a href="#events-DOM_INPUT_METHOD_VOICE">DOM_INPUT_METHOD_VOICE</a> = 0x07;
+ const unsigned long <a href="#events-DOM_INPUT_METHOD_MULTIMODAL">DOM_INPUT_METHOD_MULTIMODAL</a> = 0x08;
+ const unsigned long <a href="#events-DOM_INPUT_METHOD_SCRIPT">DOM_INPUT_METHOD_SCRIPT</a> = 0x09;
readonly attribute DOMString <a href="#events-Events-TextEvent-data">data</a>;
readonly attribute unsigned long <a href="#events-Events-TextEvent-inputMode">inputMode</a>;
- void <a href="#events-event-type-initTextEvent">initTextEvent</a>(in DOMString typeArg,
- in boolean canBubbleArg,
- in boolean cancelableArg,
- in views::AbstractView viewArg,
- in DOMString dataArg,
- in unsigned long inputMode);
+ void <a href="#events-event-type-initTextEvent">initTextEvent</a>(in DOMString typeArg,
+ in boolean canBubbleArg,
+ in boolean cancelableArg,
+ in views::AbstractView viewArg,
+ in DOMString dataArg,
+ in unsigned long inputMode);
};
- </pre>
- </div>
- <br />
+ </code></pre>
</dd>
<dt>
@@ -3093,10 +3275,10 @@
<dd>
<dl>
<dt><code class="attribute-name"><a id="events-Events-TextEvent-data">data</a></code> of type <code>DOMString</code>, readonly</dt>
- <dd><code>data</code> holds the value of the characters generated by the character device. This may be a single Unicode character or a non-empty sequence of Unicode characters [<cite><a class="normative" href="#references-Unicode">Unicode</a></cite>]. Characters should be normalized as defined by the Unicode normalization form <em>NFC</em>, defined in [<cite><a class="normative" href="#references-UnicodeNormalization">UAX #15</a></cite>]. This attribute cannot be null or contain the empty string.<br /></dd>
+ <dd><p><code>data</code> holds the value of the characters generated by the character device. This may be a single Unicode character or a non-empty sequence of Unicode characters [<cite><a class="normative" href="#references-Unicode">Unicode</a></cite>]. Characters should be normalized as defined by the Unicode normalization form <em>NFC</em>, defined in [<cite><a class="normative" href="#references-UnicodeNormalization">UAX #15</a></cite>]. This attribute cannot be null or contain the empty string.</p></dd>
<dt><code class="attribute-name"><a id="events-Events-TextEvent-inputMode">inputMode</a></code> of type <code>unsigned long</code>, readonly</dt>
- <dd>The <code>inputMode</code> attribute contains an indication of the origin of the text input, as described in <a href="#events-ID-TextEvent-InputModeCode">InputModeCode</a>.<br /></dd>
+ <dd><p>The <code>inputMode</code> attribute contains an indication of the origin of the text input, as described in <a href="#events-ID-TextEvent-InputModeCode">InputModeCode</a>.</p></dd>
</dl>
</dd>
@@ -3110,14 +3292,32 @@
</code>
</dt>
<dd>
- <div class="method">Initializes attributes of a <code>TextEvent</code> object. This method has the same behavior as <a href="#events-event-type-initUIEvent"><code>UIEvent.initUIEvent()</code></a>. The value of <a href="#events-Events-UIEvent-detail"><code>UIEvent.detail</code></a> remains undefined.
-<div class="parameters"><strong>Parameters</strong><div class="paramtable"><dl><dt><code class="parameter-name">typeArg</code> of type <code>DOMString</code></dt><dd>Refer to the <a href="#events-event-type-initUIEvent"><code>UIEvent.initUIEvent()</code></a> method for a description of this parameter.<br /></dd>
-<dt><code class="parameter-name">canBubbleArg</code> of type <code>boolean</code></dt><dd>Refer to the <a href="#events-event-type-initUIEvent"><code>UIEvent.initUIEvent()</code></a> method for a description of this parameter.<br /></dd>
-<dt><code class="parameter-name">cancelableArg</code> of type <code>boolean</code></dt><dd>Refer to the <a href="#events-event-type-initUIEvent"><code>UIEvent.initUIEvent()</code></a> method for a description of this parameter.<br /></dd>
-<dt><code class="parameter-name">viewArg</code> of type <code>views::AbstractView</code></dt><dd>Refer to the <a href="#events-event-type-initUIEvent"><code>UIEvent.initUIEvent()</code></a> method for a description of this parameter.<br /></dd>
-<dt><code class="parameter-name">dataArg</code> of type <code>DOMString</code></dt><dd>Specifies <a href="#events-Events-TextEvent-data"><code>TextEvent.data</code></a>.<br /></dd>
-<dt><code class="parameter-name">inputModeArg</code> of type <code>unsigned long</code></dt><dd>Specifies <a href="#events-Events-TextEvent-inputMode"><code>TextEvent.inputMode</code></a>.<br /></dd>
-</dl></div></div>
+ <div class="method">
+ <p>Initializes attributes of a <code>TextEvent</code> object. This method has the same behavior as <a href="#events-event-type-initUIEvent"><code>UIEvent.initUIEvent()</code></a>. The value of <a href="#events-Events-UIEvent-detail"><code>UIEvent.detail</code></a> remains undefined.</p>
+ <div class="parameters">
+ <strong>Parameters</strong>
+ <div class="paramtable">
+ <dl>
+ <dt><code class="parameter-name">typeArg</code> of type <code>DOMString</code></dt>
+ <dd><p>Refer to the <a href="#events-event-type-initUIEvent"><code>UIEvent.initUIEvent()</code></a> method for a description of this parameter.</p></dd>
+
+ <dt><code class="parameter-name">canBubbleArg</code> of type <code>boolean</code></dt>
+ <dd><p>Refer to the <a href="#events-event-type-initUIEvent"><code>UIEvent.initUIEvent()</code></a> method for a description of this parameter.</p></dd>
+
+ <dt><code class="parameter-name">cancelableArg</code> of type <code>boolean</code></dt>
+ <dd><p>Refer to the <a href="#events-event-type-initUIEvent"><code>UIEvent.initUIEvent()</code></a> method for a description of this parameter.</p></dd>
+
+ <dt><code class="parameter-name">viewArg</code> of type <code>views::AbstractView</code></dt>
+ <dd><p>Refer to the <a href="#events-event-type-initUIEvent"><code>UIEvent.initUIEvent()</code></a> method for a description of this parameter.</p></dd>
+
+ <dt><code class="parameter-name">dataArg</code> of type <code>DOMString</code></dt>
+ <dd><p>Specifies <a href="#events-Events-TextEvent-data"><code>TextEvent.data</code></a>.</p></dd>
+
+ <dt><code class="parameter-name">inputModeArg</code> of type <code>unsigned long</code></dt>
+ <dd><p>Specifies <a href="#events-Events-TextEvent-inputMode"><code>TextEvent.inputMode</code></a>.</p></dd>
+ </dl>
+ </div>
+ </div>
<!-- parameters -->
<div><strong>No Return Value</strong></div>
@@ -3172,18 +3372,17 @@
<strong>IDL Definition</strong>
</dt>
<dd>
- <div class="idl-code">
- <pre>
+ <pre class="idl" id="idl-interface-"><code>
// Introduced in DOM Level 3:
interface <a href="#events-Events-KeyboardEvent">KeyboardEvent</a> : <a href="#events-Events-UIEvent">UIEvent</a> {
// KeyLocationCode
- const unsigned long <a href="#events-DOM_KEY_LOCATION_STANDARD">DOM_KEY_LOCATION_STANDARD</a> = 0x00;
- const unsigned long <a href="#events-DOM_KEY_LOCATION_LEFT">DOM_KEY_LOCATION_LEFT</a> = 0x01;
- const unsigned long <a href="#events-DOM_KEY_LOCATION_RIGHT">DOM_KEY_LOCATION_RIGHT</a> = 0x02;
- const unsigned long <a href="#events-DOM_KEY_LOCATION_NUMPAD">DOM_KEY_LOCATION_NUMPAD</a> = 0x03;
- const unsigned long <a href="#events-DOM_KEY_LOCATION_MOBILE">DOM_KEY_LOCATION_MOBILE</a> = 0x04;
- const unsigned long <a href="#events-DOM_KEY_LOCATION_JOYSTICK">DOM_KEY_LOCATION_JOYSTICK</a> = 0x05;
+ const unsigned long <a href="#events-DOM_KEY_LOCATION_STANDARD">DOM_KEY_LOCATION_STANDARD</a> = 0x00;
+ const unsigned long <a href="#events-DOM_KEY_LOCATION_LEFT">DOM_KEY_LOCATION_LEFT</a> = 0x01;
+ const unsigned long <a href="#events-DOM_KEY_LOCATION_RIGHT">DOM_KEY_LOCATION_RIGHT</a> = 0x02;
+ const unsigned long <a href="#events-DOM_KEY_LOCATION_NUMPAD">DOM_KEY_LOCATION_NUMPAD</a> = 0x03;
+ const unsigned long <a href="#events-DOM_KEY_LOCATION_MOBILE">DOM_KEY_LOCATION_MOBILE</a> = 0x04;
+ const unsigned long <a href="#events-DOM_KEY_LOCATION_JOYSTICK">DOM_KEY_LOCATION_JOYSTICK</a> = 0x05;
readonly attribute DOMString <a href="#events-Events-KeyboardEvent-key">key</a>;
readonly attribute unsigned long <a href="#events-Events-KeyboardEvent-location">location</a>;
@@ -3192,19 +3391,17 @@
readonly attribute boolean <a href="#events-Events-KeyboardEvent-altKey">altKey</a>;
readonly attribute boolean <a href="#events-Events-KeyboardEvent-metaKey">metaKey</a>;
readonly attribute boolean <a href="#events-Events-KeyboardEvent-repeat">repeat</a>;
- boolean <a href="#events-Events-KeyboardEvent-getModifierState">getModifierState</a>(in DOMString keyArg);
- void <a href="#events-Events-KeyboardEvent-initKeyboardEvent">initKeyboardEvent</a>(in DOMString typeArg,
- in boolean canBubbleArg,
- in boolean cancelableArg,
- in views::AbstractView viewArg,
- in DOMString keyArg,
- in unsigned long locationArg,
- in DOMString modifiersListArg,
- in boolean repeat);
+ boolean <a href="#events-Events-KeyboardEvent-getModifierState">getModifierState</a>(in DOMString keyArg);
+ void <a href="#events-Events-KeyboardEvent-initKeyboardEvent">initKeyboardEvent</a>(in DOMString typeArg,
+ in boolean canBubbleArg,
+ in boolean cancelableArg,
+ in views::AbstractView viewArg,
+ in DOMString keyArg,
+ in unsigned long locationArg,
+ in DOMString modifiersListArg,
+ in boolean repeat);
};
- </pre>
- </div>
- <br />
+ </code></pre>
</dd>
<dt>
@@ -3217,22 +3414,22 @@
<dd>
<dl>
<dt><a id="events-DOM_KEY_LOCATION_LEFT"><code class="constant-name">DOM_KEY_LOCATION_LEFT</code></a></dt>
- <dd>The key activated shall be in the left key location (there is more than one possible location for this key). <i class="example"><strong>Example:</strong> the left <code class="value">'Control'</code> key on a PC 101 Key US keyboard.</i></dd>
+ <dd>The key activated shall be in the left key location (there is more than one possible location for this key). <i class="example" id=""><strong>Example:</strong> the left <code class="value">'Control'</code> key on a PC 101 Key US keyboard.</i></dd>
<dt><a id="events-DOM_KEY_LOCATION_NUMPAD"><code class="constant-name">DOM_KEY_LOCATION_NUMPAD</code></a></dt>
- <dd>The key activation originated on the numeric keypad or with a virtual key corresponding to the numeric keypad. <i class="example"><strong>Example:</strong> the <code class="value">'1'</code> key on a PC 101 Key US keyboard located on the numeric pad.</i></dd>
+ <dd>The key activation originated on the numeric keypad or with a virtual key corresponding to the numeric keypad. <i class="example" id=""><strong>Example:</strong> the <code class="value">'1'</code> key on a PC 101 Key US keyboard located on the numeric pad.</i></dd>
<dt><a id="events-DOM_KEY_LOCATION_RIGHT"><code class="constant-name">DOM_KEY_LOCATION_RIGHT</code></a></dt>
- <dd>The key activation shall be in the right key location (there is more than one possible location for this key). <i class="example"><strong>Example:</strong> the right <code class="value">'Shift'</code> key on a PC 101 Key US keyboard.</i></dd>
+ <dd>The key activation shall be in the right key location (there is more than one possible location for this key). <i class="example" id=""><strong>Example:</strong> the right <code class="value">'Shift'</code> key on a PC 101 Key US keyboard.</i></dd>
<dt><a id="events-DOM_KEY_LOCATION_STANDARD"><code class="constant-name">DOM_KEY_LOCATION_STANDARD</code></a></dt>
- <dd>The key activation shall not be distinguished as the left or right version of the key, and did not originate from the numeric keypad (or did not originate with a virtual key corresponding to the numeric keypad). <i class="example"><strong>Example:</strong> the <code class="value">'Q'</code> key on a PC 101 Key US keyboard.</i></dd>
+ <dd>The key activation shall not be distinguished as the left or right version of the key, and did not originate from the numeric keypad (or did not originate with a virtual key corresponding to the numeric keypad). <i class="example" id=""><strong>Example:</strong> the <code class="value">'Q'</code> key on a PC 101 Key US keyboard.</i></dd>
<dt><a id="events-DOM_KEY_LOCATION_MOBILE"><code class="constant-name">DOM_KEY_LOCATION_MOBILE</code></a></dt>
- <dd>The key activation originated on a mobile device, either on a physical keypad or a virtual keyboard. <i class="example"><strong>Example:</strong> the <code class="value">'#'</code> key or softkey on a mobile device.</i></dd>
+ <dd>The key activation originated on a mobile device, either on a physical keypad or a virtual keyboard. <i class="example" id=""><strong>Example:</strong> the <code class="value">'#'</code> key or softkey on a mobile device.</i></dd>
<dt><a id="events-DOM_KEY_LOCATION_JOYSTICK"><code class="constant-name">DOM_KEY_LOCATION_JOYSTICK</code></a></dt>
- <dd>The key activation originated on a game controller or a joystick on a mobile device. <i class="example"><strong>Example:</strong> the <code class="value">'DownLeft'</code> key on a game controller.</i></dd>
+ <dd>The key activation originated on a game controller or a joystick on a mobile device. <i class="example" id=""><strong>Example:</strong> the <code class="value">'DownLeft'</code> key on a game controller.</i></dd>
</dl>
</dd>
@@ -3244,23 +3441,23 @@
<dl>
<dt><code class="attribute-name"><a id="events-Events-KeyboardEvent-altKey">altKey</a></code> of type <code>boolean</code>, readonly</dt>
<dd><code>true</code> if the alternative (Alt) key modifier is activated.
- <p class="note"><strong>Note:</strong> The Option key modifier on Macintosh systems must be represented using this key modifier.</p></dd>
+ <p class="note" id=""><strong>Note:</strong> The Option key modifier on Macintosh systems must be represented using this key modifier.</p></dd>
<dt><code class="attribute-name"><a id="events-Events-KeyboardEvent-ctrlKey">ctrlKey</a></code> of type <code>boolean</code>, readonly</dt>
- <dd><code>true</code> if the control (Ctrl) key modifier is activated.<br /></dd>
+ <dd><p><code>true</code> if the control (Ctrl) key modifier is activated.</p></dd>
<dt><code class="attribute-name"><a id="events-Events-KeyboardEvent-key">key</a></code> of type <code>DOMString</code>, readonly</dt>
- <dd><code>key</code> holds the key value of the key pressed. The key values are defined in <a href="#keyset-keyvalues">Key values set</a>. Implementations that are unable to identify a key must use the key value <code class="value">'Unidentified'</code>.<br /></dd>
+ <dd><p><code>key</code> holds the key value of the key pressed. The key values are defined in <a href="#keyset-keyvalues">Key values set</a>. Implementations that are unable to identify a key must use the key value <code class="value">'Unidentified'</code>.</p></dd>
<dt><code class="attribute-name"><a id="events-Events-KeyboardEvent-location">location</a></code> of type <code>unsigned long</code>, readonly</dt>
- <dd>The <code>location</code> attribute contains an indication of the location of the key on the device, as described in <a href="#events-ID-KeyboardEvent-KeyLocationCode">Keyboard event types</a>.<br /></dd>
+ <dd><p>The <code>location</code> attribute contains an indication of the location of the key on the device, as described in <a href="#events-ID-KeyboardEvent-KeyLocationCode">Keyboard event types</a>.</p></dd>
<dt><code class="attribute-name"><a id="events-Events-KeyboardEvent-metaKey">metaKey</a></code> of type <code>boolean</code>, readonly</dt>
<dd><code>true</code> if the meta (Meta) key modifier is activated.
- <p class="note"><strong>Note:</strong> The Command key modifier on Macintosh systems must be represented using this key modifier.</p></dd>
+ <p class="note" id=""><strong>Note:</strong> The Command key modifier on Macintosh systems must be represented using this key modifier.</p></dd>
<dt><code class="attribute-name"><a id="events-Events-KeyboardEvent-shiftKey">shiftKey</a></code> of type <code>boolean</code>, readonly</dt>
- <dd><code>true</code> if the shift (Shift) key modifier is activated.<br /></dd>
+ <dd><p><code>true</code> if the shift (Shift) key modifier is activated.</p></dd>
<dt><code class="attribute-name"><a id="events-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-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>
@@ -3279,8 +3476,13 @@
<dd>
<div class="method">
Queries the state of a modifier using a key value. See also <a href="#keyset-Modifiers">Modifier keys</a>.
- <div class="parameters"><strong>Parameters</strong><div class="paramtable"><dl><dt><code class="parameter-name">keyArg</code> of type <code>DOMString</code></dt><dd>
- A modifier key value. Modifier keys defined in this specification are
+ <div class="parameters">
+ <strong>Parameters</strong>
+ <div class="paramtable">
+ <dl>
+ <dt><code class="parameter-name">keyArg</code> of type <code>DOMString</code></dt>
+ <dd>
+ <p>A modifier key value. Modifier keys defined in this specification are
<code class="value">'Alt'</code>,
<code class="value">'AltGraph'</code>,
<code class="value">'CapsLock'</code>,
@@ -3291,10 +3493,12 @@
<code class="value">'Scroll'</code>,
<code class="value">'Shift'</code>, and
<code class="value">'Win'</code>.
- User agents may support additional implementation-specific modifier keys depending on the environment.
- <p class="note"><strong>Note:</strong> If an application wishes to distinguish between right and left modifiers, this information could be deduced using keyboard events and <a href="#events-Events-KeyboardEvent-location"><code>KeyboardEvent.location</code></a>.</p>
+ User agents may support additional implementation-specific modifier keys depending on the environment.</p>
+ <p class="note" id=""><strong>Note:</strong> If an application wishes to distinguish between right and left modifiers, this information could be deduced using keyboard events and <a href="#events-Events-KeyboardEvent-location"><code>KeyboardEvent.location</code></a>.</p>
</dd>
- </dl></div></div>
+ </dl>
+ </div>
+ </div>
<!-- parameters -->
<div class="return"><strong>Return Value</strong><div class="returntable"><table summary="Layout table: the first cell contains the type of the return value, the second contains a short description" border="0"><tr><td><p><code>boolean</code></p></td><td><p><code>true</code> if it is a modifier key and the modifier is activated, <code>false</code> otherwise.</p></td></tr></table></div></div>
<!-- return -->
@@ -3309,15 +3513,36 @@
</code>
</dt>
<dd>
- <div class="method">Initializes attributes of a <code>KeyboardEvent</code> object. This method has the same behavior as <a href="#events-event-type-initUIEvent"><code>UIEvent.initUIEvent()</code></a>. The value of <a href="#events-Events-UIEvent-detail"><code>UIEvent.detail</code></a> remains undefined.
- <div class="parameters"><strong>Parameters</strong><div class="paramtable"><dl><dt><code class="parameter-name">typeArg</code> of type <code>DOMString</code></dt><dd>Refer to the <a href="#events-event-type-initUIEvent"><code>UIEvent.initUIEvent()</code></a> method for a description of this parameter.<br /></dd>
-<dt><code class="parameter-name">canBubbleArg</code> of type <code>boolean</code></dt><dd>Refer to the <a href="#events-event-type-initUIEvent"><code>UIEvent.initUIEvent()</code></a> method for a description of this parameter.<br /></dd>
-<dt><code class="parameter-name">cancelableArg</code> of type <code>boolean</code></dt><dd>Refer to the <a href="#events-event-type-initUIEvent"><code>UIEvent.initUIEvent()</code></a> method for a description of this parameter.<br /></dd>
-<dt><code class="parameter-name">viewArg</code> of type <code>views::AbstractView</code></dt><dd>Refer to the <a href="#events-event-type-initUIEvent"><code>UIEvent.initUIEvent()</code></a> method for a description of this parameter.<br /></dd>
-<dt><code class="parameter-name">keyArg</code> of type <code>DOMString</code></dt><dd>Specifies <a href="#events-Events-KeyboardEvent-key"><code>KeyboardEvent.key</code></a>.<br /></dd>
-<dt><code class="parameter-name">locationArg</code> of type <code>unsigned long</code></dt><dd>Specifies <a href="#events-Events-KeyboardEvent-location"><code>KeyboardEvent.location</code></a>.<br /></dd>
-<dt><code class="parameter-name">modifiersListArg</code> of type <code>DOMString</code></dt><dd>A <a class="normative" href="http://www.w3.org/TR/2004/REC-xml-20040204/#NT-S"><em>white space</em></a> separated list of modifier key values to be activated on this object. As an example, <code>"Control Alt"</code> must mark the control and alt modifiers as activated.<br /></dd>
-</dl></div></div>
+ <div class="method">
+ <p>Initializes attributes of a <code>KeyboardEvent</code> object. This method has the same behavior as <a href="#events-event-type-initUIEvent"><code>UIEvent.initUIEvent()</code></a>. The value of <a href="#events-Events-UIEvent-detail"><code>UIEvent.detail</code></a> remains undefined.</p>
+ <div class="parameters">
+ <strong>Parameters</strong>
+ <div class="paramtable">
+ <dl>
+ <dt><code class="parameter-name">typeArg</code> of type <code>DOMString</code></dt>
+ <dd><p>Refer to the <a href="#events-event-type-initUIEvent"><code>UIEvent.initUIEvent()</code></a> method for a description of this parameter.</p></dd>
+
+ <dt><code class="parameter-name">canBubbleArg</code> of type <code>boolean</code></dt>
+ <dd><p>Refer to the <a href="#events-event-type-initUIEvent"><code>UIEvent.initUIEvent()</code></a> method for a description of this parameter.</p></dd>
+
+ <dt><code class="parameter-name">cancelableArg</code> of type <code>boolean</code></dt>
+ <dd><p>Refer to the <a href="#events-event-type-initUIEvent"><code>UIEvent.initUIEvent()</code></a> method for a description of this parameter.</p></dd>
+
+ <dt><code class="parameter-name">viewArg</code> of type <code>views::AbstractView</code></dt>
+ <dd><p>Refer to the <a href="#events-event-type-initUIEvent"><code>UIEvent.initUIEvent()</code></a> method for a description of this parameter.</p></dd>
+
+ <dt><code class="parameter-name">keyArg</code> of type <code>DOMString</code></dt>
+ <dd><p>Specifies <a href="#events-Events-KeyboardEvent-key"><code>KeyboardEvent.key</code></a>.</p></dd>
+
+ <dt><code class="parameter-name">locationArg</code> of type <code>unsigned long</code></dt>
+ <dd><p>Specifies <a href="#events-Events-KeyboardEvent-location"><code>KeyboardEvent.location</code></a>.</p></dd>
+
+ <dt><code class="parameter-name">modifiersListArg</code> of type <code>DOMString</code></dt>
+ <dd><p>A <a class="normative" href="http://www.w3.org/TR/2004/REC-xml-20040204/#NT-S"><em>white space</em></a> separated list of modifier key values to be activated on this object. As an example, <code>"Control Alt"</code> must mark the control and alt modifiers as activated.</p></dd>
+ </dl>
+ </div>
+ </div>
+
<!-- parameters -->
<div><strong>No Return Value</strong></div>
@@ -3378,8 +3603,8 @@
<a class="eventtype" href="#event-type-keyup"><code>keyup</code></a>
</li>
</ol>
- <p class="note" id="key-default"><strong>Note</strong> Typically, any <a class="def" href="#glossary-default-action">default actions</a> associated with any particular key must be completed before the <a class="eventtype" href="#event-type-keyup"><code>keyup</code></a> event is dispatched, which may delay the <a class="eventtype" href="#event-type-keyup"><code>keyup</code></a> event slightly (though this is not likely to be a perceptible delay).</p>
- <p class="warning"><strong>Warning!</strong> Because of hardware limitations, on some keyboard devices, the order between the text event and keyboard events may differ. For example, some mobile devices may dispatch the <a class="eventtype" href="#event-type-textInput"><code>textInput</code></a> event after the <a class="eventtype" href="#event-type-keyup"><code>keyup</code></a> event.</p>
+ <p class="note" id="key-default"><strong>Note:</strong> Typically, any <a class="def" href="#glossary-default-action">default actions</a> associated with any particular key must be completed before the <a class="eventtype" href="#event-type-keyup"><code>keyup</code></a> event is dispatched, which may delay the <a class="eventtype" href="#event-type-keyup"><code>keyup</code></a> event slightly (though this is not likely to be a perceptible delay).</p>
+ <p class="warning" id=""><strong>Warning!</strong> Because of hardware limitations, on some keyboard devices, the order between the text event and keyboard events may differ. For example, some mobile devices may dispatch the <a class="eventtype" href="#event-type-textInput"><code>textInput</code></a> event after the <a class="eventtype" href="#event-type-keyup"><code>keyup</code></a> event.</p>
<!-- keydown -->
<div class="event-definition assert must">
@@ -3409,10 +3634,10 @@
<li>if the key is associated with a <a class="def" href="#glossary-text-composition-system">text composition system</a>, the default action shall be to launch that system</li>
<li>if the key is the <code>tab</code> key, the default action shall be to shift the document focus from the currently focused element (if any) to the new focused element, as described in <a href="#events-focusevent">Focus Event Types</a></li>
<li>if the key is the <a href="#key-Enter"><code class="value keyname">'Enter'</code></a> or <a href="#key-Space"><code class="value keyname">'Space'</code></a> key and the current focus is on a state-changing element, the default action shall be to dispatch a <a class="eventtype" href="#event-type-click"><code>click</code></a> event, and a <a class="eventtype" href="#event-type-DOMActivate"><code>DOMActivate</code></a> event if that event type is supported by the <a class="def" href="#glossary-user-agent">user agent</a> (refer to <a href="#event-flow-activation">activation triggers and behavior</a> for more details)</li>
- <li>if the key is associated with any other event type, such as the <a class="eventtype" href="#event-type-scroll"><code>scroll</code></a> event, the default action shall be to dispatch an event of that type.</li>
+ <!-- <li>if the key is associated with any other event type, such as the <a class="eventtype" href="#event-type-scroll"><code>scroll</code></a> event, the default action shall be to dispatch an event of that type.</li> -->
</ul>
<p>If this event is canceled, the associated events types must not be dispatched, and the associated actions must not be performed.</p>
- <p class="note"><strong>Note:</strong> the <a class="eventtype" href="#event-type-keydown"><code>keydown</code></a> and <a class="eventtype" href="#event-type-keyup"><code>keyup</code></a> events are traditionally associated with detecting any key, not just those which produce a <a class="def" href="#glossary-character-value">character value</a>.</p>
+ <p class="note" id=""><strong>Note:</strong> the <a class="eventtype" href="#event-type-keydown"><code>keydown</code></a> and <a class="eventtype" href="#event-type-keyup"><code>keyup</code></a> events are traditionally associated with detecting any key, not just those which produce a <a class="def" href="#glossary-character-value">character value</a>.</p>
</dd>
</dl>
</div>
@@ -3435,8 +3660,8 @@
<tr class="assert must"><th>Context info</th><td><a href="#events-Events-UIEvent-view"><code>UIEvent.view</code></a>, <a href="#events-Events-KeyboardEvent-key"><code>KeyboardEvent.key</code></a>, <a href="#events-Events-KeyboardEvent-location"><code>KeyboardEvent.location</code></a>, <a href="#events-Events-KeyboardEvent-altKey"><code>KeyboardEvent.altKey</code></a>, <a href="#events-Events-KeyboardEvent-shiftKey"><code>KeyboardEvent.shiftKey</code></a>, <a href="#events-Events-KeyboardEvent-ctrlKey"><code>KeyboardEvent.ctrlKey</code></a>, <a href="#events-Events-KeyboardEvent-metaKey"><code>KeyboardEvent.metaKey</code></a>, and <a href="#events-Events-KeyboardEvent-repeat"><code>KeyboardEvent.repeat</code></a> are in use.</td></tr>
</table>
<p>A <a class="def" href="#glossary-user-agent">user agent</a> must dispatch this event when a key is pressed down, if and only if that key normally produces a <a class="def" href="#glossary-character-value">character value</a>. The <a class="eventtype" href="#event-type-keydown"><code>keydown</code></a> event type is device dependent and relies on the capabilities of the input devices and how they are mapped in the operating system. This event type shall be generated after the keyboard mapping but before the processing of an <a class="def" href="#glossary-ime">input method editor</a>, normally associated with the dispatching of a <a class="eventtype" href="#event-type-compositionstart"><code>compositionstart</code></a>, <a class="eventtype" href="#event-type-compositionupdate"><code>compositionupdate</code></a>, or <a class="eventtype" href="#event-type-compositionend"><code>compositionend</code></a> event. This event type must be dispatched after the <a class="eventtype" href="#event-type-keydown"><code>keydown</code></a> event and before the <a class="eventtype" href="#event-type-keyup"><code>keyup</code></a> event associated with the same key.</p>
- <p class="note"><strong>Note:</strong> the <a class="eventtype" href="#event-type-keypress"><code>keypress</code></a> event is traditionally associated with detecting a <a class="def" href="#glossary-character-value">character value</a> rather than a physical key, and may not be available on all keys in some configurations.</p>
- <p class="warning"><strong>Warning!</strong> the <a class="eventtype" href="#event-type-keypress"><code>keypress</code></a> event type is defined in this specification for reference and completeness, but this specification <a class="def" href="#glossary-deprecated">deprecates</a> the use of this event type in favor of the <a class="eventtype" href="#event-type-textInput"><code>textInput</code></a> event type.</p>
+ <p class="note" id=""><strong>Note:</strong> the <a class="eventtype" href="#event-type-keypress"><code>keypress</code></a> event is traditionally associated with detecting a <a class="def" href="#glossary-character-value">character value</a> rather than a physical key, and may not be available on all keys in some configurations.</p>
+ <p class="warning" id=""><strong>Warning!</strong> the <a class="eventtype" href="#event-type-keypress"><code>keypress</code></a> event type is defined in this specification for reference and completeness, but this specification <a class="def" href="#glossary-deprecated">deprecates</a> the use of this event type in favor of the <a class="eventtype" href="#event-type-textInput"><code>textInput</code></a> event type.</p>
</dd>
</dl>
</div>
@@ -3459,7 +3684,7 @@
<tr class="assert must"><th>Context info</th><td><a href="#events-Events-UIEvent-view"><code>UIEvent.view</code></a>, <a href="#events-Events-KeyboardEvent-key"><code>KeyboardEvent.key</code></a>, and <a href="#events-Events-KeyboardEvent-location"><code>KeyboardEvent.location</code></a> are in use. <a href="#events-Events-KeyboardEvent-altKey"><code>KeyboardEvent.altKey</code></a>, <a href="#events-Events-KeyboardEvent-shiftKey"><code>KeyboardEvent.shiftKey</code></a>, <a href="#events-Events-KeyboardEvent-ctrlKey"><code>KeyboardEvent.ctrlKey</code></a>, and <a href="#events-Events-KeyboardEvent-metaKey"><code>KeyboardEvent.metaKey</code></a> are in use unless the <a href="#events-Events-KeyboardEvent-key"><code>KeyboardEvent.key</code></a> corresponds to the key modifier itself.</td></tr>
</table>
<p>A <a class="def" href="#glossary-user-agent">user agent</a> must dispatch this event when a key is released. The <a class="eventtype" href="#event-type-keydown"><code>keydown</code></a> event type is device dependent and relies on the capabilities of the input devices and how they are mapped in the operating system. This event type shall be generated after the keyboard mapping. This event type must be dispatched after the <a class="eventtype" href="#event-type-keydown"><code>keydown</code></a> and <a class="eventtype" href="#event-type-keypress"><code>keypress</code></a> events event associated with the same key. Whether or not a <a class="eventtype" href="#event-type-keydown"><code>keydown</code></a> contributes to the generation of a text event is implementation dependent.</p>
- <p class="note"><strong>Note:</strong> the <a class="eventtype" href="#event-type-keydown"><code>keydown</code></a> and <a class="eventtype" href="#event-type-keyup"><code>keyup</code></a> events are traditionally associated with detecting any key, not just those which produce a <a class="def" href="#glossary-character-value">character value</a>.</p>
+ <p class="note" id=""><strong>Note:</strong> the <a class="eventtype" href="#event-type-keydown"><code>keydown</code></a> and <a class="eventtype" href="#event-type-keyup"><code>keyup</code></a> events are traditionally associated with detecting any key, not just those which produce a <a class="def" href="#glossary-character-value">character value</a>.</p>
</dd>
</dl>
</div>
@@ -3483,27 +3708,24 @@
<strong>IDL Definition</strong>
</dt>
<dd>
- <div class="idl-code">
- <pre>
+ <pre class="idl" id="idl-interface-"><code>
// Introduced in DOM Level 3:
interface <a href="#events-Events-CompositionEvent">CompositionEvent</a> : <a href="#events-Events-UIEvent">UIEvent</a> {
readonly attribute DOMString <a href="#events-Events-CompositionEvent-data">data</a>;
- void <a href="#events-event-type-initCompositionEvent">initCompositionEvent</a>(in DOMString typeArg,
- in boolean canBubbleArg,
- in boolean cancelableArg,
- in views::AbstractView viewArg,
- in DOMString dataArg);
+ void <a href="#events-event-type-initCompositionEvent">initCompositionEvent</a>(in DOMString typeArg,
+ in boolean canBubbleArg,
+ in boolean cancelableArg,
+ in views::AbstractView viewArg,
+ in DOMString dataArg);
};
- </pre>
- </div>
- <br />
+ </code></pre>
</dd>
<dt><strong>Attributes</strong></dt>
<dd>
<dl>
<dt><code class="attribute-name"><a id="events-Events-CompositionEvent-data">data</a></code> of type <code>DOMString</code>, readonly</dt>
- <dd><code>data</code> holds the value of the characters generated by an input method. This may be a single Unicode character or a non-empty sequence of Unicode characters [<cite><a class="normative" href="#references-Unicode">Unicode</a></cite>]. Characters should be normalized as defined by the Unicode normalization form <em>NFC</em>, defined in [<cite><a class="normative" href="#references-UnicodeNormalization">UAX #15</a></cite>]. This attribute may be null or contain the empty string.<br /></dd>
+ <dd><p><code>data</code> holds the value of the characters generated by an input method. This may be a single Unicode character or a non-empty sequence of Unicode characters [<cite><a class="normative" href="#references-Unicode">Unicode</a></cite>]. Characters should be normalized as defined by the Unicode normalization form <em>NFC</em>, defined in [<cite><a class="normative" href="#references-UnicodeNormalization">UAX #15</a></cite>]. This attribute may be null or contain the empty string.</p></dd>
</dl>
</dd>
@@ -3518,12 +3740,28 @@
</dt>
<dd>
<div class="method">Initializes attributes of a <code>CompositionEvent</code> object. This method has the same behavior as <a href="#events-event-type-initUIEvent"><code>UIEvent.initUIEvent()</code></a>. The value of <a href="#events-Events-UIEvent-detail"><code>UIEvent.detail</code></a> remains undefined.
- <div class="parameters"><strong>Parameters</strong><div class="paramtable"><dl><dt><code class="parameter-name">typeArg</code> of type <code>DOMString</code></dt><dd>Refer to the <a href="#events-event-type-initUIEvent"><code>UIEvent.initUIEvent()</code></a> method for a description of this parameter.<br /></dd>
-<dt><code class="parameter-name">canBubbleArg</code> of type <code>boolean</code></dt><dd>Refer to the <a href="#events-event-type-initUIEvent"><code>UIEvent.initUIEvent()</code></a> method for a description of this parameter.<br /></dd>
-<dt><code class="parameter-name">cancelableArg</code> of type <code>boolean</code></dt><dd>Refer to the <a href="#events-event-type-initUIEvent"><code>UIEvent.initUIEvent()</code></a> method for a description of this parameter.<br /></dd>
-<dt><code class="parameter-name">viewArg</code> of type <code>views::AbstractView</code></dt><dd>Refer to the <a href="#events-event-type-initUIEvent"><code>UIEvent.initUIEvent()</code></a> method for a description of this parameter.<br /></dd>
-<dt><code class="parameter-name">dataArg</code> of type <code>DOMString</code></dt><dd>Specifies <a href="#events-Events-CompositionEvent-data"><code>CompositionEvent.data</code></a>.<br /></dd>
-</dl></div></div>
+ <div class="parameters">
+ <strong>Parameters</strong>
+ <div class="paramtable">
+ <dl>
+ <dt><code class="parameter-name">typeArg</code> of type <code>DOMString</code></dt>
+ <dd><p>Refer to the <a href="#events-event-type-initUIEvent"><code>UIEvent.initUIEvent()</code></a> method for a description of this parameter.</p></dd>
+
+ <dt><code class="parameter-name">canBubbleArg</code> of type <code>boolean</code></dt>
+ <dd><p>Refer to the <a href="#events-event-type-initUIEvent"><code>UIEvent.initUIEvent()</code></a> method for a description of this parameter.</p></dd>
+
+ <dt><code class="parameter-name">cancelableArg</code> of type <code>boolean</code></dt>
+ <dd><p>Refer to the <a href="#events-event-type-initUIEvent"><code>UIEvent.initUIEvent()</code></a> method for a description of this parameter.</p></dd>
+
+ <dt><code class="parameter-name">viewArg</code> of type <code>views::AbstractView</code></dt>
+ <dd><p>Refer to the <a href="#events-event-type-initUIEvent"><code>UIEvent.initUIEvent()</code></a> method for a description of this parameter.</p></dd>
+
+ <dt><code class="parameter-name">dataArg</code> of type <code>DOMString</code></dt>
+ <dd><p>Specifies <a href="#events-Events-CompositionEvent-data"><code>CompositionEvent.data</code></a>.</p></dd>
+ </dl>
+ </div>
+ </div>
+
<!-- parameters -->
<div><strong>No Return Value</strong></div>
@@ -3657,7 +3895,7 @@
<!-- <p class="issue">Note that nodes that are not in the document, such as elements freshly created, or elements removed from the DOM, shall not fire mutation events when changed. For example, if an element is created but not yet inserted into the document, then an existing element located in the document shall be moved from its current location to be a child of the new element, there must be one mutation event, for removing the existing element from its previous location, but no event must fire for insertion of the element into the new element, regardless of any assigned mutation event listeners.</p>
<p class="issue">?What happens to event listeners on an element when it is removed from the tree, or moved elsewhere in the tree?</p> -->
<p>Many single modifications of the tree can cause multiple mutation events to be dispatched. Rather than attempt to specify the ordering of mutation events due to every possible modification of the tree, the ordering of these events is left to the implementation.</p>
- <p class="warning"><strong>Warning!</strong> The <a href="#events-Events-MutationEvent">MutationEvent interface</a> was introduced in DOM Level 2 Events, but has not yet been completely and interoperably implemented across <a class="def" href="#glossary-user-agent">user agents</a>. In addition, there have been critiques that the interface, as designed, introduces a performance and implementation challenge. A new specification is under development with the aim of addressing the use cases that mutation events solves, but in more performant manner. Thus, this specification describes mutation events for reference and completeness of legacy behavior, but <a class="def" href="#glossary-deprecated">deprecates</a> the use of both the <a href="#events-Events-MutationEvent"><code>MutationEvent</code></a> interface and the <a href="#events-Events-MutationNameEvent"><code>MutationNameEvent</code></a> interface.</p>
+ <p class="warning" id=""><strong>Warning!</strong> The <a href="#events-Events-MutationEvent">MutationEvent interface</a> was introduced in DOM Level 2 Events, but has not yet been completely and interoperably implemented across <a class="def" href="#glossary-user-agent">user agents</a>. In addition, there have been critiques that the interface, as designed, introduces a performance and implementation challenge. A new specification is under development with the aim of addressing the use cases that mutation events solves, but in more performant manner. Thus, this specification describes mutation events for reference and completeness of legacy behavior, but <a class="def" href="#glossary-deprecated">deprecates</a> the use of both the <a href="#events-Events-MutationEvent"><code>MutationEvent</code></a> interface and the <a href="#events-Events-MutationNameEvent"><code>MutationNameEvent</code></a> interface.</p>
<dl>
<dt><strong>Interface <em><a id="events-Events-MutationEvent">MutationEvent</a></em></strong> (introduced in <strong class="since">DOM Level 2</strong>)</dt>
<dd>
@@ -3669,8 +3907,7 @@
<strong>IDL Definition</strong>
</dt>
<dd>
- <div class="idl-code">
- <pre>
+ <pre class="idl" id="idl-interface-"><code>
// Introduced in DOM Level 2:
interface <a href="#events-Events-MutationEvent">MutationEvent</a> : <a href="#events-Events-Event">Event</a> {
@@ -3693,9 +3930,7 @@
in DOMString attrNameArg,
in unsigned short attrChangeArg);
};
- </pre>
- </div>
- <br />
+ </code></pre>
</dd>
<dt>
@@ -3725,19 +3960,19 @@
<dd>
<dl>
<dt><code class="attribute-name"><a id="events-Events-MutationEvent-attrChange">attrChange</a></code> of type <code>unsigned short</code>, readonly</dt>
- <dd><code>attrChange</code> indicates the type of change which triggered the <a class="eventtype" href="#event-type-DOMAttrModified"><code>DOMAttrModified</code></a> event. The values can be <code>MODIFICATION</code>, <code>ADDITION</code>, or <code>REMOVAL</code>.<br /></dd>
+ <dd><p><code>attrChange</code> indicates the type of change which triggered the <a class="eventtype" href="#event-type-DOMAttrModified"><code>DOMAttrModified</code></a> event. The values can be <code>MODIFICATION</code>, <code>ADDITION</code>, or <code>REMOVAL</code>.</p></dd>
<dt><code class="attribute-name"><a id="events-Events-MutationEvent-attrName">attrName</a></code> of type <code>DOMString</code>, readonly</dt>
- <dd><code>attrName</code> indicates the name of the changed <code>Attr</code> node in a <a class="eventtype" href="#event-type-DOMAttrModified"><code>DOMAttrModified</code></a> event.<br /></dd>
+ <dd><p><code>attrName</code> indicates the name of the changed <code>Attr</code> node in a <a class="eventtype" href="#event-type-DOMAttrModified"><code>DOMAttrModified</code></a> event.</p></dd>
<dt><code class="attribute-name"><a id="events-Events-MutationEvent-newValue">newValue</a></code> of type <code>DOMString</code>, readonly</dt>
- <dd><code>newValue</code> indicates the new value of the <code>Attr</code> node in <a class="eventtype" href="#event-type-DOMAttrModified"><code>DOMAttrModified</code></a> events, and of the <code>CharacterData</code> node in <a class="eventtype" href="#event-type-DOMCharacterDataModified"><code>DOMCharacterDataModified</code></a> events.<br /></dd>
+ <dd><p><code>newValue</code> indicates the new value of the <code>Attr</code> node in <a class="eventtype" href="#event-type-DOMAttrModified"><code>DOMAttrModified</code></a> events, and of the <code>CharacterData</code> node in <a class="eventtype" href="#event-type-DOMCharacterDataModified"><code>DOMCharacterDataModified</code></a> events.</p></dd>
<dt><code class="attribute-name"><a id="events-Events-MutationEvent-prevValue">prevValue</a></code> of type <code>DOMString</code>, readonly</dt>
- <dd><code>prevValue</code> indicates the previous value of the <code>Attr</code> node in <a class="eventtype" href="#event-type-DOMAttrModified"><code>DOMAttrModified</code></a> events, and of the <code>CharacterData</code> node in <a class="eventtype" href="#event-type-DOMCharacterDataModified"><code>DOMCharacterDataModified</code></a> events.<br /></dd>
+ <dd><p><code>prevValue</code> indicates the previous value of the <code>Attr</code> node in <a class="eventtype" href="#event-type-DOMAttrModified"><code>DOMAttrModified</code></a> events, and of the <code>CharacterData</code> node in <a class="eventtype" href="#event-type-DOMCharacterDataModified"><code>DOMCharacterDataModified</code></a> events.</p></dd>
<dt><code class="attribute-name"><a id="events-Events-MutationEvent-relatedNode">relatedNode</a></code> of type <code>Node</code>, readonly</dt>
- <dd><code>relatedNode</code> shall be used to identify a secondary node related to a mutation event. For example, if a mutation event is dispatched to a node indicating that its parent has changed, the <code>relatedNode</code> shall be the changed parent. If an event is instead dispatched to a subtree indicating a node was changed within it, the <code>relatedNode</code> shall be the changed node. In the case of the <a class="eventtype" href="#event-type-DOMAttrModified"><code>DOMAttrModified</code></a> event it indicates the <code>Attr</code> node which was modified, added, or removed.<br /></dd>
+ <dd><p><code>relatedNode</code> shall be used to identify a secondary node related to a mutation event. For example, if a mutation event is dispatched to a node indicating that its parent has changed, the <code>relatedNode</code> shall be the changed parent. If an event is instead dispatched to a subtree indicating a node was changed within it, the <code>relatedNode</code> shall be the changed node. In the case of the <a class="eventtype" href="#event-type-DOMAttrModified"><code>DOMAttrModified</code></a> event it indicates the <code>Attr</code> node which was modified, added, or removed.</p></dd>
</dl>
</dd>
@@ -3751,21 +3986,44 @@
</code>
</dt>
<dd>
- <div class="method">Initializes attributes of a <code>MutationEvent</code> object. This method has the same behavior as <a href="#events-event-type-initEvent"><code>Event.initEvent()</code></a>.
- <div class="parameters"><strong>Parameters</strong><div class="paramtable"><dl><dt><code class="parameter-name">typeArg</code> of type <code>DOMString</code></dt><dd>Refer to the <a href="#events-event-type-initEvent"><code>Event.initEvent()</code></a> method for a description of this parameter.<br /></dd>
-<dt><code class="parameter-name">canBubbleArg</code> of type <code>boolean</code></dt><dd>Refer to the <a href="#events-event-type-initEvent"><code>Event.initEvent()</code></a> method for a description of this parameter.<br /></dd>
-<dt><code class="parameter-name">cancelableArg</code> of type <code>boolean</code></dt><dd>Refer to the <a href="#events-event-type-initEvent"><code>Event.initEvent()</code></a> method for a description of this parameter.<br /></dd>
-<dt><code class="parameter-name">relatedNodeArg</code> of type <code>Node</code></dt><dd>Specifies <a href="#events-Events-MutationEvent-relatedNode"><code>MutationEvent.relatedNode</code></a>.<br /></dd>
-<dt><code class="parameter-name">prevValueArg</code> of type <code>DOMString</code></dt><dd>Specifies <a href="#events-Events-MutationEvent-prevValue"><code>MutationEvent.prevValue</code></a>. This value may be null.<br /></dd>
-<dt><code class="parameter-name">newValueArg</code> of type <code>DOMString</code></dt><dd>Specifies <a href="#events-Events-MutationEvent-newValue"><code>MutationEvent.newValue</code></a>. This value may be null.<br /></dd>
-<dt><code class="parameter-name">attrNameArg</code> of type <code>DOMString</code></dt><dd>Specifies <a href="#events-Events-MutationEvent-attrName"><code>MutationEvent.attrName</code></a>. This value may be null.<br /></dd>
-<dt><code class="parameter-name">attrChangeArg</code> of type <code>unsigned short</code></dt><dd>Specifies <a href="#events-Events-MutationEvent-attrChange"><code>MutationEvent.attrChange</code></a>. This value may be null.<br /></dd>
-</dl></div></div>
- <!-- parameters -->
- <div><strong>No Return Value</strong></div>
-
- <div><strong>No Exceptions</strong></div>
- </div>
+ <div class="method">
+ <p>Initializes attributes of a <code>MutationEvent</code> object. This method has the same behavior as <a href="#events-event-type-initEvent"><code>Event.initEvent()</code></a>.</p>
+ <div class="parameters">
+ <strong>Parameters</strong>
+ <div class="paramtable">
+ <dl>
+ <dt><code class="parameter-name">typeArg</code> of type <code>DOMString</code></dt>
+ <dd><p>Refer to the <a href="#events-event-type-initEvent"><code>Event.initEvent()</code></a> method for a description of this parameter.</p></dd>
+
+ <dt><code class="parameter-name">canBubbleArg</code> of type <code>boolean</code></dt>
+ <dd><p>Refer to the <a href="#events-event-type-initEvent"><code>Event.initEvent()</code></a> method for a description of this parameter.</p></dd>
+
+ <dt><code class="parameter-name">cancelableArg</code> of type <code>boolean</code></dt>
+ <dd><p>Refer to the <a href="#events-event-type-initEvent"><code>Event.initEvent()</code></a> method for a description of this parameter.</p></dd>
+
+ <dt><code class="parameter-name">relatedNodeArg</code> of type <code>Node</code></dt>
+ <dd><p>Specifies <a href="#events-Events-MutationEvent-relatedNode"><code>MutationEvent.relatedNode</code></a>.</p></dd>
+
+ <dt><code class="parameter-name">prevValueArg</code> of type <code>DOMString</code></dt>
+ <dd><p>Specifies <a href="#events-Events-MutationEvent-prevValue"><code>MutationEvent.prevValue</code></a>. This value may be null.</p></dd>
+
+ <dt><code class="parameter-name">newValueArg</code> of type <code>DOMString</code></dt>
+ <dd><p>Specifies <a href="#events-Events-MutationEvent-newValue"><code>MutationEvent.newValue</code></a>. This value may be null.</p></dd>
+
+ <dt><code class="parameter-name">attrNameArg</code> of type <code>DOMString</code></dt>
+ <dd><p>Specifies <a href="#events-Events-MutationEvent-attrName"><code>MutationEvent.attrName</code></a>. This value may be null.</p></dd>
+
+ <dt><code class="parameter-name">attrChangeArg</code> of type <code>unsigned short</code></dt>
+ <dd><p>Specifies <a href="#events-Events-MutationEvent-attrChange"><code>MutationEvent.attrChange</code></a>. This value may be null.</p></dd>
+ </dl>
+ </div>
+ </div>
+
+ <!-- parameters -->
+ <div><strong>No Return Value</strong></div>
+
+ <div><strong>No Exceptions</strong></div>
+ </div>
<!-- method -->
</dd>
</dl>
@@ -3793,7 +4051,7 @@
<tr class="assert must"><th>Context info</th><td>None</td></tr>
</table>
<p>This is a general event for notification of all changes to the document. It can be used instead of the more specific mutation and mutation name events listed below. It may be dispatched after a single modification to the document or, at the implementation's discretion, after multiple changes have occurred. The latter use should generally be used to accommodate multiple changes which occur either simultaneously or in rapid succession. The target of this event shall be the lowest common parent of the changes which have taken place. This event shall be dispatched after any other events caused by the mutation(s) have occurred.</p>
- <p class="warning"><strong>Warning!</strong> the <a class="eventtype" href="#event-type-DOMSubtreeModified"><code>DOMSubtreeModified</code></a> event type is defined in this specification for reference and completeness, but this specification <a class="def" href="#glossary-deprecated">deprecates</a> the use of this event type.</p>
+ <p class="warning" id=""><strong>Warning!</strong> the <a class="eventtype" href="#event-type-DOMSubtreeModified"><code>DOMSubtreeModified</code></a> event type is defined in this specification for reference and completeness, but this specification <a class="def" href="#glossary-deprecated">deprecates</a> the use of this event type.</p>
</dd>
</dl>
</div>
@@ -3816,7 +4074,7 @@
<tr class="assert must"><th>Context info</th><td><a href="#events-Events-MutationEvent-relatedNode"><code>MutationEvent.relatedNode</code></a> holds the parent node of the node that has been inserted or, in case of <code>Attr</code> nodes, the <code>ownerElement</code> of the <code>Attr</code> node.</td></tr>
</table>
<p>A <a class="def" href="#glossary-user-agent">user agent</a> must dispatch this event when a node has been added as a child of another node or, in case of <code>Attr</code> nodes, has been added to an <code>Element</code>. This event shall be dispatched after the insertion has taken place. The <a class="def" href="#glossary-proximal-event-target">proximal event target</a> of this event shall be the node being inserted.</p>
- <p class="warning"><strong>Warning!</strong> the <a class="eventtype" href="#event-type-DOMNodeInserted"><code>DOMNodeInserted</code></a> event type is defined in this specification for reference and completeness, but this specification <a class="def" href="#glossary-deprecated">deprecates</a> the use of this event type.</p>
+ <p class="warning" id=""><strong>Warning!</strong> the <a class="eventtype" href="#event-type-DOMNodeInserted"><code>DOMNodeInserted</code></a> event type is defined in this specification for reference and completeness, but this specification <a class="def" href="#glossary-deprecated">deprecates</a> the use of this event type.</p>
</dd>
</dl>
</div>
@@ -3839,7 +4097,7 @@
<tr class="assert must"><th>Context info</th><td><a href="#events-Events-MutationEvent-relatedNode"><code>MutationEvent.relatedNode</code></a> holds the parent node of the node being removed or, in case of <code>Attr</code> nodes, the <code>ownerElement</code> of the <code>Attr</code> node.</td></tr>
</table>
<p>A <a class="def" href="#glossary-user-agent">user agent</a> must dispatch this event when a node is being removed from its parent node or, in case of <code>Attr</code> nodes, removed from its <code>ownerElement</code>. This event shall be dispatched before the removal takes place. The <a class="def" href="#glossary-proximal-event-target">proximal event target</a> of this event shall be the node being removed.</p>
- <p class="warning"><strong>Warning!</strong> the <a class="eventtype" href="#event-type-DOMNodeRemoved"><code>DOMNodeRemoved</code></a> event type is defined in this specification for reference and completeness, but this specification <a class="def" href="#glossary-deprecated">deprecates</a> the use of this event type.</p>
+ <p class="warning" id=""><strong>Warning!</strong> the <a class="eventtype" href="#event-type-DOMNodeRemoved"><code>DOMNodeRemoved</code></a> event type is defined in this specification for reference and completeness, but this specification <a class="def" href="#glossary-deprecated">deprecates</a> the use of this event type.</p>
</dd>
</dl>
</div>
@@ -3862,7 +4120,7 @@
<tr class="assert must"><th>Context info</th><td>None</td></tr>
</table>
<p>A <a class="def" href="#glossary-user-agent">user agent</a> must dispatch this event when a node is being removed from a document, either through direct removal of the node or removal of a subtree in which it is contained; <code>Attr</code> nodes are considered part of an <code>Element</code>'s subtree. This event shall be dispatched before the removal takes place. The <a class="def" href="#glossary-proximal-event-target">proximal event target</a> of this event type shall be the node being removed. If the node is being directly removed, the event type <a class="eventtype" href="#event-type-DOMNodeRemoved"><code>DOMNodeRemoved</code></a> must occur before this event type.</p>
- <p class="warning"><strong>Warning!</strong> the <a class="eventtype" href="#event-type-DOMNodeRemovedFromDocument"><code>DOMNodeRemovedFromDocument</code></a> event type is defined in this specification for reference and completeness, but this specification <a class="def" href="#glossary-deprecated">deprecates</a> the use of this event type.</p>
+ <p class="warning" id=""><strong>Warning!</strong> the <a class="eventtype" href="#event-type-DOMNodeRemovedFromDocument"><code>DOMNodeRemovedFromDocument</code></a> event type is defined in this specification for reference and completeness, but this specification <a class="def" href="#glossary-deprecated">deprecates</a> the use of this event type.</p>
</dd>
</dl>
</div>
@@ -3885,7 +4143,7 @@
<tr class="assert must"><th>Context info</th><td>None</td></tr>
</table>
<p>A <a class="def" href="#glossary-user-agent">user agent</a> must dispatch this event when a node has been inserted into a document, either through direct insertion of the node or insertion of a subtree in which it is contained; <code>Attr</code> nodes are considered part of an <code>Element</code>'s subtree. This event shall be dispatched after the insertion has taken place. The <a class="def" href="#glossary-proximal-event-target">proximal event target</a> of this event shall be the node being inserted. If the node is being directly inserted, the event type <a class="eventtype" href="#event-type-DOMNodeInserted"><code>DOMNodeInserted</code></a> must occur before this event type.</p>
- <p class="warning"><strong>Warning!</strong> the <a class="eventtype" href="#event-type-DOMNodeInsertedIntoDocument"><code>DOMNodeInsertedIntoDocument</code></a> event type is defined in this specification for reference and completeness, but this specification <a class="def" href="#glossary-deprecated">deprecates</a> the use of this event type.</p>
+ <p class="warning" id=""><strong>Warning!</strong> the <a class="eventtype" href="#event-type-DOMNodeInsertedIntoDocument"><code>DOMNodeInsertedIntoDocument</code></a> event type is defined in this specification for reference and completeness, but this specification <a class="def" href="#glossary-deprecated">deprecates</a> the use of this event type.</p>
</dd>
</dl>
</div>
@@ -3908,7 +4166,7 @@
<tr class="assert must"><th>Context info</th><td><a href="#events-Events-MutationEvent-attrName"><code>MutationEvent.attrName</code></a> and <a href="#events-Events-MutationEvent-attrChange"><code>MutationEvent.attrChange</code></a> are in use. The value of <a href="#events-Events-MutationEvent-relatedNode"><code>MutationEvent.relatedNode</code></a> indicates the <code>Attr</code> node that has been modified, added, or removed. If the <code>Attr</code> node has been added, <a href="#events-Events-MutationEvent-newValue"><code>MutationEvent.newValue</code></a> shall be in use. If the <code>Attr</code> node has been removed, <a href="#events-Events-MutationEvent-prevValue"><code>MutationEvent.prevValue</code></a> shall be in use. If the <code>Attr</code> node has been modified, <a href="#events-Events-MutationEvent-newValue"><code>MutationEvent.newValue</code></a> and <a href="#events-Events-MutationEvent-prevValue"><code>MutationEvent.prevValue</code></a> are in use.</td></tr>
</table>
<p>A <a class="def" href="#glossary-user-agent">user agent</a> must dispatch this event after an <code>Attr.value</code> has been modified and after an <code>Attr</code> node has been added to or removed from an <code>Element</code>. The <a class="def" href="#glossary-proximal-event-target">proximal event target</a> of this event shall be the <code>Element</code> node where the change occurred. It is implementation dependent whether this event type occurs when the children of the <code>Attr</code> node are changed in ways that do not affect the value of <code>Attr.value</code>.</p>
- <p class="warning"><strong>Warning!</strong> the <a class="eventtype" href="#event-type-DOMAttrModified"><code>DOMAttrModified</code></a> event type is defined in this specification for reference and completeness, but this specification <a class="def" href="#glossary-deprecated">deprecates</a> the use of this event type.</p>
+ <p class="warning" id=""><strong>Warning!</strong> the <a class="eventtype" href="#event-type-DOMAttrModified"><code>DOMAttrModified</code></a> event type is defined in this specification for reference and completeness, but this specification <a class="def" href="#glossary-deprecated">deprecates</a> the use of this event type.</p>
</dd>
</dl>
</div>
@@ -3931,7 +4189,7 @@
<tr class="assert must"><th>Context info</th><td><a href="#events-Events-MutationEvent-prevValue"><code>MutationEvent.prevValue</code></a>, and <a href="#events-Events-MutationEvent-newValue"><code>MutationEvent.newValue</code></a> are in use.</td></tr>
</table>
<p>A <a class="def" href="#glossary-user-agent">user agent</a> must dispatch this event after <code>CharacterData.data</code> or <code>ProcessingInstruction.data</code> have been modified, but the node itself has not been inserted or deleted. The <a class="def" href="#glossary-proximal-event-target">proximal event target</a> of this event shall be the <code>CharacterData</code> node or the <code>ProcessingInstruction</code> node.</p>
- <p class="warning"><strong>Warning!</strong> the <a class="eventtype" href="#event-type-DOMCharacterDataModified"><code>DOMCharacterDataModified</code></a> event type is defined in this specification for reference and completeness, but this specification <a class="def" href="#glossary-deprecated">deprecates</a> the use of this event type.</p>
+ <p class="warning" id=""><strong>Warning!</strong> the <a class="eventtype" href="#event-type-DOMCharacterDataModified"><code>DOMCharacterDataModified</code></a> event type is defined in this specification for reference and completeness, but this specification <a class="def" href="#glossary-deprecated">deprecates</a> the use of this event type.</p>
</dd>
</dl>
</div>
@@ -3941,7 +4199,7 @@
<h3><a id="events-mutationnameevents" href="#events-mutationnameevents">5.2.9 Mutation Name Event Types</a></h3>
<p>This module defines the feature MutationNameEvents 3.0 and depends on the features MutationEvents 3.0 and Core 3.0.</p>
- <p class="warning"><strong>Warning!</strong> The <code>MutationNameEvent</code> interface, introduced in an earlier draft of this specification, derives from the <a href="#events-mutationevents"><code>MutationEvent</code></a> interface, which is deprecated in this specification. Thus, this specification describes the mutation name event types for completeness, but <a class="def" href="#glossary-deprecated">deprecates</a> their use.</p>
+ <p class="warning" id=""><strong>Warning!</strong> The <code>MutationNameEvent</code> interface, introduced in an earlier draft of this specification, derives from the <a href="#events-mutationevents"><code>MutationEvent</code></a> interface, which is deprecated in this specification. Thus, this specification describes the mutation name event types for completeness, but <a class="def" href="#glossary-deprecated">deprecates</a> their use.</p>
<dl>
<dt><strong>Interface <em><a id="events-Events-MutationNameEvent">MutationNameEvent</a></em></strong> (introduced in <strong class="since">DOM Level 3</strong>)</dt>
<dd>
@@ -3953,33 +4211,30 @@
<strong>IDL Definition</strong>
</dt>
<dd>
- <div class="idl-code">
- <pre>
+ <pre class="idl" id="idl-interface-"><code>
// Introduced in DOM Level 3:
interface <a href="#events-Events-MutationNameEvent">MutationNameEvent</a> : <a href="#events-Events-MutationEvent">MutationEvent</a> {
readonly attribute DOMString <a href="#events-Events-MutationNameEvent-prevNamespaceURI">prevNamespaceURI</a>;
readonly attribute DOMString <a href="#events-Events-MutationNameEvent-prevNodeName">prevNodeName</a>;
// Introduced in DOM Level 3:
- void <a href="#events-event-type-initMutationNameEvent">initMutationNameEvent</a>(in DOMString typeArg,
- in boolean canBubbleArg,
- in boolean cancelableArg,
- in Node relatedNodeArg,
- in DOMString prevNamespaceURIArg,
- in DOMString prevNodeNameArg);
+ void <a href="#events-event-type-initMutationNameEvent">initMutationNameEvent</a>(in DOMString typeArg,
+ in boolean canBubbleArg,
+ in boolean cancelableArg,
+ in Node relatedNodeArg,
+ in DOMString prevNamespaceURIArg,
+ in DOMString prevNodeNameArg);
};
- </pre>
- </div>
- <br />
+ </code></pre>
</dd>
<dt><strong>Attributes</strong></dt>
<dd>
<dl>
<dt><code class="attribute-name"><a id="events-Events-MutationNameEvent-prevNamespaceURI">prevNamespaceURI</a></code> of type <code>DOMString</code>, readonly</dt>
- <dd>The previous value of the <code>relatedNode</code>'s <code>namespaceURI</code>.<br /></dd>
+ <dd><p>The previous value of the <code>relatedNode</code>'s <code>namespaceURI</code>.</p></dd>
<dt><code class="attribute-name"><a id="events-Events-MutationNameEvent-prevNodeName">prevNodeName</a></code> of type <code>DOMString</code>, readonly</dt>
- <dd>The previous value of the <code>relatedNode</code>'s <code>nodeName</code>.<br /></dd>
+ <dd><p>The previous value of the <code>relatedNode</code>'s <code>nodeName</code>.</p></dd>
</dl>
</dd>
@@ -3989,19 +4244,37 @@
<dl>
<dt><code class="method-name"><a id="events-event-type-initMutationNameEvent">initMutationNameEvent</a></code> introduced in <strong class="since">DOM Level 3</strong></dt>
<dd>
- <div class="method">Initializes attributes of a <code>MutationNameEvent</code> object. This method has the same behavior as <a href="#events-event-type-initMutationEvent"><code>MutationEvent.initMutationEvent()</code></a>.
- <div class="parameters"><strong>Parameters</strong><div class="paramtable"><dl><dt><code class="parameter-name">typeArg</code> of type <code>DOMString</code></dt><dd>Refer to the <a href="#events-event-type-initMutationEvent"><code>MutationEvent.initMutationEvent()</code></a> method for a description of this parameter.<br /></dd>
-<dt><code class="parameter-name">canBubbleArg</code> of type <code>boolean</code></dt><dd>Refer to the <a href="#events-event-type-initMutationEvent"><code>MutationEvent.initMutationEvent()</code></a> method for a description of this parameter.<br /></dd>
-<dt><code class="parameter-name">cancelableArg</code> of type <code>boolean</code></dt><dd>Refer to the <a href="#events-event-type-initMutationEvent"><code>MutationEvent.initMutationEvent()</code></a> method for a description of this parameter.<br /></dd>
-<dt><code class="parameter-name">relatedNodeArg</code> of type <code>Node</code></dt><dd>Refer to the <a href="#events-event-type-initMutationEvent"><code>MutationEvent.initMutationEvent()</code></a> method for a description of this parameter.<br /></dd>
-<dt><code class="parameter-name">prevNamespaceURIArg</code> of type <code>DOMString</code></dt><dd>Specifies <a href="#events-Events-MutationNameEvent-prevNamespaceURI"><code>MutationNameEvent.prevNamespaceURI</code></a>. This value may be <code>null</code>.<br /></dd>
-<dt><code class="parameter-name">prevNodeNameArg</code> of type <code>DOMString</code></dt><dd>Specifies <a href="#events-Events-MutationNameEvent-prevNodeName"><code>MutationNameEvent.prevNodeName</code></a>.<br /></dd>
-</dl></div></div>
- <!-- parameters -->
- <div><strong>No Return Value</strong></div>
-
- <div><strong>No Exceptions</strong></div>
- </div>
+ <div class="method">
+ <p>Initializes attributes of a <code>MutationNameEvent</code> object. This method has the same behavior as <a href="#events-event-type-initMutationEvent"><code>MutationEvent.initMutationEvent()</code></a>.</p>
+ <div class="parameters">
+ <strong>Parameters</strong>
+ <div class="paramtable">
+ <dl>
+ <dt><code class="parameter-name">typeArg</code> of type <code>DOMString</code></dt>
+ <dd><p>Refer to the <a href="#events-event-type-initMutationEvent"><code>MutationEvent.initMutationEvent()</code></a> method for a description of this parameter.</p></dd>
+
+ <dt><code class="parameter-name">canBubbleArg</code> of type <code>boolean</code></dt>
+ <dd><p>Refer to the <a href="#events-event-type-initMutationEvent"><code>MutationEvent.initMutationEvent()</code></a> method for a description of this parameter.</p></dd>
+
+ <dt><code class="parameter-name">cancelableArg</code> of type <code>boolean</code></dt>
+ <dd><p>Refer to the <a href="#events-event-type-initMutationEvent"><code>MutationEvent.initMutationEvent()</code></a> method for a description of this parameter.</p></dd>
+
+ <dt><code class="parameter-name">relatedNodeArg</code> of type <code>Node</code></dt>
+ <dd><p>Refer to the <a href="#events-event-type-initMutationEvent"><code>MutationEvent.initMutationEvent()</code></a> method for a description of this parameter.</p></dd>
+
+ <dt><code class="parameter-name">prevNamespaceURIArg</code> of type <code>DOMString</code></dt>
+ <dd><p>Specifies <a href="#events-Events-MutationNameEvent-prevNamespaceURI"><code>MutationNameEvent.prevNamespaceURI</code></a>. This value may be <code>null</code>.</p></dd>
+
+ <dt><code class="parameter-name">prevNodeNameArg</code> of type <code>DOMString</code></dt>
+ <dd><p>Specifies <a href="#events-Events-MutationNameEvent-prevNodeName"><code>MutationNameEvent.prevNodeName</code></a>.</p></dd>
+ </dl>
+ </div>
+ </div>
+ <!-- parameters -->
+ <div><strong>No Return Value</strong></div>
+
+ <div><strong>No Exceptions</strong></div>
+ </div>
<!-- method -->
</dd>
</dl>
@@ -4029,7 +4302,7 @@
<tr class="assert must"><th>Context info</th><td><a href="#events-Events-MutationNameEvent-prevNamespaceURI"><code>MutationNameEvent.prevNamespaceURI</code></a>, and <a href="#events-Events-MutationNameEvent-prevNodeName"><code>MutationNameEvent.prevNodeName</code></a> are in use.</td></tr>
</table>
<p>A <a class="def" href="#glossary-user-agent">user agent</a> must dispatch this event after the <code>namespaceURI</code> and/or the <code>nodeName</code> of an <code>Element</code> node have been modified (e.g., the element was renamed using <code>Document.renameNode()</code>). The <a class="def" href="#glossary-proximal-event-target">proximal event target</a> of this event shall be the renamed <code>Element</code> node.</p>
- <p class="warning"><strong>Warning!</strong> the <a class="eventtype" href="#event-type-DOMElementNameChanged"><code>DOMElementNameChanged</code></a> event type is defined in this specification for reference and completeness, but this specification <a class="def" href="#glossary-deprecated">deprecates</a> the use of this event type.</p>
+ <p class="warning" id=""><strong>Warning!</strong> the <a class="eventtype" href="#event-type-DOMElementNameChanged"><code>DOMElementNameChanged</code></a> event type is defined in this specification for reference and completeness, but this specification <a class="def" href="#glossary-deprecated">deprecates</a> the use of this event type.</p>
</dd>
</dl>
</div>
@@ -4052,7 +4325,7 @@
<tr class="assert must"><th>Context info</th><td><a href="#events-Events-MutationNameEvent-prevNamespaceURI"><code>MutationNameEvent.prevNamespaceURI</code></a>, and <a href="#events-Events-MutationNameEvent-prevNodeName"><code>MutationNameEvent.prevNodeName</code></a> are in use. The value of <a href="#events-Events-MutationEvent-relatedNode"><code>MutationEvent.relatedNode</code></a> contains the renamed <code>Attr</code> node.</td></tr>
</table>
<p>A <a class="def" href="#glossary-user-agent">user agent</a> must dispatch this event after the <code>namespaceURI</code> and/or the <code>nodeName</code> of a <code>Attr</code> node have been modified (e.g., the attribute was renamed using <code>Document.renameNode()</code>). The <a class="def" href="#glossary-proximal-event-target">proximal event target</a> of this event shall be the <code>Element</code> node whose <code>Attr</code> has been renamed.</p>
- <p class="warning"><strong>Warning!</strong> the <a class="eventtype" href="#event-type-DOMAttributeNameChanged"><code>DOMAttributeNameChanged</code></a> event type is defined in this specification for reference and completeness, but this specification <a class="def" href="#glossary-deprecated">deprecates</a> the use of this event type.</p>
+ <p class="warning" id=""><strong>Warning!</strong> the <a class="eventtype" href="#event-type-DOMAttributeNameChanged"><code>DOMAttributeNameChanged</code></a> event type is defined in this specification for reference and completeness, but this specification <a class="def" href="#glossary-deprecated">deprecates</a> the use of this event type.</p>
</dd>
</dl>
</div>
@@ -4070,7 +4343,7 @@
<li>Relations between keyboard events, their default actions, and text events.</li>
<li>The set of key values, and guidelines on how to extend this set.</li>
</ul>
- <p class="note"><strong>Note:</strong> This section uses Serbian and Kanji characters which are not always available (or are misrepresented) in the alternative versions or printed versions of this specification.</p>
+ <p class="note" id=""><strong>Note:</strong> This section uses Serbian and Kanji characters which are not always available (or are misrepresented) in the alternative versions or printed versions of this specification.</p>
<div>
<h3><a id="keyboard-input" href="#keyboard-input">6.1 Keyboard Input</a></h3>
@@ -4094,11 +4367,11 @@
<p>As with the key labels, the physical layout of the keys on the keyboard does not not affect the digital key value for any given key. It is outside the scope of this specification to provide key values based on keyboard layout, particularly since there are so many possible layouts for a keyboard, and since users can change the mapping of keys in their operating system, e.g. by selecting a Dvorak key mapping.</p>
<p>To illustrate the concept of keyboard layout mappings and its relation with keyboard events and key values, on the same keyboard (a PC/AT US keyboard), pressing the key labeled <code>Q</code> (with no modifier key activated) will produce different key values based on the mapping. With a typical US <a class="def" href="#glossary-qwerty">QWERTY</a> keyboard layout mapping, it will produce <code class="value">'q'</code> (<code class="value">'\u0071'</code>, Latin Small Letter Q). If the keyboard layout mapping is switched to a French mapping, pressing the same key will produce <code class="value">'a'</code> (<code class="value">'\u0041'</code>, Latin Capital Letter A). If the keyboard layout mapping is switched to a Serbian (Cyrillic) mapping, pressing the same key will produce <code class="value">'љ'</code> (<code class="value">'\u0459'</code>, Cyrillic Small Letter LJE).</p>
<p>However, the physical layout of the keys may be of interest to authors developing games or other applications wherein the location of the keys has an ergonomic relationship as the desired user interface controls, with little or no attention paid to the representational value of the key itself. For example, many games may use the keys <code class="value">'A'</code>, <code class="value">'S'</code>, <code class="value">'D'</code>, and <code class="value">'W'</code> for <code class="value">'left'</code>, <code class="value">'down'</code>, <code class="value">'right'</code>, and <code class="value">'up'</code> respectively. Authors should provide a means for the user to assign such controller keys to a custom setting appropriate to their keyboard configurations. Implementations may provide a means for the user to more comprehensively map the keyboard to their customized keyboard layout, but this is beyond the scope of this specification.</p>
- <p class="note"><strong>Note:</strong> Key values should not be confused with <em>scan codes</em>, which are the low-level hexadecimal signals produced for each key by the keyboard driver software, and which are mapped at the operating system to a <acronym title="Virtual Key">VK</acronym> ("virtual key"), which in turn may be mapped to the user-defined key configuration. Key values are a high-level abstraction of that final mapping.</p>
+ <p class="note" id=""><strong>Note:</strong> Key values should not be confused with <em>scan codes</em>, which are the low-level hexadecimal signals produced for each key by the keyboard driver software, and which are mapped at the operating system to a <acronym title="Virtual Key">VK</acronym> ("virtual key"), which in turn may be mapped to the user-defined key configuration. Key values are a high-level abstraction of that final mapping.</p>
<h5><a id="keyboard-desktop" href="#keyboard-desktop">6.1.2.1 Desktop and Laptop Keyboards</a></h5>
<p>In the case where an author wishes to rely on the mechanical layout of a desktop or laptop keyboard, this specification suggests the keyboard configuration specified in ISO/IEC 9995, parts 2 and 3 [<cite><a class="informative" href="#references-ISO-9995-2-3">ISO-9995-2/3</a></cite>], which defines a common layout for primary, secondary, and auxiliary key mappings on a typical alphanumeric keyboard, as a common layout appropriate to some international uses.</p>
- <p class="note"><strong>Note:</strong> This keyboard layout is still, in essence, a <a class="def" href="#glossary-qwerty">QWERTY</a> keyboard, and will not match the keyboards or configurations of many users. Authors cannot rely upon any particular configuration, and should create content in an internationalized and localizable manner.</p>
+ <p class="note" id=""><strong>Note:</strong> This keyboard layout is still, in essence, a <a class="def" href="#glossary-qwerty">QWERTY</a> keyboard, and will not match the keyboards or configurations of many users. Authors cannot rely upon any particular configuration, and should create content in an internationalized and localizable manner.</p>
<div class="figure" style="text-align: center">
<object type="image/svg+xml" data="images/ISOIEC-9995-3-FCD-2009A.svg" width="900" height="300">
<img src="images/ISOIEC-9995-3-FCD-2009A.png" alt="A graphical depiction of an ISO standard defining layouts of computer keyboards, ISO/IEC 9995, parts 2 and 3" />
@@ -4110,7 +4383,7 @@
<h5><a id="keyboard-mobile" href="#keyboard-mobile">6.1.2.2 Mobile Keypads</a></h5>
<p>In the case where an author wishes to rely on the mechanical layout of a mobile keypad, this specification suggests the keyboard configuration specified in ISO/IEC 9995-8:2006 [<cite><a class="informative" href="#references-ISO-9995-8">ISO-9995-8</a></cite>], which defines a numeric keypad layout and secondary assignment of Unicode characters in the range <abbr title="a-z">\u0061..\u007A</abbr> to the number keys <code>2</code> through <code>9</code>, as a common layout appropriate to some international uses.</p>
- <p class="note"><strong>Note:</strong> This keypad layout, and in particular the distribution of letters is for Western devices, and will not match the keypads or configurations of many users. Authors cannot rely upon any particular configuration, and should create content in an internationalized and localizable manner.</p>
+ <p class="note" id=""><strong>Note:</strong> This keypad layout, and in particular the distribution of letters is for Western devices, and will not match the keypads or configurations of many users. Authors cannot rely upon any particular configuration, and should create content in an internationalized and localizable manner.</p>
<div class="figure" style="text-align: center">
<object type="image/svg+xml" data="images/ISOIEC-9995-8-2006.svg" width="180" height="240">
<img src="images/ISOIEC-9995-8-2006.png" alt="A graphical depiction of an ISO standard defining layouts of numeric keypads, with distribution of letters on the keys, ISO/IEC 9995-8:2006" />
@@ -4128,7 +4401,7 @@
<p>Key values can be used to detect the value of a key which has been pressed, using the <a href="#events-Events-KeyboardEvent-key"><code>KeyboardEvent.key</code></a> attribute. Authors can retrieve the <a class="def" href="#glossary-character-value">character value</a> of upper- or lower-case letters, number, symbols, or other character-producing keys, and also the <a class="def" href="#glossary-key-name">key name</a> of control keys, modifier keys, function keys, or other keys that do not generate characters; these values can be used for monitoring particular input strings, for detecting and acting on modifier key input in combination with other inputs (such as a mouse), for creating virtual keyboards, or for any number of other purposes.</p>
<p>Key values can also be used by authors in string comparisons, as values for markup attributes (such as the HTML <code>accesskey</code>) in conforming <a class="def" href="#glossary-host-language">host languages</a>, or for other related purposes. A conforming <a class="def" href="#glossary-host-language">host language</a> should allow authors to use either of the two equivalent string values for a key value: the <a class="def" href="#glossary-character-value">character value</a>, or the <a class="def" href="#glossary-key-name">key name</a>.</p>
<p class="issue"><strong>Issue:</strong> mention that author should use case-insensitive matching to capture both "t" and "T" for hotkeys, etc.?</p>
- <p class="note"><strong>Note:</strong> While implementations are recommended to use the most relevant value for a key independently of the platform or keyboard layout mappings, authors should not make assumption on the ability of keyboard devices to generate them. When using keyboard events and key values for shortcut-key combinations, authors should <q>consider using numbers and function keys (F4, F5, and so on) instead of letters</q> ([<cite><a class="informative" href="#references-DWW95">DWW95</a></cite>]) given that most keyboard layouts will provide keys for those.</p>
+ <p class="note" id=""><strong>Note:</strong> While implementations are recommended to use the most relevant value for a key independently of the platform or keyboard layout mappings, authors should not make assumption on the ability of keyboard devices to generate them. When using keyboard events and key values for shortcut-key combinations, authors should <q>consider using numbers and function keys (F4, F5, and so on) instead of letters</q> ([<cite><a class="informative" href="#references-DWW95">DWW95</a></cite>]) given that most keyboard layouts will provide keys for those.</p>
<!-- , and where the key used should default to the most appropriate key for the function, language, operating system, device, and other environmental factors (such as <code>ctrl+c</code> for copy operations) -->
<p>It is important to note that a key value does not indicate a specific key on the physical keyboard, nor does it reflect the character printed on the key; a key value indicates the current value of the event with consideration to the current state of all active keys and key input modes (including shift modes and <a class="def" href="#glossary-dead-key">dead keys</a>), as reflected in the operating-system mapping of the keyboard and reported to the implementation. In other words, the key value for the key marked <code>'O'</code> on a <a class="def" href="#glossary-qwerty">QWERTY</a> keyboard has the key value <code>'o'</code> in an unshifted state, <code>'O'</code> in a shifted state, <code>'ö'</code> in an unshifted state during a dead-key operation to add an umlaut diacritic, and <code>'Ö'</code> in a shifted state during a dead-key operation to add an umlaut diacritic. Because a user may map their keyboard to an arbitrary custom configuration, the author should not assume that a relationship exists between the shifted and unshifted states of a key and the majuscule form (uppercase or capital letters) and minuscule form (lowercase or small letters) of a character representation, but should instead use the value of the <a href="#events-Events-KeyboardEvent-key"><code>KeyboardEvent.key</code></a> attribute. The keyboard depicted in Figure 3 illustrates one possible set of key mappings on one possible keyboard layout; many others exist, both standard and idiosyncratic.</p>
<p>It is also important to note that there is not a one-to-one relationship between key event states and key values. A particular key value may be associated with multiple keys; for example, many standard keyboards contain more than one key with the <code class="value">'Shift'</code> key value (normally distinguished by the <a href="#events-Events-KeyboardEvent-location"><code>KeyboardEvent.location</code></a> values <a href="#events-DOM_KEY_LOCATION_LEFT"><code class="constant-name">DOM_KEY_LOCATION_LEFT</code></a> and <a href="#events-DOM_KEY_LOCATION_RIGHT"><code class="constant-name">DOM_KEY_LOCATION_RIGHT</code></a>) or <code class="value">'8'</code> key value (normally distinguished by the <a href="#events-Events-KeyboardEvent-location"><code>KeyboardEvent.location</code></a> values <a href="#events-DOM_KEY_LOCATION_STANDARD"><code class="constant-name">DOM_KEY_LOCATION_STANDARD</code></a> and <a href="#events-DOM_KEY_LOCATION_NUMPAD"><code class="constant-name">DOM_KEY_LOCATION_NUMPAD</code></a>), and user-configured custom keyboard layouts may duplicate any key value in multiple key-state scenarios (note that <a href="#events-Events-KeyboardEvent-location"><code>KeyboardEvent.location</code></a> is intended for standard keyboard layouts, and cannot always indicate a meaningful distinction).</p>
@@ -4264,7 +4537,7 @@
<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-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 市 (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">'\u0020'</code> (Space key) and <code class="value">'Enter'</code>. <span class="note"><strong>Note:</strong><code class="value">'詩'</code> ("poem") and <code class="value">'市'</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 市 (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">'\u0020'</code> (Space key) and <code class="value">'Enter'</code>. <span class="note" id=""><strong>Note:</strong><code class="value">'詩'</code> ("poem") and <code class="value">'市'</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>
@@ -4376,7 +4649,7 @@
<div>
<h4><a id="keyset-Guide" href="#keyset-Guide">6.2.6 Guidelines for selecting and defining key values</a></h4>
- <p class="note"><strong>Note:</strong> This section is normative.</p>
+ <p class="note" id=""><strong>Note:</strong> This section is normative.</p>
<p>The list of key values contained in this specification is not exhaustive and input devices may have to define their own key values. Here is a algorithm to determine which key value to use:</p>
<ol>
<li>Consider the current function of the key (i.e., with modifiers), taking into consideration the keyboard layout mapping in use, to determine if the key is represented by the set of defined key values, if a corresponding Unicode character exists from which a key value may be derived, or if a new key value must be defined.
@@ -4413,7 +4686,7 @@
<p>This section defines a list of key values which implementations must support, at a minimum; implementations may support additional key values, in a manner conforming to the <a href="#keyset-Guide">guidelines for selecting and defining key values</a>. Each key value defines one or both of the following: a <a class="def" href="#glossary-character-value">character value</a> and a <a class="def" href="#glossary-key-name">key name</a>. The <a href="#events-Events-KeyboardEvent-key"><code>KeyboardEvent.key</code></a> attribute of an event must always be the most author-friendly of these available, in the following order: <a class="def codepoint" href="#glossary-character-value">character value</a>, or <a class="def keyname" href="#glossary-key-name">key name</a>. Future versions of this specification may include key values not included here, which have become common since the publication of this specification.</p>
<p>The <a class="def" href="#glossary-key-name">key names</a> defined in this specification are based on the sets of keycodes from the <code>java.awt.event.KeyEvent</code> interface of the Java Platform, Standard Edition 6 API Specification [<cite><a class="informative" href="#references-KeyEvent">KeyEvent for Java</a></cite>], and the <code>System.Windows.Forms.Keys</code> key enumeration of the Microsoft .NET Framework 4.0 Class Library [<cite><a class="informative" href="#references-Keys">Keys enumeration for .Net</a></cite>]. The <a class="def" href="#glossary-character-value">character values</a> defined in this specification are derived from the Unicode standard [<a href="#references-Unicode">Unicode</a>].</p>
- <p class="note"><strong>Note:</strong> The key names <code class="value">'NumPad0'</code>, <code class="value">'NumPad1'</code>, <code class="value">'NumPad2'</code>, <code class="value">'NumPad3'</code>, <code class="value">'NumPad4'</code>, <code class="value">'NumPad5'</code>, <code class="value">'NumPad6'</code>, <code class="value">'NumPad7'</code>, <code class="value">'NumPad8'</code>, and <code class="value">'NumPad9'</code>, found in some keyboard enumeration sets, are not distinguished from other numerical key values in this set; an author may use the <a href="#events-Events-KeyboardEvent-location"><code>KeyboardEvent.location</code></a> attribute to discover if a key originated from the numeric keypad.</p>
+ <p class="note" id=""><strong>Note:</strong> The key names <code class="value">'NumPad0'</code>, <code class="value">'NumPad1'</code>, <code class="value">'NumPad2'</code>, <code class="value">'NumPad3'</code>, <code class="value">'NumPad4'</code>, <code class="value">'NumPad5'</code>, <code class="value">'NumPad6'</code>, <code class="value">'NumPad7'</code>, <code class="value">'NumPad8'</code>, and <code class="value">'NumPad9'</code>, found in some keyboard enumeration sets, are not distinguished from other numerical key values in this set; an author may use the <a href="#events-Events-KeyboardEvent-location"><code>KeyboardEvent.location</code></a> attribute to discover if a key originated from the numeric keypad.</p>
<!-- <p>Javascript escaped characters may have issues because they are based on UTF-16 encoding, in that it uses surrogate pairs for values outside the Basic Multilingual Plane.</p> -->
<div id="js-escape" class="issue">
<p><strong>Issue:</strong> Javascript escaped characters may have issues:</p>
@@ -4423,7 +4696,7 @@
<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>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</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>
+ <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" id=""><strong>Note:</strong> 𣧂 is a Chinese character meaning "untidy".</span></li>
</ul>
</div>
<dl id="key-value-set">
@@ -4528,7 +4801,7 @@
<dt><a id="key-Enter"><code class="value keyname">'Enter'</code></a></dt>
<dd>The Enter key.
- <span class="note"><strong>Note:</strong> This key value shall be also used for the Return (Macintosh numpad) key.</span>
+ <span class="note" id=""><strong>Note:</strong> This key value shall be also used for the Return (Macintosh numpad) key.</span>
</dd>
<dt><a id="key-EraseEof"><code class="value keyname">'EraseEof'</code></a></dt>
@@ -4683,7 +4956,7 @@
<dt><a id="key-Meta"><code class="value keyname">'Meta'</code></a></dt>
<dd>The Meta key.
- <span class="note"><strong>Note:</strong> This key value shall be also used for the Return (Macintosh numpad) key.</span>
+ <span class="note" id=""><strong>Note:</strong> This key value shall be also used for the Return (Macintosh numpad) key.</span>
</dd>
<dt><a id="key-MediaNextTrack"><code class="value keyname">'MediaNextTrack'</code></a></dt>
@@ -4727,7 +5000,7 @@
<dt><a id="key-Power"><code class="value keyname">'Power'</code></a></dt>
<dd>The Power key.
- <span class="note"><strong>Note:</strong> Some devices may not expose this key to the operating environment.</span>
+ <span class="note" id=""><strong>Note:</strong> Some devices may not expose this key to the operating environment.</span>
</dd>
<dt><a id="key-PreviousCandidate"><code class="value keyname">'PreviousCandidate'</code></a></dt>
@@ -4811,7 +5084,7 @@
<dt><a id="key-U-0008"><code class="value codepoint">'\u0008'</code></a></dt>
<dt><a id="key-Backspace"><code class="value keyname">'Backspace'</code></a></dt>
<dd>The Backspace (Back) key.
- <span class="note"><strong>Note:</strong> This key value shall be also used for the key labeled <code class="value">'delete'</code> MacOS keyboards when not modified by the <code class="value">'Fn'</code> key.</span>
+ <span class="note" id=""><strong>Note:</strong> This key value shall be also used for the key labeled <code class="value">'delete'</code> MacOS keyboards when not modified by the <code class="value">'Fn'</code> key.</span>
</dd>
<dt><a id="key-U-0009"><code class="value codepoint">'\u0009'</code></a></dt>
@@ -5217,7 +5490,7 @@
<dt><a id="key-U-007F"><code class="value codepoint">'\u007F'</code></a></dt>
<dt><a id="key-Del"><code class="value keyname">'Del'</code></a></dt>
<dd>The Delete (Del) Key.
- <span class="note"><strong>Note:</strong> This key value shall be also used for the key labeled <code class="value">'delete'</code> MacOS keyboards when modified by the <code class="value">'Fn'</code> key.</span>
+ <span class="note" id=""><strong>Note:</strong> This key value shall be also used for the key labeled <code class="value">'delete'</code> MacOS keyboards when modified by the <code class="value">'Fn'</code> key.</span>
</dd>
<dt><a id="key-U-0300"><code class="value codepoint">'\u0300'</code></a></dt>
@@ -5285,7 +5558,7 @@
<dd>The Combining Katakana-Hiragana Semi-Voiced Sound Mark (Dead Semivoiced Sound) key.</dd>
<dt><a id="key-Unidentified"><code class="value keyname">'Unidentified'</code></a></dt>
- <dd>This key value is used when an implementations is unable to identify another key value, due to either hardware, platform, or software constraints. <span class="warning"><strong>Warning!</strong> Conforming implementation must only use this key value when there is no way for the implementation to detect the key value, and does not indicate a conforming implementation by itself.</span></dd>
+ <dd>This key value is used when an implementations is unable to identify another key value, due to either hardware, platform, or software constraints. <span class="warning" id=""><strong>Warning!</strong> Conforming implementation must only use this key value when there is no way for the implementation to detect the key value, and does not indicate a conforming implementation by itself.</span></dd>
</dl>
</div>
@@ -5293,7 +5566,7 @@
<div>
<h4><a id="keyset-keyCode-charCode" href="#keyset-keyCode-charCode">6.2.8 Key values, keyCode, and charCode</a></h4>
- <p class="note"><strong>Note:</strong> This section is non-normative.</p>
+ <p class="note" id=""><strong>Note:</strong> This section is non-normative.</p>
<p>Browser support for keyboards has traditionally relied on two ad-hoc attributes, <code class="attr-name">keyCode</code>, and <code class="attr-name">charCode</code>. The values for these attributes, and the availability of the attribute, is inconsistent across platforms, keyboard languages and layouts, <a class="def" href="#glossary-user-agent">user agents</a>, versions, and even event types. A significant amount of legacy content, including script libraries, relies upon detecting the <a class="def" href="#glossary-user-agent">user agent</a> and acting accordingly, and any changes to <code class="attr-name">keyCode</code>, or <code class="attr-name">charCode</code> risk breaking as much content as they fix or enable. Additionally, these attributes are not suitable for international usage, or accessibility concerns. Therefore, this specification does not normatively define the <code class="attr-name">keyCode</code>, and <code class="attr-name">charCode</code> attributes, relying instead only on the more robust key values, which can be used safely and consistently in any <a class="def" href="#glossary-user-agent">user agent</a> which conforms to this specification. However, for the purpose of documenting the current state of these attributes and their relation to equivalent key values, this specification contains the following table, which is to be used as an informative reference only, and does not document the full range of values for <code class="attr-name">keyCode</code>, and <code class="attr-name">charCode</code>.</p>
@@ -6407,7 +6680,7 @@
<p>Many of the event types defined in this specification are dispatched in response to user actions. This allows malicious event listeners to gain access to information users would typically consider confidential, e.g., typos they might have made when filling out a form, if they reconsider their answer to a multiple choice question shortly before submitting a form, their typing rate or primary input mechanism. In the worst case, malicious event listeners are able to capture all user interactions and submit them to a third party through means, while not defined in DOM Level 3 Events, generally available in DOM implementations, such as the XMLHttpRequest interface.</p>
<p>In DOM implementations that support facilities to load external data, events like the <code>error</code> event can provide access to sensitive information about the environment of the computer system or network; an example would be a malicious HTML document that attempts to embed a resource on the local network or the localhost on different ports; an embedded <a class="def" href="#glossary-DOM-application">DOM application</a> could then listen for <code>error</code> and <code>load</code> events to determine which other computers in a network are accessible from the local system or which ports are open on the system to prepare further attacks.</p>
<p>An implementation of DOM Level 3 Events alone is generally insufficient to perform attacks of this kind and the security considerations of the facilities that possibly support such attacks apply. For conformance with this specification, DOM implementations may take reasonable steps to ensure that <a class="def" href="#glossary-DOM-application">DOM applications</a> do not get access to confidential or sensitive information, for example, they may choose to dispatch no <code>load</code> events to nodes that attempt to embed resources on the local network.</p>
- <p>The <a href="#events-Events-DocumentEvent-canDispatch"><code>DocumentEvent.canDispatch()</code></a> method allows authors to retrieve information about which event types the implementation supports, including event types not defined in this specification. Which event types a DOM Level 3 Events implementation supports can depend on configuration settings or on additional software modules available to the implementation.</p>
+ <p>The <a href="http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-5CED94D7"><code>DOMImplementation.hasFeature()</code></a> method allows authors to retrieve information about which event types the implementation supports, including event types not defined in this specification. Which event types a DOM Level 3 Events implementation supports can depend on configuration settings or on additional software modules available to the implementation.</p>
</div>
<!-- div1 Security -->
<div>