[html5] r4521 - [e] (0) Lots of rewriting of the event handler attributes stuff: remove mention [...]

whatwg at whatwg.org whatwg at whatwg.org
Wed Jan 6 03:04:19 PST 2010


Author: ianh
Date: 2010-01-06 03:04:15 -0800 (Wed, 06 Jan 2010)
New Revision: 4521

Modified:
   complete.html
   index
   source
Log:
[e] (0) Lots of rewriting of the event handler attributes stuff: remove mention of namespaces, clarify some notes, clarify when the listeners are registered, clean up some class=impl usage.
Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=8630

Modified: complete.html
===================================================================
--- complete.html	2010-01-06 10:51:06 UTC (rev 4520)
+++ complete.html	2010-01-06 11:04:15 UTC (rev 4521)
@@ -51427,29 +51427,35 @@
 
   <div class=impl>
 
-  <hr><p>All <a href=#event-handlers>event handlers</a> on an element, whether
-  set to null or to a <code><a href=#function>Function</a></code> object, must be registered
-  as event listeners on the element, as if the <code title=dom-EventTarget-addEventListenerNS>addEventListenerNS()</code>
-  method on the <code>Element</code> object's <code>EventTarget</code>
-  interface had been invoked when the event handler's
-  element or object was created, with the event type (<var title=dom-event-type>type</var> argument) equal to the type
-  corresponding to the event handler (the <dfn id=event-handler-event-type>event handler
-  event type</dfn>), the namespace (<var title=dom-event-namespaceURI>namespaceURI</var> argument) set to
-  null, the listener set to be a target and bubbling phase listener
-  (<var title=dom-event-useCapture>useCapture</var> argument set to
-  false), the event group set to the default group (<var title=dom-event-evtGroup>evtGroup</var> argument set to null), and
-  the event listener itself (<var title=dom-event-listener>listener</var> argument) set to do
+  <hr><p>All <a href=#event-handlers>event handlers</a> on an object, whether an element
+  or some other object, and whether set to null or to a
+  <code><a href=#function>Function</a></code> object, must be registered as event listeners
+  on the object when it is created, as if the <code title=dom-EventTarget-addEventListener>addEventListener()</code>
+  method on the object's <code>EventTarget</code> interface had been
+  invoked, with the event type (<var title=dom-event-type>type</var>
+  argument) equal to the type corresponding to the event handler (the
+  <dfn id=event-handler-event-type>event handler event type</dfn>), the listener set to be a
+  target and bubbling phase listener (<var title=dom-event-useCapture>useCapture</var> argument set to
+  false), and the event listener itself (<var title=dom-event-listener>listener</var> argument) set to do
   nothing while the event handler's value is not a
   <code><a href=#function>Function</a></code> object, and set to invoke the <code title=dom-function-call><a href=#dom-function-call>call()</a></code> callback of the
-  <code><a href=#function>Function</a></code> object associated with the event handler otherwise.</p>
+  <code><a href=#function>Function</a></code> object associated with the event handler
+  otherwise.</p>
 
+  </div>
+
+  <p class=note><a href=#event-handlers>Event handlers</a> <span class=impl>therefore</span> always fire before event listeners
+  attached using <code title=dom-EventTarget-addEventListener>addEventListener()</code>.</p>
+
+  <div class=impl>
+
   <p class=note>The <var title=dom-event-listener>listener</var>
   argument is emphatically <em>not</em> the <a href=#event-handlers title="event
   handlers">event handler</a> itself.</p>
 
   <p class=note>The interfaces implemented by the event object do
-  not affect whether an <a href=#event-handlers title="event handlers">event
-  handler</a> is used or not.</p>
+  not influence whether an <a href=#event-handlers title="event handlers">event
+  handler</a> is triggered or not.</p>
 
   <p>When an <a href=#event-handlers title="event handlers">event handler</a>'s
   <code><a href=#function>Function</a></code> object is invoked, its <code title=dom-function-call><a href=#dom-function-call>call()</a></code> callback must be invoked
@@ -51475,7 +51481,11 @@
    <dd><p>If the return value is a boolean with the value false, then
    the event must be canceled.</dd>
 
-  </dl><!-- IE actually uncancels the event if the function returns true --><hr><p>The <code><a href=#function>Function</a></code> interface represents a function in the
+  </dl></div>
+
+  <!-- IE actually uncancels the event if the function returns true -->
+
+  <hr><p>The <code><a href=#function>Function</a></code> interface represents a function in the
   scripting language being used. It is represented in IDL as
   follows:</p>
 
@@ -51490,7 +51500,11 @@
   <p class=note>In JavaScript, any <code title="">Function</code>
   object implements this interface.</p>
 
-  </div>
+  <p>The return value of the function is affects whether the event is
+  canceled or not: <span class=impl>as described above,</span> if
+  the return value is false, the event is canceled (except for <code class=event-mouseover>mouseover</code> events, where the return
+  value has to be true to cancel the event). With <code title=event-beforeunload>beforeunload</code> events, the value is
+  instead used to determine the message to show the user.</p>
 
 
   <div class=impl>

Modified: index
===================================================================
--- index	2010-01-06 10:51:06 UTC (rev 4520)
+++ index	2010-01-06 11:04:15 UTC (rev 4521)
@@ -48592,29 +48592,35 @@
 
   <div class=impl>
 
-  <hr><p>All <a href=#event-handlers>event handlers</a> on an element, whether
-  set to null or to a <code><a href=#function>Function</a></code> object, must be registered
-  as event listeners on the element, as if the <code title=dom-EventTarget-addEventListenerNS>addEventListenerNS()</code>
-  method on the <code>Element</code> object's <code>EventTarget</code>
-  interface had been invoked when the event handler's
-  element or object was created, with the event type (<var title=dom-event-type>type</var> argument) equal to the type
-  corresponding to the event handler (the <dfn id=event-handler-event-type>event handler
-  event type</dfn>), the namespace (<var title=dom-event-namespaceURI>namespaceURI</var> argument) set to
-  null, the listener set to be a target and bubbling phase listener
-  (<var title=dom-event-useCapture>useCapture</var> argument set to
-  false), the event group set to the default group (<var title=dom-event-evtGroup>evtGroup</var> argument set to null), and
-  the event listener itself (<var title=dom-event-listener>listener</var> argument) set to do
+  <hr><p>All <a href=#event-handlers>event handlers</a> on an object, whether an element
+  or some other object, and whether set to null or to a
+  <code><a href=#function>Function</a></code> object, must be registered as event listeners
+  on the object when it is created, as if the <code title=dom-EventTarget-addEventListener>addEventListener()</code>
+  method on the object's <code>EventTarget</code> interface had been
+  invoked, with the event type (<var title=dom-event-type>type</var>
+  argument) equal to the type corresponding to the event handler (the
+  <dfn id=event-handler-event-type>event handler event type</dfn>), the listener set to be a
+  target and bubbling phase listener (<var title=dom-event-useCapture>useCapture</var> argument set to
+  false), and the event listener itself (<var title=dom-event-listener>listener</var> argument) set to do
   nothing while the event handler's value is not a
   <code><a href=#function>Function</a></code> object, and set to invoke the <code title=dom-function-call><a href=#dom-function-call>call()</a></code> callback of the
-  <code><a href=#function>Function</a></code> object associated with the event handler otherwise.</p>
+  <code><a href=#function>Function</a></code> object associated with the event handler
+  otherwise.</p>
 
+  </div>
+
+  <p class=note><a href=#event-handlers>Event handlers</a> <span class=impl>therefore</span> always fire before event listeners
+  attached using <code title=dom-EventTarget-addEventListener>addEventListener()</code>.</p>
+
+  <div class=impl>
+
   <p class=note>The <var title=dom-event-listener>listener</var>
   argument is emphatically <em>not</em> the <a href=#event-handlers title="event
   handlers">event handler</a> itself.</p>
 
   <p class=note>The interfaces implemented by the event object do
-  not affect whether an <a href=#event-handlers title="event handlers">event
-  handler</a> is used or not.</p>
+  not influence whether an <a href=#event-handlers title="event handlers">event
+  handler</a> is triggered or not.</p>
 
   <p>When an <a href=#event-handlers title="event handlers">event handler</a>'s
   <code><a href=#function>Function</a></code> object is invoked, its <code title=dom-function-call><a href=#dom-function-call>call()</a></code> callback must be invoked
@@ -48640,7 +48646,11 @@
    <dd><p>If the return value is a boolean with the value false, then
    the event must be canceled.</dd>
 
-  </dl><!-- IE actually uncancels the event if the function returns true --><hr><p>The <code><a href=#function>Function</a></code> interface represents a function in the
+  </dl></div>
+
+  <!-- IE actually uncancels the event if the function returns true -->
+
+  <hr><p>The <code><a href=#function>Function</a></code> interface represents a function in the
   scripting language being used. It is represented in IDL as
   follows:</p>
 
@@ -48655,7 +48665,11 @@
   <p class=note>In JavaScript, any <code title="">Function</code>
   object implements this interface.</p>
 
-  </div>
+  <p>The return value of the function is affects whether the event is
+  canceled or not: <span class=impl>as described above,</span> if
+  the return value is false, the event is canceled (except for <code class=event-mouseover>mouseover</code> events, where the return
+  value has to be true to cancel the event). With <code title=event-beforeunload>beforeunload</code> events, the value is
+  instead used to determine the message to show the user.</p>
 
 
   <div class=impl>

Modified: source
===================================================================
--- source	2010-01-06 10:51:06 UTC (rev 4520)
+++ source	2010-01-06 11:04:15 UTC (rev 4521)
@@ -57888,35 +57888,41 @@
 
   <hr>
 
-  <p>All <span>event handlers</span> on an element, whether
-  set to null or to a <code>Function</code> object, must be registered
-  as event listeners on the element, as if the <code
-  title="dom-EventTarget-addEventListenerNS">addEventListenerNS()</code>
-  method on the <code>Element</code> object's <code>EventTarget</code>
-  interface had been invoked when the event handler's
-  element or object was created, with the event type (<var
-  title="dom-event-type">type</var> argument) equal to the type
-  corresponding to the event handler (the <dfn>event handler
-  event type</dfn>), the namespace (<var
-  title="dom-event-namespaceURI">namespaceURI</var> argument) set to
-  null, the listener set to be a target and bubbling phase listener
-  (<var title="dom-event-useCapture">useCapture</var> argument set to
-  false), the event group set to the default group (<var
-  title="dom-event-evtGroup">evtGroup</var> argument set to null), and
-  the event listener itself (<var
+  <p>All <span>event handlers</span> on an object, whether an element
+  or some other object, and whether set to null or to a
+  <code>Function</code> object, must be registered as event listeners
+  on the object when it is created, as if the <code
+  title="dom-EventTarget-addEventListener">addEventListener()</code>
+  method on the object's <code>EventTarget</code> interface had been
+  invoked, with the event type (<var title="dom-event-type">type</var>
+  argument) equal to the type corresponding to the event handler (the
+  <dfn>event handler event type</dfn>), the listener set to be a
+  target and bubbling phase listener (<var
+  title="dom-event-useCapture">useCapture</var> argument set to
+  false), and the event listener itself (<var
   title="dom-event-listener">listener</var> argument) set to do
   nothing while the event handler's value is not a
   <code>Function</code> object, and set to invoke the <code
   title="dom-function-call">call()</code> callback of the
-  <code>Function</code> object associated with the event handler otherwise.</p>
+  <code>Function</code> object associated with the event handler
+  otherwise.</p>
 
+  </div>
+
+  <p class="note"><span>Event handlers</span> <span
+  class="impl">therefore</span> always fire before event listeners
+  attached using <code
+  title="dom-EventTarget-addEventListener">addEventListener()</code>.</p>
+
+  <div class="impl">
+
   <p class="note">The <var title="dom-event-listener">listener</var>
   argument is emphatically <em>not</em> the <span title="event
   handlers">event handler</span> itself.</p>
 
   <p class="note">The interfaces implemented by the event object do
-  not affect whether an <span title="event handlers">event
-  handler</span> is used or not.</p>
+  not influence whether an <span title="event handlers">event
+  handler</span> is triggered or not.</p>
 
   <p>When an <span title="event handlers">event handler</span>'s
   <code>Function</code> object is invoked, its <code
@@ -57948,6 +57954,8 @@
 
   </dl>
 
+  </div>
+
   <!-- IE actually uncancels the event if the function returns true -->
 
   <hr>
@@ -57967,7 +57975,13 @@
   <p class="note">In JavaScript, any <code title="">Function</code>
   object implements this interface.</p>
 
-  </div>
+  <p>The return value of the function is affects whether the event is
+  canceled or not: <span class="impl">as described above,</span> if
+  the return value is false, the event is canceled (except for <code
+  class="event-mouseover">mouseover</code> events, where the return
+  value has to be true to cancel the event). With <code
+  title="event-beforeunload">beforeunload</code> events, the value is
+  instead used to determine the message to show the user.</p>
 
 
   <div class="impl">




More information about the Commit-Watchers mailing list