added first draft of trusted events, removed new interface-specific initialization methods, made event initialization more streamlined
authorschepers
Tue, 26 Jan 2010 18:25:36 +0900
changeset 229 e59bfc922a58
parent 228 b7550e1ab352
child 230 3cf997f331d7
added first draft of trusted events, removed new interface-specific initialization methods, made event initialization more streamlined
html/DOM3-Events.html
--- a/html/DOM3-Events.html	Tue Jan 26 18:23:06 2010 +0900
+++ b/html/DOM3-Events.html	Tue Jan 26 18:25:36 2010 +0900
@@ -24,11 +24,11 @@
       </p>
       <h1 id="Overview-title">Document Object Model (DOM) Level 3 Events Specification</h1>
 <!-- @@@ -->
-      <h2 id="Overview-W3C-doctype">W3C Editor's Draft <time datetime="2009-12-14">20 January 2009</time></h2>
+      <h2 id="Overview-W3C-doctype">W3C Editor's Draft <time datetime="2010-01-26">26 January 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.111">http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html?rev=1.111</a>
+          <a href="http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html?rev=1.112">http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html?rev=1.112</a>
         </dd>
         <dt>Latest stable version:</dt>
         <dd>
@@ -36,7 +36,7 @@
         </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.110">http://dev.w3.org/cvsweb/~checkout~/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html?rev=1.110</a>
+          <a href="http://dev.w3.org/cvsweb/~checkout~/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html?rev=1.111">http://dev.w3.org/cvsweb/~checkout~/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html?rev=1.111</a>
         </dd>
         <dt>Editor's Draft:</dt>
         <dd>
@@ -137,7 +137,10 @@
             <a href="#sync-async">3.3 Synchronous and asynchronous events</a>
           </li>
           <li>
-            <a href="#event-flow-activation">3.3 Activation requests and behavior</a>
+            <a href="#trusted-events">3.4 Trusted events</a>
+          </li>
+          <li>
+            <a href="#event-flow-activation">3.5 Activation requests and behavior</a>
           </li>
         </ul>
       </li>
@@ -500,7 +503,7 @@
                 <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>
               </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>KeyboardEvents</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.KeyboardEvents</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"><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>
@@ -724,7 +727,7 @@
       
       
 
-<!-- div2 Events-flow-cancelation -->
+<!-- div2 sync-async -->
       <div class="div2">
         <h3 class="div2"><a id="sync-async" href="#sync-async">3.3 Synchronous and asynchronous events</a></h3>
         <p>Events may occur either synchronously (sync) or asynchronously (async).</p> 
@@ -737,9 +740,22 @@
         <p class="example" id="example-async"><strong>Example:</strong> <i class="note"><strong>To Do:</strong> Create good example of async events.</i></p>
       </div>
 
+
+<!-- div2 sync-async -->
+      <div class="div2">
+        <h3 class="div2"><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, or modified using the <a href="#events-event-type-initEvent"><code>Event.initEvent()</code></a> method.</p> 
+
+      </div>
+
+
+
+
+
+
 <!-- div2 Events-flow-cancelation -->
       <div class="div2">
-        <h3 class="div2"><a id="event-flow-activation" href="#event-flow-activation">3.4 Activation requests and behavior</a></h3>
+        <h3 class="div2"><a id="event-flow-activation" href="#event-flow-activation">3.5 Activation requests and behavior</a></h3>
         <p class="note" id="activation-rewritten"><strong>Note:</strong> This section is currently being rewritten.</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, and this section will be revised to reflect this.</p>
         <p>Event targets may have associated <a class="def" href="#glossary-activation-behavior">activation behavior</a> that implementations perform in response to an <em>activation request</em>. As an example, the typical activation behavior associated with hyperlinks is to follow the link. Activation requests are typically initiated by users through an input device.</p>
@@ -820,9 +836,9 @@
 interface <a class="noxref" href="#events-Events-Event">Event</a> {
 
   // PhaseType
-  const unsigned short      <a class="noxref" href="#events-CAPTURING_PHASE">CAPTURING_PHASE</a>                = 1;
-  const unsigned short      <a class="noxref" href="#events-AT_TARGET">AT_TARGET</a>                      = 2;
-  const unsigned short      <a class="noxref" href="#events-BUBBLING_PHASE">BUBBLING_PHASE</a>                 = 3;
+  const unsigned short               <a class="noxref" href="#events-CAPTURING_PHASE">CAPTURING_PHASE</a>      = 1;
+  const unsigned short               <a class="noxref" href="#events-AT_TARGET">AT_TARGET</a>            = 2;
+  const unsigned short               <a class="noxref" href="#events-BUBBLING_PHASE">BUBBLING_PHASE</a>       = 3;
 
   readonly attribute DOMString       <a class="noxref" href="#events-event-type-type">type</a>;
   readonly attribute <a class="noxref" href="#events-Events-EventTarget">EventTarget</a>     <a class="noxref" href="#events-event-type-target">target</a>;
@@ -831,15 +847,17 @@
   readonly attribute boolean         <a class="noxref" href="#events-event-type-canBubble">bubbles</a>;
   readonly attribute boolean         <a class="noxref" href="#events-event-type-canCancel">cancelable</a>;
   readonly attribute DOMTimeStamp    <a class="noxref" href="#events-event-type-timeStamp">timeStamp</a>;
-  void               <a class="noxref" href="#events-event-type-stopPropagation">stopPropagation</a>();
-  void               <a class="noxref" href="#events-event-type-preventDefault">preventDefault</a>();
-  void               <a class="noxref" href="#events-event-type-initEvent">initEvent</a>(in DOMString eventTypeArg, 
-                               in boolean canBubbleArg, 
-                               in boolean cancelableArg);
+  void                               <a class="noxref" href="#events-event-type-stopPropagation">stopPropagation</a>();
+  void                               <a class="noxref" href="#events-event-type-preventDefault">preventDefault</a>();
+  void                               <a class="noxref" href="#events-event-type-initEvent">initEvent</a>(in DOMString eventTypeArg, 
+                                               in boolean canBubbleArg, 
+                                               in boolean cancelableArg);
   // Introduced in DOM Level 3:
-  void               <a class="noxref" href="#events-event-type-stopImmediatePropagation">stopImmediatePropagation</a>();
+  void                               <a class="noxref" href="#events-event-type-stopImmediatePropagation">stopImmediatePropagation</a>();
   // Introduced in DOM Level 3:
   readonly attribute boolean         <a class="noxref" href="#events-event-type-defaultPrevented">defaultPrevented</a>;
+  // Introduced in DOM Level 3:
+  readonly attribute boolean         <a class="noxref" href="#events-event-type-trusted">trusted</a>;
 };
 </pre>
                 </div>
@@ -889,8 +907,13 @@
                   <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-cancelation">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>
                   <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>
+
                   <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>
+
+                  <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 user agent (trusted) or by script (untrusted).  See <a href="#trusted-events">trusted events</a> for more details.<br /></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>
                   <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>
@@ -912,9 +935,12 @@
                     </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 />
+                    <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="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>
+                      <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>
                       <!-- parameters -->
                       <div><strong>No Return Value</strong></div>
                       <div><strong>No Exceptions</strong></div>
@@ -970,6 +996,7 @@
           <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>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 class="noxref" 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 />
@@ -1254,6 +1281,7 @@
   const unsigned long       <a class="noxref" href="#events-DOM_KEY_FORMAT_UNICODE">DOM_KEY_FORMAT_UNICODE</a>        = 0x02;
   const unsigned long       <a class="noxref" href="#events-DOM_KEY_FORMAT_ENTITY">DOM_KEY_FORMAT_ENTITY</a>         = 0x03;
 
+  // Modified in DOM Level 3:
   <a class="noxref" href="#events-Events-Event">Event</a>              <a class="noxref" href="#events-Events-DocumentEvent-createEvent">createEvent</a>(in DOMString eventType)
                                         raises(DOMException);
 <div class="proposal">
@@ -1331,7 +1359,37 @@
                     </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">eventType</code> of type <code>DOMString</code></dt><dd><p>The <code>eventType</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>As an example, a user 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-initUIEventNS"><code>UIEvent.initUIEventNS()</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-DOMActivate"><code>DOMActivate</code></a> for example, and set its context information, e.g. <a href="#events-Events-UIEvent-detail"><code>UIEvent.detail</code></a> in this example.</p><p>For backward compatibility reason, "UIEvents", "MouseEvents", "MutationEvents", and "HTMLEvents" feature names are valid values for the parameter <code>eventType</code> and represent respectively the interfaces "UIEvent", "MouseEvent", "MutationEvent", and "Event", and the characters 'a'..'z' are considered equivalent to the characters 'A'..'Z'.<br /></p></dd></dl></div></div>
+                        <div class="parameters">
+                          <strong>Parameters</strong>
+                          <div class="paramtable">
+                            <dl>
+                              <dt><code class="parameter-name">eventType</code> of type <code>DOMString</code></dt>
+                              <dd>
+                                <p>The <code>eventType</code> parameter specifies the name of a DOM Events <a class="def" href="#glossary-event-type">event type</a> (e.g. <a class="eventtype" href="#event-type-click"><code>click</code></a>, ), or a DOM Events interface (e.g. <a href="#interface-Event"><code>Event</code></a>, <a href="#events-Events-MouseEvent"><code>MouseEvent</code></a>, <a href="#events-Events-MutationEvent"><code>MutationEvent</code></a>) to be supported by the created event object.</p>
+                                
+                                <p>If the parameter string matches an <a class="def" href="#glossary-event-type">event type</a> supported by the implementation (e.g. <code>"click"</code>), then an <a href="#events-Events-Event"><code>Event</code></a> is created and initialized with the appropriate event interface (e.g. <a href="#events-Events-MouseEvent"><code>MouseEvent</code></a>) and <a class="def" href="#glossary-event-type">event type</a> (e.g. <a class="eventtype" href="#event-type-click"><code>click</code></a>).</p>
+                                
+                                <p>If the parameter string does not match an <a class="def" href="#glossary-event-type">event type</a> supported by the implementation (e.g. <code>"click"</code>), but does match an interface name supported by the implementation, then an <a href="#events-Events-Event"><code>Event</code></a> is created and initialized with the appropriate event interface (e.g. <a href="#events-Events-MouseEvent"><code>MouseEvent</code></a>).</p>
+                                
+                                <p>If the parameter does not match an <a class="def" href="#glossary-event-type">event type</a> or an interface name supported by the implementation, the implementation must raise a <code>NOT_SUPPORTED_ERR</code>  <code>DOMException</code></p>
+                                
+                                <p>After the creation of the <a href="#events-Events-Event"><code>Event</code></a> by the <a href="#events-Events-DocumentEvent-createEvent"><code>DocumentEvent.createEvent("Event")</code></a> method, but prior to the <a href="#events-Events-Event"><code>Event</code></a>'s dispatch via the <a href="#events-Events-EventTarget-dispatchEvent"><code>EventTarget.dispatchEvent()</code></a> method, the properties of the <a href="#events-Events-Event"><code>Event</code></a> must be writable, except the <a class="noxref" href="#events-event-type-trusted">trusted</a> property, which must be read-only and initialized to <code>false</code> by the implementation.  An author may initialize the <a href="#events-Events-Event"><code>Event</code></a> by directly setting the <a class="noxref" 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 the appropriate interface-specific event initialization method for that interface if one exists.  After the <a href="#events-Events-Event"><code>Event</code></a> has been dispatched via the <a href="#events-Events-EventTarget-dispatchEvent"><code>EventTarget.dispatchEvent()</code></a> method, the properties of the <a href="#events-Events-Event"><code>Event</code></a> must be read-only.</p>
+                                  
+
+                                <!-- 
+                                <p>As an example, a user 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-initUIEventNS"><code>UIEvent.initUIEventNS()</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-DOMActivate"><code>DOMActivate</code></a> for example, and set its context information, e.g. <a href="#events-Events-UIEvent-detail"><code>UIEvent.detail</code></a> in this example.</p> -->
+
+                                <!-- <p class="example" id="example-create-event-1"><strong>Example:</strong> a user 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-DOMActivate"><code>DOMActivate</code></a> for example, and set its context information, e.g. <a href="#events-Events-UIEvent-detail"><code>UIEvent.detail</code></a> in this example.</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>eventType</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 'a'..'z' are considered equivalent to the characters 'A'..'Z'.</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 -->
@@ -1404,8 +1462,10 @@
             </dd>
           </dl>
           <h4 class="div3"><a id="event-creation" href="#event-creation">4.5.1 Event creation</a></h4>
-          <p>In most cases, the events dispatched by the DOM Events implementation are also created by the implementation. It is however possible to simulate events such as mouse events by creating the <a href="#events-Events-Event"><code>Event</code></a> objects and dispatch them using the DOM Events implementation.</p>
-          <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 application must then initialize the object by calling the appropriate initialization method before invoking <a href="#events-Events-EventTarget-dispatchEvent"><code>EventTarget.dispatchEvent()</code></a>. The <a class="noxref" 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>In most cases, the events dispatched by the DOM Events implementation are also created by the implementation.  However, it is possible to simulate events, such as mouse events, by creating the <a href="#events-Events-Event"><code>Event</code></a> objects and dispatch them using the DOM Events implementation.</p>
+          <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 class="noxref" 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 class="noxref" 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></p>
         </div>
 <!-- div3 Events-document -->
       </div>
@@ -1420,7 +1480,8 @@
         <h4 class="div3"><a id="event-types-list" href="#event-types-list">5.1.1 List of DOM3 Event Types</a></h4>
         <p>Depending on the level of DOM support, or the devices used for display (e.g. screen) or interaction (e.g., mouse, keyboard, touch screen, or voice), these event types can be generated by the implementation. When used with an [<cite><a class="noxref informative" href="#references-XML">XML 1.0</a></cite>] or [<cite><a class="noxref informative" href="#references-HTML5">HTML5</a></cite>] application, the specifications of those languages may restrict the semantics and scope (in particular the possible <a class="def" href="#glossary-proximal-event-target">proximal event targets</a>) associated with an event type. Refer to the specification defining the language used in order to find those restrictions or to find event types that are not defined in this document.</p>
         <p>The following table provides a non-normative summary of the event types defined in this specification.  All events must accomplish the capture and target phases, but not all of them must accomplish the bubbling phase (see also <a href="#event-flow">Event dispatch and DOM event flow</a>). Some events are not <a href="#events-dt-cancelable-event">cancelable</a> (see <a href="#event-flow-cancelation">Default actions and cancelable events</a>). Some events must only be dispatched to a specific set of possible targets in the DOM event flow, specified using node types. Contextual information related to the event type must be accessible using DOM interfaces.</p>
-        <table border="1" cellpadding="2" cellspacing="0" summary="This table contains the complete list of event types defined by DOM Level 3 Events. The first column contains the local name of the event type. The second column indicates if the event accomplish the bubbling phase or not (all events accomplish the capture and target phases). The third column indicates if the default action associated with the event can be canceled. The fourth column indicates the nodes that can be target of the event. the fifth (and last) column indicates the DOM interface implemented by the event object.">
+        <table id="table-event-summary" summary="This table contains the complete list of event types defined by DOM Level 3 Events. The first column contains the local name of the event type. The second column indicates if the event accomplish the bubbling phase or not (all events accomplish the capture and target phases). The third column indicates if the default action associated with the event can be canceled. The fourth column indicates the nodes that can be target of the event. the fifth (and last) column indicates the DOM interface implemented by the event object.">
+           <!-- border="1" cellpadding="2" cellspacing="0"  -->
           <tr>
             <th>Event Type</th>
             <th>Sync / Async</th>
@@ -2322,13 +2383,12 @@
                 <pre>
   // Introduced in DOM Level 3:
   interface <a class="noxref" href="#events-Events-FocusEvent">FocusEvent</a> : <a class="noxref" href="#events-Events-UIEvent">UIEvent</a> {
-  readonly attribute <a class="noxref" href="#events-Events-EventTarget">EventTarget</a>     <a class="noxref" href="#events-Events-FocusEvent-relatedTarget">relatedTarget</a>;
-  void               <a class="noxref" 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 class="noxref" href="#events-Events-EventTarget">EventTarget</a> relatedTargetArg);
+    readonly attribute <a class="noxref" href="#events-Events-EventTarget">EventTarget</a>     <a class="noxref" href="#events-Events-FocusEvent-relatedTarget">relatedTarget</a>;<!--   void               <a class="noxref" 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 class="noxref" href="#events-Events-EventTarget">EventTarget</a> relatedTargetArg); -->
   };
   </pre>
               </div>
@@ -2346,7 +2406,8 @@
             <dt>
               <strong>Methods</strong>
             </dt>
-            <dd>
+            <dd>None</dd>
+            <!-- <dd>
               <dl>
                 <dt>
                   <code class="method-name">
@@ -2380,7 +2441,7 @@
 <!-- method -->
                 </dd>
               </dl>
-            </dd>
+            </dd> -->
           </dl>
         </dd>
       </dl>
@@ -2876,20 +2937,20 @@
                 <pre>
         // Introduced in DOM Level 3:
         interface <a class="noxref" href="#events-Events-MouseWheelEvent">MouseWheelEvent</a> : <a class="noxref" href="#events-Events-MouseEvent">MouseEvent</a> {
-        readonly attribute long            <a class="noxref" href="#events-Events-MouseWheelEvent-wheelDelta">wheelDelta</a>;
-        void               <a class="noxref" href="#events-event-type-initMouseWheelEvent">initMouseWheelEvent</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 class="noxref" href="#events-Events-EventTarget">EventTarget</a> relatedTargetArg, 
-                                             in DOMString modifiersListArg, 
-                                             in long wheelDeltaArg);
+          readonly attribute long            <a class="noxref" href="#events-Events-MouseWheelEvent-wheelDelta">wheelDelta</a>;<!-- 
+                  void               <a class="noxref" href="#events-event-type-initMouseWheelEvent">initMouseWheelEvent</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 class="noxref" href="#events-Events-EventTarget">EventTarget</a> relatedTargetArg, 
+                                                       in DOMString modifiersListArg, 
+                                                       in long wheelDeltaArg); -->
         };
         </pre>
               </div>
@@ -2907,7 +2968,8 @@
             <dt>
               <strong>Methods</strong>
             </dt>
-            <dd>
+            <dd>None</dd>
+            <!-- <dd>
               <dl>
                 <dt><code class="method-name"><a id="events-event-type-initMouseWheelEvent">initMouseWheelEvent</a></code> introduced in <strong class="since">DOM Level 3</strong></dt>
                 <dd>
@@ -2920,7 +2982,7 @@
 <!-- method -->
                 </dd>
               </dl>
-            </dd>
+            </dd> -->
           </dl>
         </dd>
       </dl>
@@ -2965,31 +3027,31 @@
         // Introduced in DOM Level 3:
         interface <a class="noxref" href="#events-Events-WheelEvent">WheelEvent</a> : <a class="noxref" href="#events-Events-MouseEvent">MouseEvent</a> {
 
-        // DeltaModeCode
-        const unsigned long       <a class="noxref" href="#events-DOM_DELTA_PIXEL">DOM_DELTA_PIXEL</a>       = 0x00;
-        const unsigned long       <a class="noxref" href="#events-DOM_DELTA_LINE">DOM_DELTA_LINE</a>        = 0x01;
-        const unsigned long       <a class="noxref" href="#events-DOM_DELTA_PAGE">DOM_DELTA_PAGE</a>        = 0x02;
-
-        readonly attribute long            <a class="noxref" href="#events-Events-WheelEvent-deltaX">deltaX</a>;
-        readonly attribute long            <a class="noxref" href="#events-Events-WheelEvent-deltaY">deltaY</a>;
-        readonly attribute long            <a class="noxref" href="#events-Events-WheelEvent-deltaZ">deltaZ</a>;
-        readonly attribute unsigned long   <a class="noxref" href="#events-Events-WheelEvent-deltaMode">deltaMode</a>;    
+          // DeltaModeCode
+          const unsigned long       <a class="noxref" href="#events-DOM_DELTA_PIXEL">DOM_DELTA_PIXEL</a>       = 0x00;
+          const unsigned long       <a class="noxref" href="#events-DOM_DELTA_LINE">DOM_DELTA_LINE</a>        = 0x01;
+          const unsigned long       <a class="noxref" href="#events-DOM_DELTA_PAGE">DOM_DELTA_PAGE</a>        = 0x02;
+
+          readonly attribute long            <a class="noxref" href="#events-Events-WheelEvent-deltaX">deltaX</a>;
+          readonly attribute long            <a class="noxref" href="#events-Events-WheelEvent-deltaY">deltaY</a>;
+          readonly attribute long            <a class="noxref" href="#events-Events-WheelEvent-deltaZ">deltaZ</a>;
+          readonly attribute unsigned long   <a class="noxref" href="#events-Events-WheelEvent-deltaMode">deltaMode</a>;<!--    
         void               <a class="noxref" 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 class="noxref" href="#events-Events-EventTarget">EventTarget</a> relatedTargetArg, 
-                                                  in DOMString modifiersListArg, 
-                                                  in long deltaXArg, 
-                                                  in long deltaYArg, 
-                                                  in long deltaZArg, 
-                                                  in unsigned long deltaMode);
+                                                          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 class="noxref" 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>
@@ -3050,7 +3112,9 @@
             <dt>
               <strong>Methods</strong>
             </dt>
-            <dd>
+            <dd>None</dd>
+            
+            <!-- <dd>
               <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>
@@ -3063,7 +3127,8 @@
 <!-- method -->
                 </dd>
               </dl>
-            </dd>
+            </dd> -->
+            
           </dl>
         </dd>
       </dl>
@@ -3104,26 +3169,26 @@
 // Introduced in DOM Level 3:
 interface <a class="noxref" href="#events-Events-TextEvent">TextEvent</a> : <a class="noxref" href="#events-Events-UIEvent">UIEvent</a> {
 
-// InputModeCode
-const unsigned long       <a class="noxref" href="#events-DOM_INPUT_METHOD_UNKNOWN">DOM_INPUT_METHOD_UNKNOWN</a>       = 0x00;
-const unsigned long       <a class="noxref" href="#events-DOM_INPUT_METHOD_KEYBOARD">DOM_INPUT_METHOD_KEYBOARD</a>      = 0x01;
-const unsigned long       <a class="noxref" href="#events-DOM_INPUT_METHOD_PASTE">DOM_INPUT_METHOD_PASTE</a>         = 0x02;
-const unsigned long       <a class="noxref" href="#events-DOM_INPUT_METHOD_DROP">DOM_INPUT_METHOD_DROP</a>          = 0x03;
-const unsigned long       <a class="noxref" href="#events-DOM_INPUT_METHOD_IME">DOM_INPUT_METHOD_IME</a>           = 0x04;
-const unsigned long       <a class="noxref" href="#events-DOM_INPUT_METHOD_OPTION">DOM_INPUT_METHOD_OPTION</a>        = 0x05;
-const unsigned long       <a class="noxref" href="#events-DOM_INPUT_METHOD_HANDWRITING">DOM_INPUT_METHOD_HANDWRITING</a>   = 0x06;
-const unsigned long       <a class="noxref" href="#events-DOM_INPUT_METHOD_VOICE">DOM_INPUT_METHOD_VOICE</a>         = 0x07;
-const unsigned long       <a class="noxref" href="#events-DOM_INPUT_METHOD_MULTIMODAL">DOM_INPUT_METHOD_MULTIMODAL</a>    = 0x08;
-const unsigned long       <a class="noxref" href="#events-DOM_INPUT_METHOD_SCRIPT">DOM_INPUT_METHOD_SCRIPT</a>        = 0x09;
-
-readonly attribute DOMString       <a class="noxref" href="#events-Events-TextEvent-data">data</a>;
-readonly attribute unsigned long   <a class="noxref" href="#events-Events-TextEvent-inputMode">inputMode</a>;
-void               <a class="noxref" 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);
+  // InputModeCode
+  const unsigned long       <a class="noxref" href="#events-DOM_INPUT_METHOD_UNKNOWN">DOM_INPUT_METHOD_UNKNOWN</a>       = 0x00;
+  const unsigned long       <a class="noxref" href="#events-DOM_INPUT_METHOD_KEYBOARD">DOM_INPUT_METHOD_KEYBOARD</a>      = 0x01;
+  const unsigned long       <a class="noxref" href="#events-DOM_INPUT_METHOD_PASTE">DOM_INPUT_METHOD_PASTE</a>         = 0x02;
+  const unsigned long       <a class="noxref" href="#events-DOM_INPUT_METHOD_DROP">DOM_INPUT_METHOD_DROP</a>          = 0x03;
+  const unsigned long       <a class="noxref" href="#events-DOM_INPUT_METHOD_IME">DOM_INPUT_METHOD_IME</a>           = 0x04;
+  const unsigned long       <a class="noxref" href="#events-DOM_INPUT_METHOD_OPTION">DOM_INPUT_METHOD_OPTION</a>        = 0x05;
+  const unsigned long       <a class="noxref" href="#events-DOM_INPUT_METHOD_HANDWRITING">DOM_INPUT_METHOD_HANDWRITING</a>   = 0x06;
+  const unsigned long       <a class="noxref" href="#events-DOM_INPUT_METHOD_VOICE">DOM_INPUT_METHOD_VOICE</a>         = 0x07;
+  const unsigned long       <a class="noxref" href="#events-DOM_INPUT_METHOD_MULTIMODAL">DOM_INPUT_METHOD_MULTIMODAL</a>    = 0x08;
+  const unsigned long       <a class="noxref" href="#events-DOM_INPUT_METHOD_SCRIPT">DOM_INPUT_METHOD_SCRIPT</a>        = 0x09;
+
+  readonly attribute DOMString       <a class="noxref" href="#events-Events-TextEvent-data">data</a>;
+  readonly attribute unsigned long   <a class="noxref" href="#events-Events-TextEvent-inputMode">inputMode</a>;    <!--   
+  void               <a class="noxref" 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>
@@ -3218,7 +3283,9 @@
               <dt>
                 <strong>Methods</strong>
               </dt>
-              <dd>
+              <dd>None</dd>
+              
+              <!-- <dd>
                 <dl>
                   <dt>
                     <code class="method-name">
@@ -3235,7 +3302,8 @@
 <!-- method -->
                   </dd>
                 </dl>
-              </dd>
+              </dd> -->
+              
             </dl>
           </dd>
         </dl>
@@ -3874,7 +3942,7 @@
       <div class="div3">
         <h3 class="div3"><a id="events-mutationnameevents" href="#events-mutationnameevents">5.2.10 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>MutationNameEvents</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"><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>
@@ -6396,7 +6464,7 @@
       <h1 class="adiv1"><a id="changes-Changes" href="#changes-Changes">Appendix C: Changes</a></h1>
       <div class="div2">
         <h2><a id="changes-DOMEvents2to3Changes" href="#changes-DOMEvents2to3Changes">C.1 Changes between DOM Level 2 Events and DOM Level 3 Events</a></h2>
-        <p>Numerous clarifications to the interfaces and event types have been made. The <code>HTMLEvents</code> module is no longer defined in this document. The event types <code>focus</code> and <code>blur</code> have been added to the <a href="#events-Events-UIEvent"><code>UIEvents</code></a> module, the event type <code>dblclick</code> has been added to the <a href="#events-Events-MouseEvent"><code>MouseEvents</code></a> module. This new specification provides a better separation between the DOM event flow, the event types, and the DOM interfaces.</p>
+        <p>Numerous clarifications to the interfaces and event types have been made. The <code>HTMLEvents</code> module is no longer defined in this document. The event types <code>focus</code> and <code>blur</code> have been added to the <a href="#events-Events-UIEvent"><code>UIEvent</code></a> module, the event type <code>dblclick</code> has been added to the <a href="#events-Events-MouseEvent"><code>MouseEvent</code></a> module. This new specification provides a better separation between the DOM event flow, the event types, and the DOM interfaces.</p>
         
         <div class="div3">
           <h3 class="adiv3"><a id="changes-DOMEvents2to3Changes-flow" href="#changes-DOMEvents2to3Changes-flow">C.1.1 Changes to DOM Level 2 event flow</a></h3>