[html5] r2391 - [e] (0) WF2: Try to clear up when you fire input/change events.

whatwg at whatwg.org whatwg at whatwg.org
Thu Nov 6 21:32:49 PST 2008


Author: ianh
Date: 2008-11-06 21:32:48 -0800 (Thu, 06 Nov 2008)
New Revision: 2391

Modified:
   index
   source
Log:
[e] (0) WF2: Try to clear up when you fire input/change events.

Modified: index
===================================================================
--- index	2008-11-06 21:49:36 UTC (rev 2390)
+++ index	2008-11-07 05:32:48 UTC (rev 2391)
@@ -16,7 +16,7 @@
   <div class=head>
    <p><a class=logo href=http://www.whatwg.org/ rel=home><img alt=WHATWG src=/images/logo></a></p>
    <h1>HTML 5</h1>
-   <h2 class="no-num no-toc" id=draft-recommendation-—-date:-01-jan-1901>Draft Recommendation — 6 November 2008</h2>
+   <h2 class="no-num no-toc" id=draft-recommendation-—-date:-01-jan-1901>Draft Recommendation — 7 November 2008</h2>
    <p>You can take part in this work. <a href=http://www.whatwg.org/mailing-list>Join the working group's discussion list.</a></p>
    <p><strong>Web designers!</strong> We have a <a href=http://blog.whatwg.org/faq/>FAQ</a>, a <a href=http://forums.whatwg.org/>forum</a>, and a <a href=http://www.whatwg.org/mailing-list#help>help mailing list</a> for you!</p>
    <dl><dt>Multiple-page version:</dt>
@@ -26632,24 +26632,25 @@
   <h5 id=common-event-behaviors><span class=secno>4.10.4.4 </span>Common event behaviors</h5>
 
   <p>When the <dfn id=event-input-input title=event-input-input><code>input</code></dfn>
-  event applies, the user agent must <a href=#queue-a-task>queue a task</a> to
-  <a href=#fire-a-simple-event>fire a simple event</a> called <code title=event-input>input</code> at the <code><a href=#the-input-element>input</a></code> element,
-  then <a href=#broadcast-forminput-events>broadcast <code title=event-forminput>forminput</code>
-  events</a> at the <code><a href=#the-input-element>input</a></code> element's <a href=#form-owner>form
-  owner</a>, any time the user causes the element's <a href=#concept-fe-value title=concept-fe-value>value</a> to change. User agents may
-  wait for a suitable break in the user's interaction before queuing
-  the task; for example, a user agent could wait for the user to have
-  not hit a key for 100ms, so as to only fire the event when the user
-  pauses, instead of continuously for each keystroke.</p>
+  event applies, any time the user causes the element's <a href=#concept-fe-value title=concept-fe-value>value</a> to change, the user agent must
+  <a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire a simple event</a> called
+  <code title=event-input>input</code> at the <code><a href=#the-input-element>input</a></code>
+  element, then <a href=#broadcast-forminput-events>broadcast <code title=event-forminput>forminput</code> events</a> at the
+  <code><a href=#the-input-element>input</a></code> element's <a href=#form-owner>form owner</a>. User agents
+  may wait for a suitable break in the user's interaction before
+  queuing the task; for example, a user agent could wait for the user
+  to have not hit a key for 100ms, so as to only fire the event when
+  the user pauses, instead of continuously for each keystroke.</p>
 
   <p>When the <dfn id=event-input-change title=event-input-change><code>change</code></dfn> event applies,
   if the element does not have an <a href=#activation-behavior>activation behavior</a>
   defined but uses a user interface that involves an explicit commit
-  action, then the user agent must <a href=#queue-a-task>queue a task</a> to
-  <a href=#fire-a-simple-event>fire a simple event</a> called <code title=event-change>change</code> at the <code><a href=#the-input-element>input</a></code>
-  element, then <a href=#broadcast-formchange-events>broadcast <code title=event-formchange>formchange</code> events</a> at the
-  <code><a href=#the-input-element>input</a></code> element's <a href=#form-owner>form owner</a>, any time the
-  user commits a change to the element's <a href=#concept-fe-value title=concept-fe-value>value</a> or list of <a href=#concept-input-type-file-selected title=concept-input-type-file-selected>selected files</a>.</p>
+  action, then any time the user commits a change to the element's
+  <a href=#concept-fe-value title=concept-fe-value>value</a> or list of <a href=#concept-input-type-file-selected title=concept-input-type-file-selected>selected files</a>, the
+  user agent must <a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire a simple
+  event</a> called <code title=event-change>change</code> at the
+  <code><a href=#the-input-element>input</a></code> element, then <a href=#broadcast-formchange-events>broadcast <code title=event-formchange>formchange</code> events</a> at the
+  <code><a href=#the-input-element>input</a></code> element's <a href=#form-owner>form owner</a>.</p>
 
   <p class=example>An example of a user interface with a commit
   action would be a <a href=#file-upload-state title=attr-input-type-file>File
@@ -26665,7 +26666,29 @@
   explicit commit step, selecting a date from the drop down calendar
   and then dismissing the drop down would be a commit action.</p>
 
-  <p class=note>In addition, when the <code title=event-input-change><a href=#event-input-change>change</a></code> event applies, <code title=event-change>change</code> events can also be fired as part
+  <p>When the user agent changes the element's <a href=#concept-fe-value title=concept-fe-value>value</a> on behalf of the user (e.g. as
+  part of a form prefilling feature), the user agent must follow these
+  steps:</p>
+
+  <ol><li>If the <code title=event-input-input><a href=#event-input-input>input</a></code> event
+   applies, <a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire a simple
+   event</a> called <code title=event-input>input</code> at the
+   <code><a href=#the-input-element>input</a></code> element.</li>
+
+   <li>If the <code title=event-input-input><a href=#event-input-input>input</a></code> event
+   applies, <a href=#broadcast-forminput-events>broadcast <code title=event-forminput>forminput</code> events</a> at the
+   <code><a href=#the-input-element>input</a></code> element's <a href=#form-owner>form owner</a>.</li>
+
+   <li>If the <code title=event-input-change><a href=#event-input-change>change</a></code> event
+   applies, <a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire a simple
+   event</a> called <code title=event-change>change</code> at the
+   <code><a href=#the-input-element>input</a></code> element.</li>
+
+   <li>If the <code title=event-input-change><a href=#event-input-change>change</a></code> event
+   applies, <a href=#broadcast-formchange-events>broadcast <code title=event-formchange>formchange</code> events</a> at the
+   <code><a href=#the-input-element>input</a></code> element's <a href=#form-owner>form owner</a>.</li>
+
+  </ol><p class=note>In addition, when the <code title=event-input-change><a href=#event-input-change>change</a></code> event applies, <code title=event-change>change</code> events can also be fired as part
   of the element's <a href=#activation-behavior>activation behavior</a> and as part of the
   <a href=#unfocusing-steps>unfocusing steps</a>.</p>
 

Modified: source
===================================================================
--- source	2008-11-06 21:49:36 UTC (rev 2390)
+++ source	2008-11-07 05:32:48 UTC (rev 2391)
@@ -29897,31 +29897,30 @@
   <h5>Common event behaviors</h5>
 
   <p>When the <dfn title="event-input-input"><code>input</code></dfn>
-  event applies, the user agent must <span>queue a task</span> to
-  <span>fire a simple event</span> called <code
-  title="event-input">input</code> at the <code>input</code> element,
-  then <span>broadcast <code title="event-forminput">forminput</code>
-  events</span> at the <code>input</code> element's <span>form
-  owner</span>, any time the user causes the element's <span
-  title="concept-fe-value">value</span> to change. User agents may
-  wait for a suitable break in the user's interaction before queuing
-  the task; for example, a user agent could wait for the user to have
-  not hit a key for 100ms, so as to only fire the event when the user
-  pauses, instead of continuously for each keystroke.</p>
+  event applies, any time the user causes the element's <span
+  title="concept-fe-value">value</span> to change, the user agent must
+  <span>queue a task</span> to <span>fire a simple event</span> called
+  <code title="event-input">input</code> at the <code>input</code>
+  element, then <span>broadcast <code
+  title="event-forminput">forminput</code> events</span> at the
+  <code>input</code> element's <span>form owner</span>. User agents
+  may wait for a suitable break in the user's interaction before
+  queuing the task; for example, a user agent could wait for the user
+  to have not hit a key for 100ms, so as to only fire the event when
+  the user pauses, instead of continuously for each keystroke.</p>
 
   <p>When the <dfn
   title="event-input-change"><code>change</code></dfn> event applies,
   if the element does not have an <span>activation behavior</span>
   defined but uses a user interface that involves an explicit commit
-  action, then the user agent must <span>queue a task</span> to
-  <span>fire a simple event</span> called <code
-  title="event-change">change</code> at the <code>input</code>
-  element, then <span>broadcast <code
+  action, then any time the user commits a change to the element's
+  <span title="concept-fe-value">value</span> or list of <span
+  title="concept-input-type-file-selected">selected files</span>, the
+  user agent must <span>queue a task</span> to <span>fire a simple
+  event</span> called <code title="event-change">change</code> at the
+  <code>input</code> element, then <span>broadcast <code
   title="event-formchange">formchange</code> events</span> at the
-  <code>input</code> element's <span>form owner</span>, any time the
-  user commits a change to the element's <span
-  title="concept-fe-value">value</span> or list of <span
-  title="concept-input-type-file-selected">selected files</span>.</p>
+  <code>input</code> element's <span>form owner</span>.</p>
 
   <p class="example">An example of a user interface with a commit
   action would be a <span title="attr-input-type-file">File
@@ -29938,6 +29937,35 @@
   explicit commit step, selecting a date from the drop down calendar
   and then dismissing the drop down would be a commit action.</p>
 
+  <p>When the user agent changes the element's <span
+  title="concept-fe-value">value</span> on behalf of the user (e.g. as
+  part of a form prefilling feature), the user agent must follow these
+  steps:</p>
+
+  <ol>
+
+   <li>If the <code title="event-input-input">input</code> event
+   applies, <span>queue a task</span> to <span>fire a simple
+   event</span> called <code title="event-input">input</code> at the
+   <code>input</code> element.</li>
+
+   <li>If the <code title="event-input-input">input</code> event
+   applies, <span>broadcast <code
+   title="event-forminput">forminput</code> events</span> at the
+   <code>input</code> element's <span>form owner</span>.</li>
+
+   <li>If the <code title="event-input-change">change</code> event
+   applies, <span>queue a task</span> to <span>fire a simple
+   event</span> called <code title="event-change">change</code> at the
+   <code>input</code> element.</li>
+
+   <li>If the <code title="event-input-change">change</code> event
+   applies, <span>broadcast <code
+   title="event-formchange">formchange</code> events</span> at the
+   <code>input</code> element's <span>form owner</span>.</li>
+
+  </ol>
+
   <p class="note">In addition, when the <code
   title="event-input-change">change</code> event applies, <code
   title="event-change">change</code> events can also be fired as part




More information about the Commit-Watchers mailing list