HTML Standard Tracker

Diff (omit for latest revision)
Filter

Short URL: http://html5.org/r/2218

File a bug

SVNBugCommentTime (UTC)
2218WF2: Define the autofocus='' attribute. Define generic task sources.2008-09-19 01:02
Index: source
===================================================================
--- source	(revision 2217)
+++ source	(revision 2218)
@@ -3513,7 +3513,7 @@
    processed incrementally, as, for instance, with a progressively
    interlaced JPEG or an HTML file, multiple tasks may be queued to
    process the data as it is downloaded. The <span>task source</span>
-   for these tasks is the <dfn>networking task source</dfn>.</p>
+   for these tasks is the <span>networking task source</span>.</p>
    <!-- XXX make sure each use of 'fetch' defines what the appropriate
    task is -->
 
@@ -27177,14 +27177,49 @@
 
   <h5>Autofocusing a form control</h5>
 
-  <p class="big-issue">... <dfn title="attr-fe-autofocus">autofocus</dfn> content attribute</p>
+  <p>The <dfn title="attr-fe-autofocus"><code>autofocus</code></dfn>
+  content attribute allows the user to indicate that a control is to
+  be focused as soon as the page is loaded, allowing the user to just
+  start typing without having to manually focus the main control.</p>
 
-  <p class="big-issue">... <dfn title="dom-fe-autofocus">autofocus</dfn> DOM attribute</p>
+  <p>The <code title="attr-fe-autofocus">autofocus</code> attribute is
+  a <span>boolean attribute</span>.</p>
 
-  <!-- If the element is <span>focusable</span>, run the <span>focusing steps</step> for that element. -->
+  <p>There must not be more than one element in the document with the
+  <code title="attr-fe-autofocus">autofocus</code> attribute
+  specified.</p>
 
+  <p>Whenever an element with the <code
+  title="attr-fe-autofocus">autofocus</code> attribute specified is
+  <span title="insert an element into a document">inserted into a
+  document</span>, the user agent should <span>queue a task</span>
+  that checks to see if the element is <span>focusable</span>, and if
+  so, runs the <span>focusing steps</span> for that element. User
+  agents may also change the scrolling position of the document, or
+  perform some other action that brings the element to the user's
+  attention. The <span>task source</span> for this task is the
+  <span>DOM manipulation task source</span>.</p>
 
+  <p>User agents may ignore this attribute if the user has indicated
+  (for example, by starting to type in a form control) that he does
+  not wish focus to be changed.</p>
 
+  <p class="note">Focusing the control does not imply that the user
+  agent must focus the browser window if it has lost focus.</p>
+
+  <p>The <dfn title="dom-fe-autofocus"><code>autofocus</code></dfn>
+  DOM attribute must <span>reflect</span> the content attribute of the
+  same name.</p>
+
+  <div class="example">
+   <p>In the following snippet, the text control would be focused when
+   the document was loaded.</p>
+   <pre>&lt;input maxlength="256" name="q" value="" autofocus&gt;
+&lt;input type="submit" value="Search"&gt;</pre>
+  </div>
+
+
+
   <h4><dfn>Attributes for form submission</dfn></h4>
 
   <p class="big-issue">... <dfn title="attr-fs-action">action</dfn> content attribute</p>
@@ -33617,8 +33652,7 @@
 
   <p class="example">For example, a user agent could have one
   <span>task queue</span> for mouse and key events (the <span>user
-  interaction task source</span>, not defined in this
-  specification<!-- XXX xref -->), and another for everything
+  interaction task source</span>), and another for everything
   else. The user agent could then give keyboard and mouse events
   preference over other tasks three quarters of the time, keeping the
   interface responsive but not starving other task queues, and never
@@ -33647,6 +33681,59 @@
 
 
 
+  <h5>Generic task sources</h5>
+
+  <p>The following <span title="task source">task sources</span> are
+  used by a number of mostly unrelated features in this and other
+  specifications.</p>
+
+  <dl>
+
+   <dt>The <dfn>DOM manipulation task source</dfn></dt>
+
+   <dd>
+
+    <p>This <span>task source</span> is used for features that react
+    to DOM manipulations, such as things that happen asynchronously
+    when an element is <span title="insert an element into a
+    document">inserted into the document</span>.</p>
+
+    <p>Asynchronous mutation events must be dispatched using <span
+    title="concept-task">tasks</span> <span title="queue a
+    task">queued</span> with the <span>DOM manipulation task
+    source</span>. <a href="#refsDOMEVENTS">[DOMEVENTS]</a></p>
+
+   </dd>
+
+   <dt>The <dfn>user interaction task source</dfn></dt>
+
+   <dd>
+
+    <p>This <span>task source</span> is used for features that react
+    to user interaction, for example keyboard or mouse input.</p>
+
+    <p>Asynchronous events sent in response to user input (e.g. <span
+    title="event-click">click</span> events) must be dispatched using
+    <span title="concept-task">tasks</span> <span title="queue a
+    task">queued</span> with the <span>user interaction task
+    source</span>. <a href="#refsDOMEVENTS">[DOMEVENTS]</a></p>
+
+   </dd>
+
+   <dt>The <dfn>networking task source</dfn></dt>
+
+   <dd>
+
+    <p>This <span>task source</span> is used for features that trigger
+    in response to network activity.</p>
+
+    <!-- XHR should use this -->
+
+   </dd>
+
+  </dl>
+
+
   <h4>Security exceptions</h4>
 
   <p class="big-issue">Define <dfn>security exception</dfn>.</p>

|