[html5] r1736 - /

whatwg at whatwg.org whatwg at whatwg.org
Tue Jun 10 14:18:18 PDT 2008


Author: ianh
Date: 2008-06-10 14:18:18 -0700 (Tue, 10 Jun 2008)
New Revision: 1736

Modified:
   index
   source
Log:
[e] (0) bring a bunch of user interaction stuff into one section

Modified: index
===================================================================
--- index	2008-06-09 22:32:31 UTC (rev 1735)
+++ index	2008-06-10 21:18:18 UTC (rev 1736)
@@ -25,7 +25,7 @@
 
    <h1 id=html-5>HTML 5</h1>
 
-   <h2 class="no-num no-toc" id=draft>Draft Recommendation — 9 June
+   <h2 class="no-num no-toc" id=draft>Draft Recommendation — 10 June
     2008</h2>
 
    <p>You can take part in this work. <a
@@ -384,648 +384,627 @@
        <li><a href="#classes"><span class=secno>3.4.6 </span>The
         <code>class</code> attribute</a>
 
-       <li><a href="#the-irrelevant"><span class=secno>3.4.7 </span>The
-        <code>irrelevant</code> attribute</a>
-
-       <li><a href="#the-style"><span class=secno>3.4.8 </span>The
+       <li><a href="#the-style"><span class=secno>3.4.7 </span>The
         <code>style</code> attribute</a>
 
-       <li><a href="#embedding"><span class=secno>3.4.9 </span>Embedding
+       <li><a href="#embedding"><span class=secno>3.4.8 </span>Embedding
         custom non-visible data</a>
       </ul>
 
-     <li><a href="#interaction"><span class=secno>3.5 </span>Interaction</a>
-      <ul class=toc>
-       <li><a href="#activation"><span class=secno>3.5.1
-        </span>Activation</a>
-
-       <li><a href="#focus"><span class=secno>3.5.2 </span>Focus</a>
-        <ul class=toc>
-         <li><a href="#focus-management"><span class=secno>3.5.2.1.
-          </span>Focus management</a>
-
-         <li><a href="#sequential"><span class=secno>3.5.2.2.
-          </span>Sequential focus navigation</a>
-        </ul>
-
-       <li><a href="#scrolling"><span class=secno>3.5.3 </span>Scrolling
-        elements into view</a>
-      </ul>
-
-     <li><a href="#the-root"><span class=secno>3.6 </span>The root
+     <li><a href="#the-root"><span class=secno>3.5 </span>The root
       element</a>
       <ul class=toc>
-       <li><a href="#the-html"><span class=secno>3.6.1 </span>The
+       <li><a href="#the-html"><span class=secno>3.5.1 </span>The
         <code>html</code> element</a>
       </ul>
 
-     <li><a href="#document"><span class=secno>3.7 </span>Document
+     <li><a href="#document"><span class=secno>3.6 </span>Document
       metadata</a>
       <ul class=toc>
-       <li><a href="#the-head"><span class=secno>3.7.1 </span>The
+       <li><a href="#the-head"><span class=secno>3.6.1 </span>The
         <code>head</code> element</a>
 
-       <li><a href="#the-title0"><span class=secno>3.7.2 </span>The
+       <li><a href="#the-title0"><span class=secno>3.6.2 </span>The
         <code>title</code> element</a>
 
-       <li><a href="#the-base"><span class=secno>3.7.3 </span>The
+       <li><a href="#the-base"><span class=secno>3.6.3 </span>The
         <code>base</code> element</a>
 
-       <li><a href="#the-link"><span class=secno>3.7.4 </span>The
+       <li><a href="#the-link"><span class=secno>3.6.4 </span>The
         <code>link</code> element</a>
 
-       <li><a href="#meta"><span class=secno>3.7.5 </span>The
+       <li><a href="#meta"><span class=secno>3.6.5 </span>The
         <code>meta</code> element</a>
         <ul class=toc>
-         <li><a href="#standard"><span class=secno>3.7.5.1. </span>Standard
+         <li><a href="#standard"><span class=secno>3.6.5.1. </span>Standard
           metadata names</a>
 
-         <li><a href="#other"><span class=secno>3.7.5.2. </span>Other
+         <li><a href="#other"><span class=secno>3.6.5.2. </span>Other
           metadata names</a>
 
-         <li><a href="#pragma"><span class=secno>3.7.5.3. </span>Pragma
+         <li><a href="#pragma"><span class=secno>3.6.5.3. </span>Pragma
           directives</a>
 
-         <li><a href="#charset"><span class=secno>3.7.5.4. </span>Specifying
+         <li><a href="#charset"><span class=secno>3.6.5.4. </span>Specifying
           the document's character encoding</a>
         </ul>
 
-       <li><a href="#the-style0"><span class=secno>3.7.6 </span>The
+       <li><a href="#the-style0"><span class=secno>3.6.6 </span>The
         <code>style</code> element</a>
 
-       <li><a href="#styling"><span class=secno>3.7.7 </span>Styling</a>
+       <li><a href="#styling"><span class=secno>3.6.7 </span>Styling</a>
       </ul>
 
-     <li><a href="#sections"><span class=secno>3.8 </span>Sections</a>
+     <li><a href="#sections"><span class=secno>3.7 </span>Sections</a>
       <ul class=toc>
-       <li><a href="#the-body"><span class=secno>3.8.1 </span>The
+       <li><a href="#the-body"><span class=secno>3.7.1 </span>The
         <code>body</code> element</a>
 
-       <li><a href="#the-section"><span class=secno>3.8.2 </span>The
+       <li><a href="#the-section"><span class=secno>3.7.2 </span>The
         <code>section</code> element</a>
 
-       <li><a href="#the-nav"><span class=secno>3.8.3 </span>The
+       <li><a href="#the-nav"><span class=secno>3.7.3 </span>The
         <code>nav</code> element</a>
 
-       <li><a href="#the-article"><span class=secno>3.8.4 </span>The
+       <li><a href="#the-article"><span class=secno>3.7.4 </span>The
         <code>article</code> element</a>
 
-       <li><a href="#the-aside"><span class=secno>3.8.5 </span>The
+       <li><a href="#the-aside"><span class=secno>3.7.5 </span>The
         <code>aside</code> element</a>
 
-       <li><a href="#the-h1"><span class=secno>3.8.6 </span>The
+       <li><a href="#the-h1"><span class=secno>3.7.6 </span>The
         <code>h1</code>, <code>h2</code>, <code>h3</code>, <code>h4</code>,
         <code>h5</code>, and <code>h6</code> elements</a>
 
-       <li><a href="#the-header"><span class=secno>3.8.7 </span>The
+       <li><a href="#the-header"><span class=secno>3.7.7 </span>The
         <code>header</code> element</a>
 
-       <li><a href="#the-footer"><span class=secno>3.8.8 </span>The
+       <li><a href="#the-footer"><span class=secno>3.7.8 </span>The
         <code>footer</code> element</a>
 
-       <li><a href="#the-address"><span class=secno>3.8.9 </span>The
+       <li><a href="#the-address"><span class=secno>3.7.9 </span>The
         <code>address</code> element</a>
 
-       <li><a href="#headings"><span class=secno>3.8.10 </span>Headings and
+       <li><a href="#headings"><span class=secno>3.7.10 </span>Headings and
         sections</a>
         <ul class=toc>
-         <li><a href="#outlines"><span class=secno>3.8.10.1. </span>Creating
+         <li><a href="#outlines"><span class=secno>3.7.10.1. </span>Creating
           an outline</a>
 
-         <li><a href="#distinguishing"><span class=secno>3.8.10.2.
+         <li><a href="#distinguishing"><span class=secno>3.7.10.2.
           </span>Distinguishing site-wide headings from page headings</a>
         </ul>
       </ul>
 
-     <li><a href="#grouping"><span class=secno>3.9 </span>Grouping
+     <li><a href="#grouping"><span class=secno>3.8 </span>Grouping
       content</a>
       <ul class=toc>
-       <li><a href="#the-p"><span class=secno>3.9.1 </span>The <code>p</code>
+       <li><a href="#the-p"><span class=secno>3.8.1 </span>The <code>p</code>
         element</a>
 
-       <li><a href="#the-hr"><span class=secno>3.9.2 </span>The
+       <li><a href="#the-hr"><span class=secno>3.8.2 </span>The
         <code>hr</code> element</a>
 
-       <li><a href="#the-br"><span class=secno>3.9.3 </span>The
+       <li><a href="#the-br"><span class=secno>3.8.3 </span>The
         <code>br</code> element</a>
 
-       <li><a href="#the-pre"><span class=secno>3.9.4 </span>The
+       <li><a href="#the-pre"><span class=secno>3.8.4 </span>The
         <code>pre</code> element</a>
 
-       <li><a href="#the-dialog"><span class=secno>3.9.5 </span>The
+       <li><a href="#the-dialog"><span class=secno>3.8.5 </span>The
         <code>dialog</code> element</a>
 
-       <li><a href="#the-blockquote"><span class=secno>3.9.6 </span>The
+       <li><a href="#the-blockquote"><span class=secno>3.8.6 </span>The
         <code>blockquote</code> element</a>
 
-       <li><a href="#the-ol"><span class=secno>3.9.7 </span>The
+       <li><a href="#the-ol"><span class=secno>3.8.7 </span>The
         <code>ol</code> element</a>
 
-       <li><a href="#the-ul"><span class=secno>3.9.8 </span>The
+       <li><a href="#the-ul"><span class=secno>3.8.8 </span>The
         <code>ul</code> element</a>
 
-       <li><a href="#the-li"><span class=secno>3.9.9 </span>The
+       <li><a href="#the-li"><span class=secno>3.8.9 </span>The
         <code>li</code> element</a>
 
-       <li><a href="#the-dl"><span class=secno>3.9.10 </span>The
+       <li><a href="#the-dl"><span class=secno>3.8.10 </span>The
         <code>dl</code> element</a>
 
-       <li><a href="#the-dt"><span class=secno>3.9.11 </span>The
+       <li><a href="#the-dt"><span class=secno>3.8.11 </span>The
         <code>dt</code> element</a>
 
-       <li><a href="#the-dd"><span class=secno>3.9.12 </span>The
+       <li><a href="#the-dd"><span class=secno>3.8.12 </span>The
         <code>dd</code> element</a>
       </ul>
 
-     <li><a href="#text-level"><span class=secno>3.10 </span>Text-level
+     <li><a href="#text-level"><span class=secno>3.9 </span>Text-level
       semantics</a>
       <ul class=toc>
-       <li><a href="#the-a"><span class=secno>3.10.1 </span>The
-        <code>a</code> element</a>
+       <li><a href="#the-a"><span class=secno>3.9.1 </span>The <code>a</code>
+        element</a>
 
-       <li><a href="#the-q"><span class=secno>3.10.2 </span>The
-        <code>q</code> element</a>
+       <li><a href="#the-q"><span class=secno>3.9.2 </span>The <code>q</code>
+        element</a>
 
-       <li><a href="#the-cite"><span class=secno>3.10.3 </span>The
+       <li><a href="#the-cite"><span class=secno>3.9.3 </span>The
         <code>cite</code> element</a>
 
-       <li><a href="#the-em"><span class=secno>3.10.4 </span>The
+       <li><a href="#the-em"><span class=secno>3.9.4 </span>The
         <code>em</code> element</a>
 
-       <li><a href="#the-strong"><span class=secno>3.10.5 </span>The
+       <li><a href="#the-strong"><span class=secno>3.9.5 </span>The
         <code>strong</code> element</a>
 
-       <li><a href="#the-small"><span class=secno>3.10.6 </span>The
+       <li><a href="#the-small"><span class=secno>3.9.6 </span>The
         <code>small</code> element</a>
 
-       <li><a href="#the-mark"><span class=secno>3.10.7 </span>The
+       <li><a href="#the-mark"><span class=secno>3.9.7 </span>The
         <code>mark</code> element</a>
 
-       <li><a href="#the-dfn"><span class=secno>3.10.8 </span>The
+       <li><a href="#the-dfn"><span class=secno>3.9.8 </span>The
         <code>dfn</code> element</a>
 
-       <li><a href="#the-abbr"><span class=secno>3.10.9 </span>The
+       <li><a href="#the-abbr"><span class=secno>3.9.9 </span>The
         <code>abbr</code> element</a>
 
-       <li><a href="#the-time"><span class=secno>3.10.10 </span>The
+       <li><a href="#the-time"><span class=secno>3.9.10 </span>The
         <code>time</code> element</a>
 
-       <li><a href="#the-progress"><span class=secno>3.10.11 </span>The
+       <li><a href="#the-progress"><span class=secno>3.9.11 </span>The
         <code>progress</code> element</a>
 
-       <li><a href="#the-meter"><span class=secno>3.10.12 </span>The
+       <li><a href="#the-meter"><span class=secno>3.9.12 </span>The
         <code>meter</code> element</a>
 
-       <li><a href="#the-code"><span class=secno>3.10.13 </span>The
+       <li><a href="#the-code"><span class=secno>3.9.13 </span>The
         <code>code</code> element</a>
 
-       <li><a href="#the-var"><span class=secno>3.10.14 </span>The
+       <li><a href="#the-var"><span class=secno>3.9.14 </span>The
         <code>var</code> element</a>
 
-       <li><a href="#the-samp"><span class=secno>3.10.15 </span>The
+       <li><a href="#the-samp"><span class=secno>3.9.15 </span>The
         <code>samp</code> element</a>
 
-       <li><a href="#the-kbd"><span class=secno>3.10.16 </span>The
+       <li><a href="#the-kbd"><span class=secno>3.9.16 </span>The
         <code>kbd</code> element</a>
 
-       <li><a href="#the-sub"><span class=secno>3.10.17 </span>The
+       <li><a href="#the-sub"><span class=secno>3.9.17 </span>The
         <code>sub</code> and <code>sup</code> elements</a>
 
-       <li><a href="#the-span"><span class=secno>3.10.18 </span>The
+       <li><a href="#the-span"><span class=secno>3.9.18 </span>The
         <code>span</code> element</a>
 
-       <li><a href="#the-i"><span class=secno>3.10.19 </span>The
+       <li><a href="#the-i"><span class=secno>3.9.19 </span>The
         <code>i</code> element</a>
 
-       <li><a href="#the-b"><span class=secno>3.10.20 </span>The
+       <li><a href="#the-b"><span class=secno>3.9.20 </span>The
         <code>b</code> element</a>
 
-       <li><a href="#the-bdo"><span class=secno>3.10.21 </span>The
+       <li><a href="#the-bdo"><span class=secno>3.9.21 </span>The
         <code>bdo</code> element</a>
 
-       <li><a href="#the-ruby"><span class=secno>3.10.22 </span>The
+       <li><a href="#the-ruby"><span class=secno>3.9.22 </span>The
         <code>ruby</code> element</a>
 
-       <li><a href="#the-rt"><span class=secno>3.10.23 </span>The
+       <li><a href="#the-rt"><span class=secno>3.9.23 </span>The
         <code>rt</code> element</a>
 
-       <li><a href="#the-rp"><span class=secno>3.10.24 </span>The
+       <li><a href="#the-rp"><span class=secno>3.9.24 </span>The
         <code>rp</code> element</a>
 
-       <li><a href="#usage"><span class=secno>3.10.25 </span>Usage
-        summary</a>
+       <li><a href="#usage"><span class=secno>3.9.25 </span>Usage summary</a>
+        
 
-       <li><a href="#footnotes"><span class=secno>3.10.26
-        </span>Footnotes</a>
+       <li><a href="#footnotes"><span class=secno>3.9.26 </span>Footnotes</a>
+        
       </ul>
 
-     <li><a href="#edits"><span class=secno>3.11 </span>Edits</a>
+     <li><a href="#edits"><span class=secno>3.10 </span>Edits</a>
       <ul class=toc>
-       <li><a href="#the-ins"><span class=secno>3.11.1 </span>The
+       <li><a href="#the-ins"><span class=secno>3.10.1 </span>The
         <code>ins</code> element</a>
 
-       <li><a href="#the-del"><span class=secno>3.11.2 </span>The
+       <li><a href="#the-del"><span class=secno>3.10.2 </span>The
         <code>del</code> element</a>
 
-       <li><a href="#attributes"><span class=secno>3.11.3 </span>Attributes
+       <li><a href="#attributes"><span class=secno>3.10.3 </span>Attributes
         common to <code>ins</code> and <code>del</code> elements</a>
 
-       <li><a href="#edits0"><span class=secno>3.11.4 </span>Edits and
+       <li><a href="#edits0"><span class=secno>3.10.4 </span>Edits and
         paragraphs</a>
 
-       <li><a href="#edits1"><span class=secno>3.11.5 </span>Edits and
+       <li><a href="#edits1"><span class=secno>3.10.5 </span>Edits and
         lists</a>
       </ul>
 
-     <li><a href="#embedded0"><span class=secno>3.12 </span>Embedded
+     <li><a href="#embedded0"><span class=secno>3.11 </span>Embedded
       content</a>
       <ul class=toc>
-       <li><a href="#the-figure"><span class=secno>3.12.1 </span>The
+       <li><a href="#the-figure"><span class=secno>3.11.1 </span>The
         <code>figure</code> element</a>
 
-       <li><a href="#the-img"><span class=secno>3.12.2 </span>The
+       <li><a href="#the-img"><span class=secno>3.11.2 </span>The
         <code>img</code> element</a>
 
-       <li><a href="#the-iframe"><span class=secno>3.12.3 </span>The
+       <li><a href="#the-iframe"><span class=secno>3.11.3 </span>The
         <code>iframe</code> element</a>
 
-       <li><a href="#the-embed"><span class=secno>3.12.4 </span>The
+       <li><a href="#the-embed"><span class=secno>3.11.4 </span>The
         <code>embed</code> element</a>
 
-       <li><a href="#the-object"><span class=secno>3.12.5 </span>The
+       <li><a href="#the-object"><span class=secno>3.11.5 </span>The
         <code>object</code> element</a>
 
-       <li><a href="#the-param"><span class=secno>3.12.6 </span>The
+       <li><a href="#the-param"><span class=secno>3.11.6 </span>The
         <code>param</code> element</a>
 
-       <li><a href="#video"><span class=secno>3.12.7 </span>The
+       <li><a href="#video"><span class=secno>3.11.7 </span>The
         <code>video</code> element</a>
         <ul class=toc>
-         <li><a href="#video0"><span class=secno>3.12.7.1. </span>Video and
+         <li><a href="#video0"><span class=secno>3.11.7.1. </span>Video and
           audio codecs for <code>video</code> elements</a>
         </ul>
 
-       <li><a href="#audio"><span class=secno>3.12.8 </span>The
+       <li><a href="#audio"><span class=secno>3.11.8 </span>The
         <code>audio</code> element</a>
         <ul class=toc>
-         <li><a href="#audio0"><span class=secno>3.12.8.1. </span>Audio
+         <li><a href="#audio0"><span class=secno>3.11.8.1. </span>Audio
           codecs for <code>audio</code> elements</a>
         </ul>
 
-       <li><a href="#the-source"><span class=secno>3.12.9 </span>The
+       <li><a href="#the-source"><span class=secno>3.11.9 </span>The
         <code>source</code> element</a>
 
-       <li><a href="#media"><span class=secno>3.12.10 </span>Media
+       <li><a href="#media"><span class=secno>3.11.10 </span>Media
         elements</a>
         <ul class=toc>
-         <li><a href="#error"><span class=secno>3.12.10.1. </span>Error
+         <li><a href="#error"><span class=secno>3.11.10.1. </span>Error
           codes</a>
 
-         <li><a href="#location"><span class=secno>3.12.10.2. </span>Location
+         <li><a href="#location"><span class=secno>3.11.10.2. </span>Location
           of the media resource</a>
 
-         <li><a href="#network0"><span class=secno>3.12.10.3. </span>Network
+         <li><a href="#network0"><span class=secno>3.11.10.3. </span>Network
           states</a>
 
-         <li><a href="#loading"><span class=secno>3.12.10.4. </span>Loading
+         <li><a href="#loading"><span class=secno>3.11.10.4. </span>Loading
           the media resource</a>
 
-         <li><a href="#offsets"><span class=secno>3.12.10.5. </span>Offsets
+         <li><a href="#offsets"><span class=secno>3.11.10.5. </span>Offsets
           into the media resource</a>
 
-         <li><a href="#the-ready"><span class=secno>3.12.10.6. </span>The
+         <li><a href="#the-ready"><span class=secno>3.11.10.6. </span>The
           ready states</a>
 
-         <li><a href="#playing"><span class=secno>3.12.10.7. </span>Playing
+         <li><a href="#playing"><span class=secno>3.11.10.7. </span>Playing
           the media resource</a>
 
-         <li><a href="#seeking"><span class=secno>3.12.10.8.
+         <li><a href="#seeking"><span class=secno>3.11.10.8.
           </span>Seeking</a>
 
-         <li><a href="#cue-ranges"><span class=secno>3.12.10.9. </span>Cue
+         <li><a href="#cue-ranges"><span class=secno>3.11.10.9. </span>Cue
           ranges</a>
 
-         <li><a href="#user-interface"><span class=secno>3.12.10.10.
+         <li><a href="#user-interface"><span class=secno>3.11.10.10.
           </span>User interface</a>
 
-         <li><a href="#time-ranges"><span class=secno>3.12.10.11. </span>Time
+         <li><a href="#time-ranges"><span class=secno>3.11.10.11. </span>Time
           ranges</a>
 
-         <li><a href="#byte-ranges"><span class=secno>3.12.10.12. </span>Byte
+         <li><a href="#byte-ranges"><span class=secno>3.11.10.12. </span>Byte
           ranges</a>
 
-         <li><a href="#mediaevents"><span class=secno>3.12.10.13.
+         <li><a href="#mediaevents"><span class=secno>3.11.10.13.
           </span>Event summary</a>
 
-         <li><a href="#security0"><span class=secno>3.12.10.14.
+         <li><a href="#security0"><span class=secno>3.11.10.14.
           </span>Security and privacy considerations</a>
         </ul>
 
-       <li><a href="#the-canvas"><span class=secno>3.12.11 </span>The
+       <li><a href="#the-canvas"><span class=secno>3.11.11 </span>The
         <code>canvas</code> element</a>
         <ul class=toc>
-         <li><a href="#the-2d"><span class=secno>3.12.11.1. </span>The 2D
+         <li><a href="#the-2d"><span class=secno>3.11.11.1. </span>The 2D
           context</a>
           <ul class=toc>
-           <li><a href="#the-canvas0"><span class=secno>3.12.11.1.1.
+           <li><a href="#the-canvas0"><span class=secno>3.11.11.1.1.
             </span>The canvas state</a>
 
-           <li><a href="#transformations"><span class=secno>3.12.11.1.2.
+           <li><a href="#transformations"><span class=secno>3.11.11.1.2.
             </span>Transformations</a>
 
-           <li><a href="#compositing"><span class=secno>3.12.11.1.3.
+           <li><a href="#compositing"><span class=secno>3.11.11.1.3.
             </span>Compositing</a>
 
-           <li><a href="#colors"><span class=secno>3.12.11.1.4. </span>Colors
+           <li><a href="#colors"><span class=secno>3.11.11.1.4. </span>Colors
             and styles</a>
 
-           <li><a href="#line-styles"><span class=secno>3.12.11.1.5.
+           <li><a href="#line-styles"><span class=secno>3.11.11.1.5.
             </span>Line styles</a>
 
-           <li><a href="#shadows"><span class=secno>3.12.11.1.6.
+           <li><a href="#shadows"><span class=secno>3.11.11.1.6.
             </span>Shadows</a>
 
-           <li><a href="#simple"><span class=secno>3.12.11.1.7. </span>Simple
+           <li><a href="#simple"><span class=secno>3.11.11.1.7. </span>Simple
             shapes (rectangles)</a>
 
-           <li><a href="#complex"><span class=secno>3.12.11.1.8.
+           <li><a href="#complex"><span class=secno>3.11.11.1.8.
             </span>Complex shapes (paths)</a>
 
-           <li><a href="#text"><span class=secno>3.12.11.1.9. </span>Text</a>
+           <li><a href="#text"><span class=secno>3.11.11.1.9. </span>Text</a>
             
 
-           <li><a href="#images"><span class=secno>3.12.11.1.10.
+           <li><a href="#images"><span class=secno>3.11.11.1.10.
             </span>Images</a>
 
-           <li><a href="#pixel"><span class=secno>3.12.11.1.11. </span>Pixel
+           <li><a href="#pixel"><span class=secno>3.11.11.1.11. </span>Pixel
             manipulation</a>
 
-           <li><a href="#drawing"><span class=secno>3.12.11.1.12.
+           <li><a href="#drawing"><span class=secno>3.11.11.1.12.
             </span>Drawing model</a>
           </ul>
 
-         <li><a href="#color"><span class=secno>3.12.11.2. </span>Color
+         <li><a href="#color"><span class=secno>3.11.11.2. </span>Color
           spaces and color correction</a>
 
-         <li><a href="#security1"><span class=secno>3.12.11.3.
+         <li><a href="#security1"><span class=secno>3.11.11.3.
           </span>Security with <code>canvas</code> elements</a>
         </ul>
 
-       <li><a href="#the-map"><span class=secno>3.12.12 </span>The
+       <li><a href="#the-map"><span class=secno>3.11.12 </span>The
         <code>map</code> element</a>
 
-       <li><a href="#the-area"><span class=secno>3.12.13 </span>The
+       <li><a href="#the-area"><span class=secno>3.11.13 </span>The
         <code>area</code> element</a>
 
-       <li><a href="#image-maps"><span class=secno>3.12.14 </span>Image
+       <li><a href="#image-maps"><span class=secno>3.11.14 </span>Image
         maps</a>
 
-       <li><a href="#mathml"><span class=secno>3.12.15 </span>MathML</a>
+       <li><a href="#mathml"><span class=secno>3.11.15 </span>MathML</a>
 
-       <li><a href="#svg"><span class=secno>3.12.16 </span>SVG</a>
+       <li><a href="#svg"><span class=secno>3.11.16 </span>SVG</a>
 
-       <li><a href="#dimension"><span class=secno>3.12.17 </span>Dimension
+       <li><a href="#dimension"><span class=secno>3.11.17 </span>Dimension
         attributes</a>
       </ul>
 
-     <li><a href="#tabular"><span class=secno>3.13 </span>Tabular data</a>
+     <li><a href="#tabular"><span class=secno>3.12 </span>Tabular data</a>
       <ul class=toc>
-       <li><a href="#table-intro"><span class=secno>3.13.1
+       <li><a href="#table-intro"><span class=secno>3.12.1
         </span>Introduction</a>
 
-       <li><a href="#the-table"><span class=secno>3.13.2 </span>The
+       <li><a href="#the-table"><span class=secno>3.12.2 </span>The
         <code>table</code> element</a>
 
-       <li><a href="#the-caption"><span class=secno>3.13.3 </span>The
+       <li><a href="#the-caption"><span class=secno>3.12.3 </span>The
         <code>caption</code> element</a>
 
-       <li><a href="#the-colgroup"><span class=secno>3.13.4 </span>The
+       <li><a href="#the-colgroup"><span class=secno>3.12.4 </span>The
         <code>colgroup</code> element</a>
 
-       <li><a href="#the-col"><span class=secno>3.13.5 </span>The
+       <li><a href="#the-col"><span class=secno>3.12.5 </span>The
         <code>col</code> element</a>
 
-       <li><a href="#the-tbody"><span class=secno>3.13.6 </span>The
+       <li><a href="#the-tbody"><span class=secno>3.12.6 </span>The
         <code>tbody</code> element</a>
 
-       <li><a href="#the-thead"><span class=secno>3.13.7 </span>The
+       <li><a href="#the-thead"><span class=secno>3.12.7 </span>The
         <code>thead</code> element</a>
 
-       <li><a href="#the-tfoot"><span class=secno>3.13.8 </span>The
+       <li><a href="#the-tfoot"><span class=secno>3.12.8 </span>The
         <code>tfoot</code> element</a>
 
-       <li><a href="#the-tr"><span class=secno>3.13.9 </span>The
+       <li><a href="#the-tr"><span class=secno>3.12.9 </span>The
         <code>tr</code> element</a>
 
-       <li><a href="#the-td"><span class=secno>3.13.10 </span>The
+       <li><a href="#the-td"><span class=secno>3.12.10 </span>The
         <code>td</code> element</a>
 
-       <li><a href="#the-th"><span class=secno>3.13.11 </span>The
+       <li><a href="#the-th"><span class=secno>3.12.11 </span>The
         <code>th</code> element</a>
 
-       <li><a href="#attributes0"><span class=secno>3.13.12 </span>Attributes
+       <li><a href="#attributes0"><span class=secno>3.12.12 </span>Attributes
         common to <code>td</code> and <code>th</code> elements</a>
 
-       <li><a href="#processing"><span class=secno>3.13.13 </span>Processing
+       <li><a href="#processing"><span class=secno>3.12.13 </span>Processing
         model</a>
         <ul class=toc>
-         <li><a href="#forming"><span class=secno>3.13.13.1. </span>Forming a
+         <li><a href="#forming"><span class=secno>3.12.13.1. </span>Forming a
           table</a>
 
          <li><a href="#header-and-data-cell-semantics"><span
-          class=secno>3.13.13.2. </span>Forming relationships between data
+          class=secno>3.12.13.2. </span>Forming relationships between data
           cells and header cells</a>
         </ul>
       </ul>
 
-     <li><a href="#forms"><span class=secno>3.14 </span>Forms</a>
+     <li><a href="#forms"><span class=secno>3.13 </span>Forms</a>
       <ul class=toc>
-       <li><a href="#the-form"><span class=secno>3.14.1 </span>The
+       <li><a href="#the-form"><span class=secno>3.13.1 </span>The
         <code>form</code> element</a>
 
-       <li><a href="#the-fieldset"><span class=secno>3.14.2 </span>The
+       <li><a href="#the-fieldset"><span class=secno>3.13.2 </span>The
         <code>fieldset</code> element</a>
 
-       <li><a href="#the-input"><span class=secno>3.14.3 </span>The
+       <li><a href="#the-input"><span class=secno>3.13.3 </span>The
         <code>input</code> element</a>
 
-       <li><a href="#the-button"><span class=secno>3.14.4 </span>The
+       <li><a href="#the-button"><span class=secno>3.13.4 </span>The
         <code>button</code> element</a>
 
-       <li><a href="#the-label"><span class=secno>3.14.5 </span>The
+       <li><a href="#the-label"><span class=secno>3.13.5 </span>The
         <code>label</code> element</a>
 
-       <li><a href="#the-select"><span class=secno>3.14.6 </span>The
+       <li><a href="#the-select"><span class=secno>3.13.6 </span>The
         <code>select</code> element</a>
 
-       <li><a href="#the-datalist"><span class=secno>3.14.7 </span>The
+       <li><a href="#the-datalist"><span class=secno>3.13.7 </span>The
         <code>datalist</code> element</a>
 
-       <li><a href="#the-optgroup"><span class=secno>3.14.8 </span>The
+       <li><a href="#the-optgroup"><span class=secno>3.13.8 </span>The
         <code>optgroup</code> element</a>
 
-       <li><a href="#the-option"><span class=secno>3.14.9 </span>The
+       <li><a href="#the-option"><span class=secno>3.13.9 </span>The
         <code>option</code> element</a>
 
-       <li><a href="#the-textarea"><span class=secno>3.14.10 </span>The
+       <li><a href="#the-textarea"><span class=secno>3.13.10 </span>The
         <code>textarea</code> element</a>
 
-       <li><a href="#the-output"><span class=secno>3.14.11 </span>The
+       <li><a href="#the-output"><span class=secno>3.13.11 </span>The
         <code>output</code> element</a>
 
-       <li><a href="#processing0"><span class=secno>3.14.12 </span>Processing
+       <li><a href="#processing0"><span class=secno>3.13.12 </span>Processing
         model</a>
         <ul class=toc>
-         <li><a href="#form-submission"><span class=secno>3.14.12.1.
+         <li><a href="#form-submission"><span class=secno>3.13.12.1.
           </span>Form submission</a>
         </ul>
       </ul>
 
-     <li><a href="#scripting0"><span class=secno>3.15 </span>Scripting</a>
+     <li><a href="#scripting0"><span class=secno>3.14 </span>Scripting</a>
       <ul class=toc>
-       <li><a href="#script"><span class=secno>3.15.1 </span>The
+       <li><a href="#script"><span class=secno>3.14.1 </span>The
         <code>script</code> element</a>
         <ul class=toc>
-         <li><a href="#scriptingLanguages"><span class=secno>3.15.1.1.
+         <li><a href="#scriptingLanguages"><span class=secno>3.14.1.1.
           </span>Scripting languages</a>
         </ul>
 
-       <li><a href="#the-noscript"><span class=secno>3.15.2 </span>The
+       <li><a href="#the-noscript"><span class=secno>3.14.2 </span>The
         <code>noscript</code> element</a>
 
-       <li><a href="#the-event-source"><span class=secno>3.15.3 </span>The
+       <li><a href="#the-event-source"><span class=secno>3.14.3 </span>The
         <code>event-source</code> element</a>
       </ul>
 
-     <li><a href="#interactive-elements"><span class=secno>3.16
+     <li><a href="#interactive-elements"><span class=secno>3.15
       </span>Interactive elements</a>
       <ul class=toc>
-       <li><a href="#the-details"><span class=secno>3.16.1 </span>The
+       <li><a href="#the-details"><span class=secno>3.15.1 </span>The
         <code>details</code> element</a>
 
-       <li><a href="#datagrid"><span class=secno>3.16.2 </span>The
+       <li><a href="#datagrid"><span class=secno>3.15.2 </span>The
         <code>datagrid</code> element</a>
         <ul class=toc>
-         <li><a href="#the-datagrid"><span class=secno>3.16.2.1. </span>The
+         <li><a href="#the-datagrid"><span class=secno>3.15.2.1. </span>The
           <code>datagrid</code> data model</a>
 
-         <li><a href="#how-rows"><span class=secno>3.16.2.2. </span>How rows
+         <li><a href="#how-rows"><span class=secno>3.15.2.2. </span>How rows
           are identified</a>
 
-         <li><a href="#the-data"><span class=secno>3.16.2.3. </span>The data
+         <li><a href="#the-data"><span class=secno>3.15.2.3. </span>The data
           provider interface</a>
 
-         <li><a href="#the-default"><span class=secno>3.16.2.4. </span>The
+         <li><a href="#the-default"><span class=secno>3.15.2.4. </span>The
           default data provider</a>
           <ul class=toc>
            <li><a href="#commonDefaultDataGridMethodDefinitions"><span
-            class=secno>3.16.2.4.1. </span>Common default data provider
+            class=secno>3.15.2.4.1. </span>Common default data provider
             method definitions for cells</a>
           </ul>
 
-         <li><a href="#populating"><span class=secno>3.16.2.5.
+         <li><a href="#populating"><span class=secno>3.15.2.5.
           </span>Populating the <code>datagrid</code> element</a>
 
-         <li><a href="#updating"><span class=secno>3.16.2.6. </span>Updating
+         <li><a href="#updating"><span class=secno>3.15.2.6. </span>Updating
           the <code>datagrid</code></a>
 
-         <li><a href="#requirements"><span class=secno>3.16.2.7.
+         <li><a href="#requirements"><span class=secno>3.15.2.7.
           </span>Requirements for interactive user agents</a>
 
-         <li><a href="#the-selection"><span class=secno>3.16.2.8. </span>The
+         <li><a href="#the-selection"><span class=secno>3.15.2.8. </span>The
           selection</a>
 
-         <li><a href="#columns"><span class=secno>3.16.2.9. </span>Columns
+         <li><a href="#columns"><span class=secno>3.15.2.9. </span>Columns
           and captions</a>
         </ul>
 
-       <li><a href="#the-command"><span class=secno>3.16.3 </span>The
+       <li><a href="#the-command"><span class=secno>3.15.3 </span>The
         <code>command</code> element</a>
 
-       <li><a href="#menus"><span class=secno>3.16.4 </span>The
+       <li><a href="#menus"><span class=secno>3.15.4 </span>The
         <code>menu</code> element</a>
         <ul class=toc>
-         <li><a href="#menus-intro"><span class=secno>3.16.4.1.
+         <li><a href="#menus-intro"><span class=secno>3.15.4.1.
           </span>Introduction</a>
 
-         <li><a href="#building"><span class=secno>3.16.4.2. </span>Building
+         <li><a href="#building"><span class=secno>3.15.4.2. </span>Building
           menus and tool bars</a>
 
-         <li><a href="#context"><span class=secno>3.16.4.3. </span>Context
+         <li><a href="#context"><span class=secno>3.15.4.3. </span>Context
           menus</a>
 
-         <li><a href="#toolbars"><span class=secno>3.16.4.4.
+         <li><a href="#toolbars"><span class=secno>3.15.4.4.
           </span>Toolbars</a>
         </ul>
 
-       <li><a href="#commands"><span class=secno>3.16.5 </span>Commands</a>
+       <li><a href="#commands"><span class=secno>3.15.5 </span>Commands</a>
         <ul class=toc>
-         <li><a href="#using"><span class=secno>3.16.5.1. </span>Using the
+         <li><a href="#using"><span class=secno>3.15.5.1. </span>Using the
           <code>a</code> element to define a command</a>
 
-         <li><a href="#using0"><span class=secno>3.16.5.2. </span>Using the
+         <li><a href="#using0"><span class=secno>3.15.5.2. </span>Using the
           <code>button</code> element to define a command</a>
 
-         <li><a href="#using1"><span class=secno>3.16.5.3. </span>Using the
+         <li><a href="#using1"><span class=secno>3.15.5.3. </span>Using the
           <code>input</code> element to define a command</a>
 
-         <li><a href="#using2"><span class=secno>3.16.5.4. </span>Using the
+         <li><a href="#using2"><span class=secno>3.15.5.4. </span>Using the
           <code>option</code> element to define a command</a>
 
-         <li><a href="#using3"><span class=secno>3.16.5.5. </span>Using the
+         <li><a href="#using3"><span class=secno>3.15.5.5. </span>Using the
           <code>command</code> element to define a command</a>
         </ul>
       </ul>
 
-     <li><a href="#datatemplate"><span class=secno>3.17 </span>Data
+     <li><a href="#datatemplate"><span class=secno>3.16 </span>Data
       Templates</a>
       <ul class=toc>
-       <li><a href="#introduction0"><span class=secno>3.17.1
+       <li><a href="#introduction0"><span class=secno>3.16.1
         </span>Introduction</a>
 
-       <li><a href="#the-datatemplate"><span class=secno>3.17.2 </span>The
+       <li><a href="#the-datatemplate"><span class=secno>3.16.2 </span>The
         <code>datatemplate</code> element</a>
 
-       <li><a href="#the-rule"><span class=secno>3.17.3 </span>The
+       <li><a href="#the-rule"><span class=secno>3.16.3 </span>The
         <code>rule</code> element</a>
 
-       <li><a href="#the-nest"><span class=secno>3.17.4 </span>The
+       <li><a href="#the-nest"><span class=secno>3.16.4 </span>The
         <code>nest</code> element</a>
 
-       <li><a href="#global0"><span class=secno>3.17.5 </span>Global
+       <li><a href="#global0"><span class=secno>3.16.5 </span>Global
         attributes for data templates</a>
 
-       <li><a href="#processing1"><span class=secno>3.17.6 </span>Processing
+       <li><a href="#processing1"><span class=secno>3.16.6 </span>Processing
         model</a>
         <ul class=toc>
-         <li><a href="#the-originalcontent"><span class=secno>3.17.6.1.
+         <li><a href="#the-originalcontent"><span class=secno>3.16.6.1.
           </span>The <code title=dom-originalContent>originalContent</code>
           DOM attribute</a>
 
-         <li><a href="#the-template"><span class=secno>3.17.6.2. </span>The
+         <li><a href="#the-template"><span class=secno>3.16.6.2. </span>The
           <code title=attr-template>template</code> attribute</a>
 
-         <li><a href="#the-ref"><span class=secno>3.17.6.3. </span>The <code
+         <li><a href="#the-ref"><span class=secno>3.16.6.3. </span>The <code
           title=attr-ref>ref</code> attribute</a>
 
-         <li><a href="#the-nodedatatemplate"><span class=secno>3.17.6.4.
+         <li><a href="#the-nodedatatemplate"><span class=secno>3.16.6.4.
           </span>The <code>NodeDataTemplate</code> interface</a>
 
-         <li><a href="#mutations"><span class=secno>3.17.6.5.
+         <li><a href="#mutations"><span class=secno>3.16.6.5.
           </span>Mutations</a>
 
-         <li><a href="#updating0"><span class=secno>3.17.6.6. </span>Updating
+         <li><a href="#updating0"><span class=secno>3.16.6.6. </span>Updating
           the generated content</a>
         </ul>
       </ul>
 
-     <li><a href="#miscellaneous"><span class=secno>3.18 </span>Miscellaneous
+     <li><a href="#miscellaneous"><span class=secno>3.17 </span>Miscellaneous
       elements</a>
       <ul class=toc>
-       <li><a href="#the-legend"><span class=secno>3.18.1 </span>The
+       <li><a href="#the-legend"><span class=secno>3.17.1 </span>The
         <code>legend</code> element</a>
 
-       <li><a href="#the-div"><span class=secno>3.18.2 </span>The
+       <li><a href="#the-div"><span class=secno>3.17.2 </span>The
         <code>div</code> element</a>
       </ul>
     </ul>
@@ -1400,7 +1379,7 @@
             </span>Link type "<code>up</code>"</a>
           </ul>
 
-         <li><a href="#sequential0"><span class=secno>4.12.3.19.
+         <li><a href="#sequential"><span class=secno>4.12.3.19.
           </span>Sequential link types</a>
           <ul class=toc>
            <li><a href="#link-type17"><span class=secno>4.12.3.19.1.
@@ -1425,96 +1404,113 @@
       URI manipulation</a>
     </ul>
 
-   <li><a href="#editing"><span class=secno>5. </span>Editing</a>
+   <li><a href="#editing"><span class=secno>5. </span>User Interaction</a>
     <ul class=toc>
      <li><a href="#editing-intro"><span class=secno>5.1
       </span>Introduction</a>
 
-     <li><a href="#contenteditable"><span class=secno>5.2 </span>The <code
+     <li><a href="#the-irrelevant"><span class=secno>5.2 </span>The
+      <code>irrelevant</code> attribute</a>
+
+     <li><a href="#activation"><span class=secno>5.3 </span>Activation</a>
+
+     <li><a href="#scrolling"><span class=secno>5.4 </span>Scrolling elements
+      into view</a>
+
+     <li><a href="#focus"><span class=secno>5.5 </span>Focus</a>
+      <ul class=toc>
+       <li><a href="#focus-management"><span class=secno>5.5.1 </span>Focus
+        management</a>
+
+       <li><a href="#sequential0"><span class=secno>5.5.2 </span>Sequential
+        focus navigation</a>
+      </ul>
+
+     <li><a href="#selection"><span class=secno>5.6 </span>The text selection
+      APIs</a>
+      <ul class=toc>
+       <li><a href="#documentSelection"><span class=secno>5.6.1 </span>APIs
+        for the browsing context selection</a>
+
+       <li><a href="#textFieldSelection"><span class=secno>5.6.2 </span>APIs
+        for the text field selections</a>
+      </ul>
+
+     <li><a href="#contenteditable"><span class=secno>5.7 </span>The <code
       title=attr-contenteditable>contenteditable</code> attribute</a>
       <ul class=toc>
-       <li><a href="#user-editing"><span class=secno>5.2.1 </span>User
+       <li><a href="#user-editing"><span class=secno>5.7.1 </span>User
         editing actions</a>
 
-       <li><a href="#making"><span class=secno>5.2.2 </span>Making entire
+       <li><a href="#making"><span class=secno>5.7.2 </span>Making entire
         documents editable</a>
       </ul>
 
-     <li><a href="#dnd"><span class=secno>5.3 </span>Drag and drop</a>
+     <li><a href="#dnd"><span class=secno>5.8 </span>Drag and drop</a>
       <ul class=toc>
-       <li><a href="#introduction4"><span class=secno>5.3.1
+       <li><a href="#introduction4"><span class=secno>5.8.1
         </span>Introduction</a>
 
-       <li><a href="#the-dragevent"><span class=secno>5.3.2 </span>The
+       <li><a href="#the-dragevent"><span class=secno>5.8.2 </span>The
         <code>DragEvent</code> and <code>DataTransfer</code> interfaces</a>
 
-       <li><a href="#events1"><span class=secno>5.3.3 </span>Events fired
+       <li><a href="#events1"><span class=secno>5.8.3 </span>Events fired
         during a drag-and-drop action</a>
 
-       <li><a href="#drag-and-drop"><span class=secno>5.3.4
+       <li><a href="#drag-and-drop"><span class=secno>5.8.4
         </span>Drag-and-drop processing model</a>
         <ul class=toc>
-         <li><a href="#when-the"><span class=secno>5.3.4.1. </span>When the
+         <li><a href="#when-the"><span class=secno>5.8.4.1. </span>When the
           drag-and-drop operation starts or ends in another document</a>
 
-         <li><a href="#when-the0"><span class=secno>5.3.4.2. </span>When the
+         <li><a href="#when-the0"><span class=secno>5.8.4.2. </span>When the
           drag-and-drop operation starts or ends in another application</a>
         </ul>
 
-       <li><a href="#the-draggable"><span class=secno>5.3.5 </span>The
+       <li><a href="#the-draggable"><span class=secno>5.8.5 </span>The
         <code>draggable</code> attribute</a>
 
-       <li><a href="#copy-and"><span class=secno>5.3.6 </span>Copy and
+       <li><a href="#copy-and"><span class=secno>5.8.6 </span>Copy and
         paste</a>
         <ul class=toc>
-         <li><a href="#copy-to"><span class=secno>5.3.6.1. </span>Copy to
+         <li><a href="#copy-to"><span class=secno>5.8.6.1. </span>Copy to
           clipboard</a>
 
-         <li><a href="#cut-to"><span class=secno>5.3.6.2. </span>Cut to
+         <li><a href="#cut-to"><span class=secno>5.8.6.2. </span>Cut to
           clipboard</a>
 
-         <li><a href="#paste"><span class=secno>5.3.6.3. </span>Paste from
+         <li><a href="#paste"><span class=secno>5.8.6.3. </span>Paste from
           clipboard</a>
 
-         <li><a href="#paste0"><span class=secno>5.3.6.4. </span>Paste from
+         <li><a href="#paste0"><span class=secno>5.8.6.4. </span>Paste from
           selection</a>
         </ul>
 
-       <li><a href="#security8"><span class=secno>5.3.7 </span>Security risks
+       <li><a href="#security8"><span class=secno>5.8.7 </span>Security risks
         in the drag-and-drop model</a>
       </ul>
 
-     <li><a href="#undo"><span class=secno>5.4 </span>Undo history</a>
+     <li><a href="#undo"><span class=secno>5.9 </span>Undo history</a>
       <ul class=toc>
-       <li><a href="#the-undomanager"><span class=secno>5.4.1 </span>The
+       <li><a href="#the-undomanager"><span class=secno>5.9.1 </span>The
         <code>UndoManager</code> interface</a>
 
-       <li><a href="#undo-moving"><span class=secno>5.4.2 </span>Undo: moving
+       <li><a href="#undo-moving"><span class=secno>5.9.2 </span>Undo: moving
         back in the undo transaction history</a>
 
-       <li><a href="#redo-moving"><span class=secno>5.4.3 </span>Redo: moving
+       <li><a href="#redo-moving"><span class=secno>5.9.3 </span>Redo: moving
         forward in the undo transaction history</a>
 
-       <li><a href="#the-undomanagerevent"><span class=secno>5.4.4 </span>The
+       <li><a href="#the-undomanagerevent"><span class=secno>5.9.4 </span>The
         <code>UndoManagerEvent</code> interface and the <code
         title=event-undo>undo</code> and <code title=event-redo>redo</code>
         events</a>
 
-       <li><a href="#implementation0"><span class=secno>5.4.5
+       <li><a href="#implementation0"><span class=secno>5.9.5
         </span>Implementation notes</a>
       </ul>
 
-     <li><a href="#selection"><span class=secno>5.5 </span>The text selection
-      APIs</a>
-      <ul class=toc>
-       <li><a href="#documentSelection"><span class=secno>5.5.1 </span>APIs
-        for the browsing context selection</a>
-
-       <li><a href="#textFieldSelection"><span class=secno>5.5.2 </span>APIs
-        for the text field selections</a>
-      </ul>
-
-     <li><a href="#command"><span class=secno>5.6 </span>Command APIs</a>
+     <li><a href="#command"><span class=secno>5.10 </span>Command APIs</a>
     </ul>
 
    <li><a href="#comms"><span class=secno>6. </span>Communication</a>
@@ -2696,7 +2692,7 @@
    from <code>Document</code>.
 
   <pre class=idl>interface <dfn id=htmldocument>HTMLDocument</dfn> {
-  // <a href="#resource0">Resource metadata management</a>
+  // <a href="#resource0">resource metadata management</a>
   [PutForwards=href] readonly attribute <a href="#location2">Location</a> <a href="#location0" title=dom-document-location>location</a>;
   readonly attribute DOMString <a href="#url" title=dom-document-URL>URL</a>;
            attribute DOMString <a href="#domain" title=dom-document-domain>domain</a>;
@@ -2723,7 +2719,7 @@
   NodeList <a href="#getelementsbyname" title=dom-document-getElementsByName>getElementsByName</a>(in DOMString elementName);
   NodeList <a href="#getelementsbyclassname" title=dom-document-getElementsByClassName>getElementsByClassName</a>(in DOMString classNames);
 
-  // <a href="#dynamic2">Dynamic markup insertion</a>
+  // <a href="#dynamic2">dynamic markup insertion</a>
            attribute DOMString <a href="#innerhtml" title=dom-innerHTML>innerHTML</a>;
   <a href="#htmldocument">HTMLDocument</a> <a href="#open" title=dom-document-open>open</a>();
   <a href="#htmldocument">HTMLDocument</a> <a href="#open" title=dom-document-open>open</a>(in DOMString type);
@@ -2734,14 +2730,10 @@
   void <a href="#document.write" title=dom-document-write>write</a>(in DOMString text);
   void <a href="#document.writeln..." title=dom-document-writeln>writeln</a>(in DOMString text);
 
-  // <a href="#interaction0">Interaction</a>
+  // <a href="#user-interaction">user interaction</a>
+  <a href="#selection1">Selection</a> <a href="#getselection0" title=dom-document-getSelection>getSelection</a>();
   readonly attribute <span>Element</span> <a href="#activeelement" title=dom-document-activeElement>activeElement</a>;
   boolean <a href="#hasfocus" title=dom-document-hasFocus>hasFocus</a>();
-
-  // <a href="#command1" title=concept-command>Commands</a>
-  readonly attribute <a href="#htmlcollection0">HTMLCollection</a> <a href="#commands0" title=dom-document-commands>commands</a>;
-
-  // <a href="#editing0">Editing</a>
            attribute boolean <a href="#designMode" title=dom-document-designMode>designMode</a>;
   boolean <a href="#execCommand" title=dom-document-execCommand>execCommand</a>(in DOMString commandId);
   boolean <a href="#execCommand" title=dom-document-execCommand>execCommand</a>(in DOMString commandId, in boolean showUI);
@@ -2751,7 +2743,7 @@
   boolean <a href="#querycommandstate" title=dom-document-queryCommandState>queryCommandState</a>(in DOMString commandId);
   boolean <a href="#querycommandsupported" title=dom-document-queryCommandSupported>queryCommandSupported</a>(in DOMString commandId);
   DOMString <a href="#querycommandvalue" title=dom-document-queryCommandValue>queryCommandValue</a>(in DOMString commandId);
-  <a href="#selection1">Selection</a> <a href="#getselection0" title=dom-document-getSelection>getSelection</a>();
+  readonly attribute <a href="#htmlcollection0">HTMLCollection</a> <a href="#commands0" title=dom-document-commands>commands</a>;
 };</pre>
 
   <p>Since the <code><a href="#htmldocument">HTMLDocument</a></code>
@@ -2972,22 +2964,18 @@
   readonly attribute <a href="#domtokenlist0">DOMTokenList</a> <a href="#classlist" title=dom-classList>classList</a>;
   readonly attribute <a href="#domstringmap0">DOMStringMap</a> <a href="#dataset" title=dom-dataset>dataset</a>;
 
-  // <a href="#interaction0">interaction</a>
+  // <a href="#user-interaction">user interaction</a>
            attribute boolean <a href="#irrelevant0" title=dom-irrelevant>irrelevant</a>;
+  void <a href="#click1" title=dom-click>click</a>();
+  void <a href="#scrollintoview" title=dom-scrollIntoView>scrollIntoView</a>();
+  void <a href="#scrollintoview" title=dom-scrollIntoView>scrollIntoView</a>(in boolean top);
            attribute long <a href="#tabindex0" title=dom-tabindex>tabIndex</a>;
-  void <a href="#click" title=dom-click>click</a>();
   void <a href="#focus0" title=dom-focus>focus</a>();
   void <a href="#blur" title=dom-blur>blur</a>();
-  void <a href="#scrollintoview" title=dom-scrollIntoView>scrollIntoView</a>();
-  void <a href="#scrollintoview" title=dom-scrollIntoView>scrollIntoView</a>(in boolean top);
-
-  // <a href="#command1" title=concept-command>commands</a>
-           attribute <a href="#htmlmenuelement">HTMLMenuElement</a> <a href="#contextmenu0" title=dom-contextMenu>contextMenu</a>;
-
-  // <a href="#editing0">editing</a>
            attribute boolean <a href="#draggable0" title=dom-draggable>draggable</a>;
            attribute DOMString <a href="#contenteditable1" title=dom-contentEditable>contentEditable</a>;
   readonly attribute DOMString <a href="#iscontenteditable" title=dom-isContentEditable>isContentEditable</a>;
+           attribute <a href="#htmlmenuelement">HTMLMenuElement</a> <a href="#contextmenu0" title=dom-contextMenu>contextMenu</a>;
 
   // <span>styling</span>
   readonly attribute <span>CSSStyleDeclaration</span> <a href="#style0" title=dom-style>style</a>;
@@ -6615,7 +6603,7 @@
 
   <p class=note>The above doesn't happen for arbitrary synthetic events
    dispatched by author script. However, the <code title=dom-click><a
-   href="#click">click()</a></code> method can be used to make it happen
+   href="#click1">click()</a></code> method can be used to make it happen
    programmatically.
 
   <p>For certain form controls, this process is complicated further by <a
@@ -7073,61 +7061,7 @@
    attributes must both <a href="#reflect">reflect</a> the <code
    title=attr-class><a href="#class">class</a></code> content attribute.
 
-  <h4 id=the-irrelevant><span class=secno>3.4.7 </span>The <dfn id=irrelevant
-   title=attr-irrelevant><code>irrelevant</code></dfn> attribute</h4>
-
-  <p>All elements may have the <code title=attr-irrelevant><a
-   href="#irrelevant">irrelevant</a></code> content attribute set. The <code
-   title=attr-irrelevant><a href="#irrelevant">irrelevant</a></code>
-   attribute is a <a href="#boolean0">boolean attribute</a>. When specified
-   on an element, it indicates that the element is not yet, or is no longer,
-   relevant. User agents should not render elements that have the <code
-   title=attr-irrelevant><a href="#irrelevant">irrelevant</a></code>
-   attribute specified.
-
-  <div class=example>
-   <p>In the following skeletal example, the attribute is used to hide the
-    Web game's main screen until the user logs in:</p>
-
-   <pre>  <h1>The Example Game</h1>
-  <section id="login">
-   <h2>Login</h2>
-   <form>
-    ...
-    <!-- calls login() once the user's credentials have been checked -->
-   </form>
-   <script>
-    function login() {
-      // switch screens
-      document.getElementById('login').irrelevant = true;
-      document.getElementById('game').irrelevant = false;
-    }
-   </script>
-  </section>
-  <section id="game" irrelevant>
-   ...
-  </section></pre>
-  </div>
-
-  <p>The <code title=attr-irrelevant><a
-   href="#irrelevant">irrelevant</a></code> attribute must not be used to
-   hide content that could legitimately be shown in another presentation. For
-   example, it is incorrect to use <code title=attr-irrelevant><a
-   href="#irrelevant">irrelevant</a></code> to hide panels in a tabbed
-   dialog, because the tabbed interface is merely a kind of overflow
-   presentation — showing all the form controls in one big page with a
-   scrollbar would be equivalent, and no less correct.
-
-  <p>Elements in a section hidden by the <code title=attr-irrelevant><a
-   href="#irrelevant">irrelevant</a></code> attribute are still active, e.g.
-   scripts and form controls in such sections still render execute and submit
-   respectively. Only their presentation to the user changes.
-
-  <p>The <dfn id=irrelevant0
-   title=dom-irrelevant><code>irrelevant</code></dfn> DOM attribute must <a
-   href="#reflect">reflect</a> the content attribute of the same name.
-
-  <h4 id=the-style><span class=secno>3.4.8 </span>The <dfn id=style
+  <h4 id=the-style><span class=secno>3.4.7 </span>The <dfn id=style
    title=attr-style><code>style</code></dfn> attribute</h4>
 
   <p>All elements may have the <code title=attr-style><a
@@ -7170,7 +7104,7 @@
 background: transparent">blue</span>.</p></pre>
   </div>
 
-  <h4 id=embedding><span class=secno>3.4.9 </span><dfn
+  <h4 id=embedding><span class=secno>3.4.8 </span><dfn
    id=embedding0>Embedding custom non-visible data</dfn></h4>
 
   <p>A <dfn id=custom>custom data attribute</dfn> is an attribute whose name
@@ -7266,328 +7200,9 @@
    attributes or values. Specifications intended for user agents must not
    define these attributes to have any meaningful values.
 
-  <h3 id=interaction><span class=secno>3.5 </span><dfn
-   id=interaction0>Interaction</dfn></h3>
+  <h3 id=the-root><span class=secno>3.5 </span>The root element</h3>
 
-  <h4 id=activation><span class=secno>3.5.1 </span>Activation</h4>
-
-  <p>The <dfn id=click title=dom-click>click()</dfn> method must <a
-   href="#firing">fire a <code>click</code> event</a> at the element, whose
-   default action is the <span title="fire a DOMActivate event">firing of a
-   further <code title=event-DOMActivate>DOMActivate</code> event</span> at
-   the same element, whose own default action is to go through all the
-   elements the <code title=event-DOMActivate>DOMActivate</code> event
-   bubbled through (starting at the target node and going towards the
-   <code>Document</code> node), looking for an element with an <a
-   href="#activation0">activation behavior</a>; the first element, in reverse
-   tree order, to have one, must have its activation behavior executed.
-
-  <h4 id=focus><span class=secno>3.5.2 </span>Focus</h4>
-  <!-- http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%20%0A...%3Cform%3E%3Cinput%20name%3Da%20onfocus%3D%22value%2B%3D1%3Bd.name%3D%27a%27%3Bname%3D%27d%27%3Bb.focus()%22%3E%0A%3Cinput%20name%3Db%20onfocus%3D%22value%2B%3D1%3Bc.focus()%22%3E%0A%3Cinput%20name%3Dc%20onfocus%3D%22value%2B%3D1%3Bd.focus()%22%3E%0A%3Cinput%20name%3Dd%20onfocus%3D%22value%2B%3D1%3Ba.focus()%22%3E -->
-  <!-- http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%0A...%3Cform%3E%0A%3Ctextarea%20name%3Dt%20cols%3D100%20rows%3D3%3E%3C%2Ftextarea%3E%3Cp%3E%0A%3Cinput%20name%3Da%20onfocus%3D%22t.value%2B%3D%27af1%20%27%3Bb.focus()%3Balert(document.activeElement.name)%3Bt.value%2B%3D%27af2%20%27%3B%22%20onblur%3D%22t.value%2B%3D%27ab%20%27%3B%22%3E%0A%3Cinput%20name%3Db%20onfocus%3D%22t.value%2B%3D%27bf1%20%27%3Bc.focus()%3Bt.value%2B%3D%27bf2%20%27%3B%22%20onblur%3D%22t.value%2B%3D%27bb%20%27%3B%22%3E%0A%3Cinput%20name%3Dc%20onfocus%3D%22t.value%2B%3D%27cf1%20%27%3Bc.focus()%3Bt.value%2B%3D%27cf2%20%27%3B%22%20onblur%3D%22t.value%2B%3D%27cb%20%27%3B%22%3E%0A -->
-  <!-- http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%3Cbody%20onload%3D%22document.forms%5B0%5D.a.focus()%22%3E%0A...%3Cform%3E%0A%3Ctextarea%20name%3Dt%20cols%3D100%20rows%3D3%3E%3C%2Ftextarea%3E%3Cp%3E%0A%3Cinput%20name%3Da%20onblur%3D%22t.value%2B%3D'ab%20'%3B%20b.focus()%3B%22%3E%0A%3Cinput%20name%3Db%20onfocus%3D%22t.value%2B%3D'bf1%20'%3Ba.focus()%3Bt.value%2B%3D'bf2%20'%3B%22%20onblur%3D%22t.value%2B%3D'bb%20'%3B%22%3E -->
-  <!-- http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%3Cbody%3E...%3Cform%3E%0A%3Ctextarea%20name%3Dt%20cols%3D100%20rows%3D3%3E%3C%2Ftextarea%3E%3Cp%3E%0A%3Cinput%20name%3Da%20onfocus%3D%22t.value%2B%3D%27af%20%27%3B%22%20onblur%3D%22t.value%2B%3D%27ab1%20%27%3Bb.focus()%3Bt.value%2B%3D%27ab2%20%27%3B%22%3E%0A%3Cinput%20name%3Db%20onfocus%3D%22t.value%2B%3D%27bf1%20%27%3Ba.focus()%3Bt.value%2B%3D%27bf2%20%27%3B%22%20onblur%3D%22t.value%2B%3D%27bb%20%27%3B%22%3E -->
-
-  <p>When an element is <em>focused</em>, key events received by the document
-   must be targeted at that element. There may be no element focused; when no
-   element is focused, key events received by the document must be targetted
-   at <a href="#the-body1">the <code>body</code> element</a>.
-
-  <p>User agents may track focus for each <a href="#browsing1">browsing
-   context</a> or <code>Document</code> individually, or may support only one
-   focused elment per <a href="#top-level">top-level browsing context</a>
-   — user agents should follow platform conventions in this regard.
-
-  <p>Which element(s) within a <a href="#top-level">top-level browsing
-   context</a> currently has focus must be independent of whether or not the
-   <a href="#top-level">top-level browsing context</a> itself has the
-   <em>system focus</em>.
-
-  <h5 id=focus-management><span class=secno>3.5.2.1. </span>Focus management</h5>
-
-  <p>The <dfn id=focusing>focusing steps</dfn> are as follows:
-
-  <ol>
-   <li>
-    <p>If focusing the element will remove the focus from another element,
-     then run the <a href="#unfocusing">unfocusing steps</a> for that
-     element.
-
-   <li>
-    <p>Make the element the currently focused element in its <a
-     href="#top-level">top-level browsing context</a>.</p>
-
-    <p>Some elements, most notably <code><a href="#area">area</a></code>, can
-     correspond to more than one distinct focusable area. If a particular
-     area was indicated when the element was focused, then that is the area
-     that must get focus; otherwise, e.g. when using the <code
-     title=dom-focus><a href="#focus0">focus()</a></code> method, the first
-     such region in tree order is the one that must be focused.</p>
-
-   <li>
-    <p><a href="#firing2">Fire a simple event</a> that doesn't bubble called
-     <code title=event-focus>focus</code> at the element.
-  </ol>
-
-  <p>User agents must run the <a href="#focusing">focusing steps</a> for an
-   element whenever the user moves the focus to a <a
-   href="#focusable">focusable</a> element.
-
-  <p>The <dfn id=unfocusing>unfocusing steps</dfn> are as follows:
-
-  <ol><!-- XXX onchange event for input controls -->
-
-   <li>
-    <p>Unfocus the element.
-
-   <li>
-    <p><a href="#firing2">Fire a simple event</a> that doesn't bubble called
-     <code title=event-blur>blur</code> at the element.
-  </ol>
-
-  <p>User agents should run the <a href="#unfocusing">unfocusing steps</a>
-   for an element whenever the user moves the focus away from any <a
-   href="#focusable">focusable</a> element.
-
-  <hr>
-
-  <p>The <dfn id=focus0 title=dom-focus><code>focus()</code></dfn> method,
-   when invoked, must run the following algorithm:
-
-  <ol>
-   <li>
-    <p>If the element is marked as <i><a href="#locked">locked for
-     focus</a></i>, then abort these steps.
-
-   <li>
-    <p>If the element is not <a href="#focusable">focusable</a>, then abort
-     these steps.
-
-   <li>
-    <p>Mark the element as <dfn id=locked>locked for focus</dfn>.
-
-   <li>
-    <p>If the element is not already focused, run the <a
-     href="#focusing">focusing steps</a> for the element.
-
-   <li>
-    <p>Unmark the element as <i><a href="#locked">locked for focus</a></i>.
-  </ol>
-
-  <p>The <dfn id=blur title=dom-blur><code>blur()</code></dfn> method, when
-   invoked, should run the <a href="#unfocusing">unfocusing steps</a> for the
-   element. User agents may selectively or uniformly ignore calls to this
-   method for usability reasons.</p>
-  <!-- XXX define onfocus/onblur behaviour for Window -->
-
-  <hr>
-
-  <p>The <dfn id=activeelement
-   title=dom-document-activeElement><code>activeElement</code></dfn>
-   attribute must return the element in the document that is focused. If no
-   element in the <code>Document</code> is focused, this must return <a
-   href="#the-body1">the <code>body</code> element</a>.
-
-  <p>The <dfn id=hasfocus
-   title=dom-document-hasFocus><code>hasFocus()</code></dfn> method must
-   return true if the document, one of its nested <a href="#browsing1"
-   title="browsing context">browsing contexts</a>, or any element in the
-   document or its browsing contexts currently has the system focus.
-
-  <h5 id=sequential><span class=secno>3.5.2.2. </span>Sequential focus
-   navigation</h5>
-
-  <p>The <dfn id=tabindex title=attr-tabindex><code>tabindex</code></dfn>
-   content attribute specifies whether the element is focusable, whether it
-   can be reached using sequential focus navigation, and the relative order
-   of the element for the purposes of sequential focus navigation. The name
-   "tab index" comes from the common use of the "tab" key to navigate through
-   the focusable elements. The term "tabbing" refers to moving forward
-   through the focusable elements that can be reached using sequential focus
-   navigation.
-
-  <p>The <code title=attr-tabindex><a href="#tabindex">tabindex</a></code>
-   attribute, if specified, must have a value that is a <a
-   href="#valid0">valid integer</a>.
-
-  <p>If the attribute is specified, it must be parsed using the <a
-   href="#rules0">rules for parsing integers</a>. The attribute's values have
-   the following meanings:
-
-  <dl>
-   <dt>If the attribute is omitted or parsing the value returns an error
-
-   <dd>
-    <p>The user agent should follow platform conventions to determine if the
-     element is to be focusable and, if so, whether the element can be
-     reached using sequential focus navigation, and if so, what its relative
-     order should be.</p>
-
-   <dt id=negative-tabindex>If the value is a negative integer
-
-   <dd>
-    <p>The user agent must allow the element to be focused, but should not
-     allow the element to be reached using sequential focus navigation.</p>
-
-   <dt>If the value is a zero
-
-   <dd>
-    <p>The user agent must allow the element to be focused, should allow the
-     element to be reached using sequential focus navigation, and should
-     follow platform conventions to determine the element's relative order.</p>
-
-   <dt>If the value is greater than zero
-
-   <dd>
-    <p>The user agent must allow the element to be focused, should allow the
-     element to be reached using sequential focus navigation, and should
-     place the element in the sequential focus navigation order so that it
-     is:</p>
-
-    <ul>
-     <li>before any focusable element whose <code title=attr-tabindex><a
-      href="#tabindex">tabindex</a></code> attribute has been omitted or
-      whose value, when parsed, returns an error,
-
-     <li>before any focusable element whose <code title=attr-tabindex><a
-      href="#tabindex">tabindex</a></code> attribute has a value equal to or
-      less than zero,
-
-     <li>after any element whose <code title=attr-tabindex><a
-      href="#tabindex">tabindex</a></code> attribute has a value greater than
-      zero but less than the value of the <code title=attr-tabindex><a
-      href="#tabindex">tabindex</a></code> attribute on the element,
-
-     <li>after any element whose <code title=attr-tabindex><a
-      href="#tabindex">tabindex</a></code> attribute has a value equal to the
-      value of the <code title=attr-tabindex><a
-      href="#tabindex">tabindex</a></code> attribute on the element but that
-      is earlier in the document in <a href="#tree-order">tree order</a> than
-      the element,
-
-     <li>before any element whose <code title=attr-tabindex><a
-      href="#tabindex">tabindex</a></code> attribute has a value equal to the
-      value of the <code title=attr-tabindex><a
-      href="#tabindex">tabindex</a></code> attribute on the element but that
-      is later in the document in <a href="#tree-order">tree order</a> than
-      the element, and
-
-     <li>before any element whose <code title=attr-tabindex><a
-      href="#tabindex">tabindex</a></code> attribute has a value greater than
-      the value of the <code title=attr-tabindex><a
-      href="#tabindex">tabindex</a></code> attribute on the element.
-    </ul>
-  </dl>
-
-  <p>An element is <dfn id=focusable>focusable</dfn> if the <code
-   title=attr-tabindex><a href="#tabindex">tabindex</a></code> attribute's
-   definition above defines the element to be focusable <em>and</em> the
-   element is <span>being
-   rendered</span><!-- XXX xref, define display:none as not
-  being rendered, off-screen as being rendered? -->.
-
-  <p>When an element is focused, the element matches the CSS
-   <code>:focus</code> pseudo-class and key events are dispatched on that
-   element in response to keyboard input.
-
-  <p>The <dfn id=tabindex0 title=dom-tabIndex><code>tabIndex</code></dfn> DOM
-   attribute must <a href="#reflect">reflect</a> the value of the <code
-   title=attr-tabIndex><a href="#tabindex">tabIndex</a></code> content
-   attribute. If the attribute is not present, or parsing its value returns
-   an error, then the DOM attribute must return 0 for elements that are
-   focusable and &#x2212;1 for elements that are not focusable.</p>
-  <!--XXX
-  <h5>The <dfn><code>DocumentFocus</code></dfn> interface</h5>
-
-  <p>The <code>DocumentFocus</code> interface contains methods for
-  moving focus around the document. It can be obtained from objects
-  that implement the <code>Document</code> interface using
-  binding-specific casting methods.</p>
-
-  <p class="big-issue">Actually even better would be to just mix it
-  straight into those interfaces somehow.</p>
-
-  <pre class="idl">[NoInterfaceObject] interface <dfn>DocumentFocus</dfn> {
-  void moveFocusForward();
-  void moveFocusBackward();
-  void moveFocusUp();
-  void moveFocusRight();
-  void moveFocusDown();
-  void moveFocusLeft();
-};</pre>
-
-  <p>The <dfn><code>currentFocus</code></dfn> attribute returns the
-  element to which key events will be sent when the document receives
-  key events.</p>
-
-  <p>The <dfn><code>moveFocusForward</code></dfn> method uses the
-  <code>'nav-index'</code> property and the <code
-  title="attr-tabindex">tabindex</code> attribute to find the next
-  focusable element and focuses it.</p>
-
-  <p>The <dfn><code>moveFocusBackward</code></dfn> method uses the
-  <code>'nav-index'</code> property and the <code
-  title="attr-tabindex>tabindex</code> attribute to find the previous
-  focusable element and focuses it.</p>
-
-  <p>The <dfn><code>moveFocusUp</code></dfn> method uses the
-  <code>'nav-up'</code> property and the <code
-  title="attr-tabindex>tabindex</code> attribute to find an
-  appropriate focusable element and focuses it.</p>
-
-  <p>In a similar manner, the <dfn><code>moveFocusRight</code></dfn>,
-  <dfn><code>moveFocusDown</code></dfn>, and
-  <dfn><code>moveFocusLeft</code></dfn> methods use the
-  <code>'nav-right'</code>, <code>'nav-down'</code>, and
-  <code>'nav-left'</code> properties (respectively), and the <code
-  title="attr-tabindex>tabindex</code> attribute, to find an
-  appropriate focusable element and focus it.</p>
-
-  <p>The <code>'nav-index'</code>, <code>'nav-up'</code>,
-  <code>'nav-right'</code>, <code>'nav-down'</code>, and
-  <code>'nav-left'</code> properties are defined in <a
-  href="#refsCSS3UI">[CSS3UI]</a>.</p>
-
-Other things to look at are IE's focus APIs (document.activeElement,
-document.hasFocus, HTMLElement.setActive(), onBeforeActivate,
-onActivate, onBeforeDeactivate, onDeactivate, document.hasFocus):
-   https://bugzilla.mozilla.org/show_bug.cgi?id=296471
-   https://bugzilla.mozilla.org/show_bug.cgi?id=296469
-   http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/activeelement.asp
-   http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/setactive.asp
-   http://msdn.microsoft.com/workshop/author/dhtml/reference/events/onbeforeactivate.asp
-   http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/focus.asp
--->
-
-  <h4 id=scrolling><span class=secno>3.5.3 </span>Scrolling elements into
-   view</h4>
-
-  <p>The <dfn id=scrollintoview
-   title=dom-scrollIntoView><code>scrollIntoView([<var
-   title="">top</var>])</code></dfn> method, when called, must cause the
-   element on which the method was called to have the attention of the user
-   called to it.
-
-  <p class=note>In a speech browser, this could happen by having the current
-   playback position move to the start of the given element.
-
-  <p>In visual user agents, if the argument is present and has the value
-   false, the user agent should scroll the element into view such that both
-   the bottom and the top of the element are in the viewport, with the bottom
-   of the element aligned with the bottom of the viewport. If it isn't
-   possible to show the entire element in that way, or if the argument is
-   omitted or is true, then the user agent should instead align the top of
-   the element with the top of the viewport. Visual user agents should
-   further scroll horizontally as necessary to bring the element to the
-   attention of the user.
-
-  <p>Non-visual user agents may ignore the argument, or may treat it in some
-   media-specific manner most useful to the user.</p>
-  <!-- XXX maybe this should move to CSSOM -->
-
-  <h3 id=the-root><span class=secno>3.6 </span>The root element</h3>
-
-  <h4 id=the-html><span class=secno>3.6.1 </span>The <dfn
+  <h4 id=the-html><span class=secno>3.5.1 </span>The <dfn
    id=html><code>html</code></dfn> element</h4>
 
   <dl class=element>
@@ -7643,9 +7258,9 @@
    href="#manifest">manifest</a></code> attributes, as the attributes are
    processed before those elements are seen.
 
-  <h3 id=document><span class=secno>3.7 </span>Document metadata</h3>
+  <h3 id=document><span class=secno>3.6 </span>Document metadata</h3>
 
-  <h4 id=the-head><span class=secno>3.7.1 </span>The <dfn
+  <h4 id=the-head><span class=secno>3.6.1 </span>The <dfn
    id=head><code>head</code></dfn> element</h4>
 
   <dl class=element>
@@ -7675,7 +7290,7 @@
   <p>The <code><a href="#head">head</a></code> element collects the
    document's metadata.
 
-  <h4 id=the-title0><span class=secno>3.7.2 </span>The <dfn
+  <h4 id=the-title0><span class=secno>3.6.2 </span>The <dfn
    id=title1><code>title</code></dfn> element</h4>
 
   <dl class=element>
@@ -7741,7 +7356,7 @@
    agents should use the document's title when referring to the document in
    their user interface.
 
-  <h4 id=the-base><span class=secno>3.7.3 </span>The <dfn
+  <h4 id=the-base><span class=secno>3.6.3 </span>The <dfn
    id=base><code>base</code></dfn> element</h4>
 
   <dl class=element>
@@ -7836,7 +7451,7 @@
    must <a href="#reflect">reflect</a> the content attributes of the same
    name.
 
-  <h4 id=the-link><span class=secno>3.7.4 </span>The <dfn
+  <h4 id=the-link><span class=secno>3.6.4 </span>The <dfn
    id=link><code>link</code></dfn> element</h4>
 
   <dl class=element>
@@ -8113,7 +7728,7 @@
   <!-- that is
   normatively required in the definition of dom-linkstyle-disabled -->
 
-  <h4 id=meta><span class=secno>3.7.5 </span>The <dfn
+  <h4 id=meta><span class=secno>3.6.5 </span>The <dfn
    id=meta0><code>meta</code></dfn> element</h4>
 
   <dl class=element>
@@ -8252,7 +7867,7 @@
    href="#reflect">reflect</a> the content attribute <code
    title=attr-meta-http-equiv><a href="#http-equiv0">http-equiv</a></code>.
 
-  <h5 id=standard><span class=secno>3.7.5.1. </span>Standard metadata names</h5>
+  <h5 id=standard><span class=secno>3.6.5.1. </span>Standard metadata names</h5>
 
   <p>This specification defines a few names for the <code
    title=attr-meta-name><a href="#name">name</a></code> attribute of the
@@ -8288,7 +7903,7 @@
      pages.
   </dl>
 
-  <h5 id=other><span class=secno>3.7.5.2. </span>Other metadata names</h5>
+  <h5 id=other><span class=secno>3.6.5.2. </span>Other metadata names</h5>
 
   <p><dfn id=extensions title=concept-meta-extensions>Extensions to the
    predefined set of metadata names</dfn> may be registered in the <a
@@ -8371,7 +7986,7 @@
    href="#link">link</a></code> element, not the <code><a
    href="#meta0">meta</a></code> element.
 
-  <h5 id=pragma><span class=secno>3.7.5.3. </span>Pragma directives</h5>
+  <h5 id=pragma><span class=secno>3.6.5.3. </span>Pragma directives</h5>
 
   <p>When the <dfn id=http-equiv
    title=attr-meta-http-equiv><code>http-equiv</code></dfn> attribute is
@@ -8685,7 +8300,7 @@
   <p>There must not be more than one <code><a href="#meta0">meta</a></code>
    element with any particular state in the document at a time.
 
-  <h5 id=charset><span class=secno>3.7.5.4. </span>Specifying the document's
+  <h5 id=charset><span class=secno>3.6.5.4. </span>Specifying the document's
    character encoding</h5>
   <!-- XXX maybe the rest should move to "writing html" section,
   though if we do then we have to duplicate the requirements in the
@@ -8752,7 +8367,7 @@
   <p>In XHTML, the XML declaration should be used for inline character
    encoding information, if necessary.
 
-  <h4 id=the-style0><span class=secno>3.7.6 </span>The <dfn
+  <h4 id=the-style0><span class=secno>3.6.6 </span>The <dfn
    id=style1><code>style</code></dfn> element</h4>
 
   <dl class=element>
@@ -8898,7 +8513,7 @@
    defined <a href="#disabled1" title=dom-linkstyle-disabled>for the
    alternative style sheets DOM</a>.
 
-  <h4 id=styling><span class=secno>3.7.7 </span><dfn id=styling0
+  <h4 id=styling><span class=secno>3.6.7 </span><dfn id=styling0
    title="styling processing model">Styling</dfn></h4>
 
   <p>The <code><a href="#link">link</a></code> and <code><a
@@ -8984,7 +8599,7 @@
   .styleSheets, HTTP Link: headers, and the stuff about the alternative
   stylesheet API.</p> XXX that will all be covered by Anne's spec -->
 
-  <h3 id=sections><span class=secno>3.8 </span>Sections</h3>
+  <h3 id=sections><span class=secno>3.7 </span>Sections</h3>
 
   <p id=applyToSection>Some elements, for example <code><a
    href="#address">address</a></code> elements, are scoped to their nearest
@@ -8995,7 +8610,7 @@
    href="#sectioning0">sectioning content</a> ancestor is <var
    title="">e</var>.
 
-  <h4 id=the-body><span class=secno>3.8.1 </span>The <dfn
+  <h4 id=the-body><span class=secno>3.7.1 </span>The <dfn
    id=body0><code>body</code></dfn> element</h4>
 
   <dl class=element>
@@ -9038,7 +8653,7 @@
    element in the DOM, as per the definition of the term, and not any
    arbitrary <code><a href="#body0">body</a></code> element.
 
-  <h4 id=the-section><span class=secno>3.8.2 </span>The <dfn
+  <h4 id=the-section><span class=secno>3.7.2 </span>The <dfn
    id=section><code>section</code></dfn> element</h4>
 
   <dl class=element>
@@ -9075,7 +8690,7 @@
    site's home page could be split into sections for an introduction, news
    items, contact information.
 
-  <h4 id=the-nav><span class=secno>3.8.3 </span>The <dfn
+  <h4 id=the-nav><span class=secno>3.7.3 </span>The <dfn
    id=nav><code>nav</code></dfn> element</h4>
 
   <dl class=element>
@@ -9143,7 +8758,7 @@
 </body></pre>
   </div>
 
-  <h4 id=the-article><span class=secno>3.8.4 </span>The <dfn
+  <h4 id=the-article><span class=secno>3.7.4 </span>The <dfn
    id=article><code>article</code></dfn> element</h4>
 
   <dl class=element>
@@ -9203,7 +8818,7 @@
    href="#address">address</a></code> element) does not apply to nested
    <code><a href="#article">article</a></code> elements.
 
-  <h4 id=the-aside><span class=secno>3.8.5 </span>The <dfn
+  <h4 id=the-aside><span class=secno>3.7.5 </span>The <dfn
    id=aside><code>aside</code></dfn> element</h4>
 
   <dl class=element>
@@ -9273,7 +8888,7 @@
 ...</pre>
   </div>
 
-  <h4 id=the-h1><span class=secno>3.8.6 </span>The <dfn
+  <h4 id=the-h1><span class=secno>3.7.6 </span>The <dfn
    id=h1><code>h1</code></dfn>, <dfn id=h2><code>h2</code></dfn>, <dfn
    id=h3><code>h3</code></dfn>, <dfn id=h4><code>h4</code></dfn>, <dfn
    id=h5><code>h5</code></dfn>, and <dfn id=h6><code>h6</code></dfn> elements</h4>
@@ -9312,7 +8927,7 @@
    the highest rank, the <code><a href="#h6">h6</a></code> element has the
    lowest rank, and two elements with the same name have equal rank.
 
-  <h4 id=the-header><span class=secno>3.8.7 </span>The <dfn
+  <h4 id=the-header><span class=secno>3.7.7 </span>The <dfn
    id=header><code>header</code></dfn> element</h4>
 
   <dl class=element>
@@ -9411,7 +9026,7 @@
 </header></pre>
   </div>
 
-  <h4 id=the-footer><span class=secno>3.8.8 </span>The <dfn
+  <h4 id=the-footer><span class=secno>3.7.8 </span>The <dfn
    id=footer><code>footer</code></dfn> element</h4>
 
   <dl class=element>
@@ -9469,7 +9084,7 @@
 </body></pre>
   </div>
 
-  <h4 id=the-address><span class=secno>3.8.9 </span>The <dfn
+  <h4 id=the-address><span class=secno>3.7.9 </span>The <dfn
    id=address><code>address</code></dfn> element</h4>
 
   <dl class=element>
@@ -9552,7 +9167,7 @@
    element, does not apply to its ancestor elements, e.g. the page's <code><a
    href="#body0">body</a></code>.
 
-  <h4 id=headings><span class=secno>3.8.10 </span><dfn id=headings0>Headings
+  <h4 id=headings><span class=secno>3.7.10 </span><dfn id=headings0>Headings
    and sections</dfn></h4>
 
   <p>The <code><a href="#h1">h1</a></code>–<code><a
@@ -9664,7 +9279,7 @@
     produce the same outline in compliant user agents.</p>
   </div>
 
-  <h5 id=outlines><span class=secno>3.8.10.1. </span>Creating an outline</h5>
+  <h5 id=outlines><span class=secno>3.7.10.1. </span>Creating an outline</h5>
 
   <p>This section defines an algorithm for creating an <dfn
    id=outline>outline</dfn> for a <a href="#sectioning0">sectioning
@@ -9920,7 +9535,7 @@
 }</pre>
   </div>
 
-  <h5 id=distinguishing><span class=secno>3.8.10.2. </span>Distinguishing
+  <h5 id=distinguishing><span class=secno>3.7.10.2. </span>Distinguishing
    site-wide headings from page headings</h5>
 
   <p>Given the <a href="#outline">outline</a> of a document, but ignoring any
@@ -9961,10 +9576,10 @@
    original single page becomes the heading of the site, repeated on every
    page.
 
-  <h3 id=grouping><span class=secno>3.9 </span>Grouping content</h3>
+  <h3 id=grouping><span class=secno>3.8 </span>Grouping content</h3>
   <!-- XXX ew, find a better section name -->
 
-  <h4 id=the-p><span class=secno>3.9.1 </span>The <dfn
+  <h4 id=the-p><span class=secno>3.8.1 </span>The <dfn
    id=p><code>p</code></dfn> element</h4>
 
   <dl class=element>
@@ -10046,7 +9661,7 @@
 </section></pre>
   </div>
 
-  <h4 id=the-hr><span class=secno>3.9.2 </span>The <dfn
+  <h4 id=the-hr><span class=secno>3.8.2 </span>The <dfn
    id=hr><code>hr</code></dfn> element</h4>
 
   <dl class=element>
@@ -10076,7 +9691,7 @@
    in a story, or a transition to another topic within a section of a
    reference book.
 
-  <h4 id=the-br><span class=secno>3.9.3 </span>The <dfn
+  <h4 id=the-br><span class=secno>3.8.3 </span>The <dfn
    id=br><code>br</code></dfn> element</h4>
 
   <dl class=element>
@@ -10151,7 +9766,7 @@
   content shouldn't go over the wire, though. We need to make it
   illegal while still defining what it means. Maybe. -->
 
-  <h4 id=the-pre><span class=secno>3.9.4 </span>The <dfn
+  <h4 id=the-pre><span class=secno>3.8.4 </span>The <dfn
    id=pre><code>pre</code></dfn> element</h4>
 
   <dl class=element>
@@ -10257,7 +9872,7 @@
 ~cdr 11dec07</pre></pre>
   </div>
 
-  <h4 id=the-dialog><span class=secno>3.9.5 </span>The <dfn
+  <h4 id=the-dialog><span class=secno>3.8.5 </span>The <dfn
    id=dialog><code>dialog</code></dfn> element</h4>
 
   <dl class=element>
@@ -10324,7 +9939,7 @@
    and <code><a href="#blockquote">blockquote</a></code> elements for other
    ways to cite or quote.
 
-  <h4 id=the-blockquote><span class=secno>3.9.6 </span>The <dfn
+  <h4 id=the-blockquote><span class=secno>3.8.6 </span>The <dfn
    id=blockquote><code>blockquote</code></dfn> element</h4>
 
   <dl class=element>
@@ -10391,7 +10006,7 @@
    href="#blockquote">blockquote</a></code> elements, but with the <code><a
    href="#dialog">dialog</a></code> element.
 
-  <h4 id=the-ol><span class=secno>3.9.7 </span>The <dfn
+  <h4 id=the-ol><span class=secno>3.8.7 </span>The <dfn
    id=ol><code>ol</code></dfn> element</h4>
 
   <dl class=element>
@@ -10507,7 +10122,7 @@
 </ol></pre>
   </div>
 
-  <h4 id=the-ul><span class=secno>3.9.8 </span>The <dfn
+  <h4 id=the-ul><span class=secno>3.8.8 </span>The <dfn
    id=ul><code>ul</code></dfn> element</h4>
 
   <dl class=element>
@@ -10573,7 +10188,7 @@
 </ul></pre>
   </div>
 
-  <h4 id=the-li><span class=secno>3.9.9 </span>The <dfn
+  <h4 id=the-li><span class=secno>3.8.9 </span>The <dfn
    id=li><code>li</code></dfn> element</h4>
 
   <dl class=element>
@@ -10687,7 +10302,7 @@
 </figure></pre>
   </div>
 
-  <h4 id=the-dl><span class=secno>3.9.10 </span>The <dfn
+  <h4 id=the-dl><span class=secno>3.8.10 </span>The <dfn
    id=dl><code>dl</code></dfn> element</h4>
 
   <dl class=element>
@@ -10848,7 +10463,7 @@
    speaker/line pair comes after the next). For an example of how to mark up
    dialogue, see the <code><a href="#dialog">dialog</a></code> element.
 
-  <h4 id=the-dt><span class=secno>3.9.11 </span>The <dfn
+  <h4 id=the-dt><span class=secno>3.8.11 </span>The <dfn
    id=dt><code>dt</code></dfn> element</h4>
 
   <dl class=element>
@@ -10912,7 +10527,7 @@
 </dialog></pre>
    <!-- with thanks to http://bash.org/?854262 --></div>
 
-  <h4 id=the-dd><span class=secno>3.9.12 </span>The <dfn
+  <h4 id=the-dd><span class=secno>3.8.12 </span>The <dfn
    id=dd><code>dd</code></dfn> element</h4>
 
   <dl class=element>
@@ -10948,10 +10563,10 @@
    discourse, or quote, part in a conversation (<code><a
    href="#dialog">dialog</a></code> element).
 
-  <h3 id=text-level><span class=secno>3.10 </span>Text-level semantics</h3>
+  <h3 id=text-level><span class=secno>3.9 </span>Text-level semantics</h3>
   <!-- XXX ew, find a better section name -->
 
-  <h4 id=the-a><span class=secno>3.10.1 </span>The <dfn
+  <h4 id=the-a><span class=secno>3.9.1 </span>The <dfn
    id=a><code>a</code></dfn> element</h4>
 
   <dl class=element>
@@ -11062,7 +10677,7 @@
    <li>
     <p>If the <code title=event-DOMActivate>DOMActivate</code> event in
      question is not <span title=concept-events-trusted>trusted</span> (i.e.
-     a <code title=dom-click><a href="#click">click()</a></code> method call
+     a <code title=dom-click><a href="#click1">click()</a></code> method call
      was the reason for the event being dispatched), and the <code><a
      href="#a">a</a></code> element's <code title=attr-hyperlink-target><a
      href="#target3">target</a></code> attribute is <span
@@ -11124,7 +10739,7 @@
    href="#reflect">reflect</a> the <code title=attr-hyperlink-rel><a
    href="#rel3">rel</a></code> content attribute.
 
-  <h4 id=the-q><span class=secno>3.10.2 </span>The <dfn
+  <h4 id=the-q><span class=secno>3.9.2 </span>The <dfn
    id=q><code>q</code></dfn> element</h4>
 
   <dl class=element>
@@ -11206,7 +10821,7 @@
    <pre><p>His best argument: <q>I disagree!</q></p></pre>
   </div>
 
-  <h4 id=the-cite><span class=secno>3.10.3 </span>The <dfn
+  <h4 id=the-cite><span class=secno>3.9.3 </span>The <dfn
    id=cite2><code>cite</code></dfn> element</h4>
 
   <dl class=element>
@@ -11332,7 +10947,7 @@
   ...</pre>
   </div>
 
-  <h4 id=the-em><span class=secno>3.10.4 </span>The <dfn
+  <h4 id=the-em><span class=secno>3.9.4 </span>The <dfn
    id=em><code>em</code></dfn> element</h4>
 
   <dl class=element>
@@ -11411,7 +11026,7 @@
 
   -->
 
-  <h4 id=the-strong><span class=secno>3.10.5 </span>The <dfn
+  <h4 id=the-strong><span class=secno>3.9.5 </span>The <dfn
    id=strong><code>strong</code></dfn> element</h4>
 
   <dl class=element>
@@ -11459,7 +11074,7 @@
 ten meters.</strong></strong> You have been warned.</p></pre>
   </div>
 
-  <h4 id=the-small><span class=secno>3.10.6 </span>The <dfn
+  <h4 id=the-small><span class=secno>3.9.6 </span>The <dfn
    id=small><code>small</code></dfn> element</h4>
 
   <dl class=element>
@@ -11519,7 +11134,7 @@
    <pre><p><strong><small>Continued use of this service will result in a kiss.</small></strong></p></pre>
   </div>
 
-  <h4 id=the-mark><span class=secno>3.10.7 </span>The <dfn
+  <h4 id=the-mark><span class=secno>3.9.7 </span>The <dfn
    id=mark><code>mark</code></dfn> element</h4>
 
   <dl class=element>
@@ -11666,7 +11281,7 @@
 wormhole connection.</mark></p></pre>
   </div>
 
-  <h4 id=the-dfn><span class=secno>3.10.8 </span>The <dfn
+  <h4 id=the-dfn><span class=secno>3.9.8 </span>The <dfn
    id=dfn><code>dfn</code></dfn> element</h4>
 
   <dl class=element>
@@ -11763,7 +11378,7 @@
 - mpt
 -->
 
-  <h4 id=the-abbr><span class=secno>3.10.9 </span>The <dfn
+  <h4 id=the-abbr><span class=secno>3.9.9 </span>The <dfn
    id=abbr><code>abbr</code></dfn> element</h4>
 
   <dl class=element>
@@ -11855,7 +11470,7 @@
 <abbr>HTMLWG</abbr>.</p></pre>
   </div>
 
-  <h4 id=the-time><span class=secno>3.10.10 </span>The <dfn
+  <h4 id=the-time><span class=secno>3.9.10 </span>The <dfn
    id=time><code>time</code></dfn> element</h4>
 
   <dl class=element>
@@ -12005,7 +11620,7 @@
    for marking event dates in hCalendar markup. Thus the DOM APIs are likely
    to be used as ways to generate interactive calendar widgets or some such.
 
-  <h4 id=the-progress><span class=secno>3.10.11 </span>The <dfn
+  <h4 id=the-progress><span class=secno>3.9.11 </span>The <dfn
    id=progress><code>progress</code></dfn> element</h4>
 
   <dl class=element>
@@ -12197,7 +11812,7 @@
    attribute must return &#x2212;1. Otherwise, it must return the result of
    dividing the current value by the maximum value.
 
-  <h4 id=the-meter><span class=secno>3.10.12 </span>The <dfn
+  <h4 id=the-meter><span class=secno>3.9.12 </span>The <dfn
    id=meter><code>meter</code></dfn> element</h4>
   <!-- Keep this after <progress> and NOT close to <time> -->
 
@@ -12594,7 +12209,7 @@
 should we make the contents accessible in some way, e.g. as a tooltip?
 -->
 
-  <h4 id=the-code><span class=secno>3.10.13 </span>The <dfn
+  <h4 id=the-code><span class=secno>3.9.13 </span>The <dfn
    id=code><code>code</code></dfn> element</h4>
 
   <dl class=element>
@@ -12661,7 +12276,7 @@
   <p class=note>See the <code><a href="#pre">pre</a></code> element for more
    details.
 
-  <h4 id=the-var><span class=secno>3.10.14 </span>The <dfn
+  <h4 id=the-var><span class=secno>3.9.14 </span>The <dfn
    id=var><code>var</code></dfn> element</h4>
 
   <dl class=element>
@@ -12700,7 +12315,7 @@
 flavours of ice cream to be available for purchase!</p></pre>
   </div>
 
-  <h4 id=the-samp><span class=secno>3.10.15 </span>The <dfn
+  <h4 id=the-samp><span class=secno>3.9.15 </span>The <dfn
    id=samp><code>samp</code></dfn> element</h4>
 
   <dl class=element>
@@ -12750,7 +12365,7 @@
 <samp class="prompt">jdoe at demo:~$</samp> <samp class="cursor">_</samp></samp></pre></pre>
   </div>
 
-  <h4 id=the-kbd><span class=secno>3.10.16 </span>The <dfn
+  <h4 id=the-kbd><span class=secno>3.9.16 </span>The <dfn
    id=kbd><code>kbd</code></dfn> element</h4>
 
   <dl class=element>
@@ -12811,7 +12426,7 @@
 </p></pre>
   </div>
 
-  <h4 id=the-sub><span class=secno>3.10.17 </span>The <dfn
+  <h4 id=the-sub><span class=secno>3.9.17 </span>The <dfn
    id=sub><code>sub</code></dfn> and <dfn id=sup><code>sup</code></dfn>
    elements</h4>
 
@@ -12882,7 +12497,7 @@
    <pre>f(<var>x</var>, <var>n</var>) = log<sub>4</sub><var>x</var><sup><var>n</var></sup></pre>
   </div>
 
-  <h4 id=the-span><span class=secno>3.10.18 </span>The <dfn
+  <h4 id=the-span><span class=secno>3.9.18 </span>The <dfn
    id=span><code>span</code></dfn> element</h4>
 
   <dl class=element>
@@ -12927,7 +12542,7 @@
   </div>
 -->
 
-  <h4 id=the-i><span class=secno>3.10.19 </span>The <dfn
+  <h4 id=the-i><span class=secno>3.9.19 </span>The <dfn
    id=i><code>i</code></dfn> element</h4>
 
   <dl class=element>
@@ -13006,7 +12621,7 @@
    restyled. Thus, it is not the case that content in <code><a
    href="#i">i</a></code> elements will necessarily be italicized.
 
-  <h4 id=the-b><span class=secno>3.10.20 </span>The <dfn
+  <h4 id=the-b><span class=secno>3.9.20 </span>The <dfn
    id=b><code>b</code></dfn> element</h4>
 
   <dl class=element>
@@ -13093,7 +12708,7 @@
    restyled. Thus, it is not the case that content in <code><a
    href="#b">b</a></code> elements will necessarily be boldened.
 
-  <h4 id=the-bdo><span class=secno>3.10.21 </span>The <dfn
+  <h4 id=the-bdo><span class=secno>3.9.21 </span>The <dfn
    id=bdo><code>bdo</code></dfn> element</h4>
 
   <dl class=element>
@@ -13149,7 +12764,7 @@
    <a href="#refsCSS21">[CSS21]</a></p>
   <!-- XXX need examples -->
 
-  <h4 id=the-ruby><span class=secno>3.10.22 </span>The <dfn
+  <h4 id=the-ruby><span class=secno>3.9.22 </span>The <dfn
    id=ruby><code>ruby</code></dfn> element</h4>
 
   <dl class=element>
@@ -13205,7 +12820,7 @@
     rendered in a smaller font above it." src="images/sample-ruby.png"></p>
   </div>
 
-  <h4 id=the-rt><span class=secno>3.10.23 </span>The <dfn
+  <h4 id=the-rt><span class=secno>3.9.23 </span>The <dfn
    id=rt><code>rt</code></dfn> element</h4>
 
   <dl class=element>
@@ -13243,7 +12858,7 @@
    <code><a href="#ruby">ruby</a></code> element represents the same thing as
    its children.
 
-  <h4 id=the-rp><span class=secno>3.10.24 </span>The <dfn
+  <h4 id=the-rp><span class=secno>3.9.24 </span>The <dfn
    id=rp><code>rp</code></dfn> element</h4>
 
   <dl class=element>
@@ -13306,14 +12921,14 @@
     lang=ja>... &#x658e; (&#x3055;&#x3044;) &#x85e4; (&#x3068;&#x3046;) &#x4fe1; (&#x306e;&#x3076;) &#x7537; (&#x304a;) ...</pre>
   </div>
 
-  <h4 id=usage><span class=secno>3.10.25 </span>Usage summary</h4>
+  <h4 id=usage><span class=secno>3.9.25 </span>Usage summary</h4>
 
   <p class=big-issue>We need to summarize the various elements, in particular
    to distinguish b/i/em/strong/var/q/mark/cite.</p>
   <!-- XXX when you do this, also reorder the elements in this section
   to bring the related ones closer together. -->
 
-  <h4 id=footnotes><span class=secno>3.10.26 </span>Footnotes</h4>
+  <h4 id=footnotes><span class=secno>3.9.26 </span>Footnotes</h4>
 
   <p>HTML does not have a dedicated mechanism for marking up footnotes. Here
    are the recommended alternatives.
@@ -13394,12 +13009,12 @@
 </aside></pre>
   </div>
 
-  <h3 id=edits><span class=secno>3.11 </span>Edits</h3>
+  <h3 id=edits><span class=secno>3.10 </span>Edits</h3>
 
   <p>The <code><a href="#ins">ins</a></code> and <code><a
    href="#del">del</a></code> elements represent edits to the document.
 
-  <h4 id=the-ins><span class=secno>3.11.1 </span>The <dfn
+  <h4 id=the-ins><span class=secno>3.10.1 </span>The <dfn
    id=ins><code>ins</code></dfn> element</h4>
 
   <dl class=element>
@@ -13498,7 +13113,7 @@
    something. Can you guess what? -->
    </div>
 
-  <h4 id=the-del><span class=secno>3.11.2 </span>The <dfn
+  <h4 id=the-del><span class=secno>3.10.2 </span>The <dfn
    id=del><code>del</code></dfn> element</h4>
 
   <dl class=element>
@@ -13539,7 +13154,7 @@
   <p><code><a href="#del">del</a></code> elements should not cross <a
    href="#paragraph" title=paragraph>implied paragraph</a> boundaries.
 
-  <h4 id=attributes><span class=secno>3.11.3 </span>Attributes common to
+  <h4 id=attributes><span class=secno>3.10.3 </span>Attributes common to
    <code><a href="#ins">ins</a></code> and <code><a
    href="#del">del</a></code> elements</h4>
 
@@ -13588,7 +13203,7 @@
    DOM attribute must <a href="#reflect">reflect</a> the element's <code
    title="">datetime</code> content attribute.
 
-  <h4 id=edits0><span class=secno>3.11.4 </span>Edits and paragraphs</h4>
+  <h4 id=edits0><span class=secno>3.10.4 </span>Edits and paragraphs</h4>
 
   <p>Since the <code><a href="#ins">ins</a></code> and <code><a
    href="#del">del</a></code> elements do not affect <a href="#paragraph"
@@ -13651,7 +13266,7 @@
    that cross across any <a href="#paragraph" title=paragraph>implied
    paragraphs</a>.
 
-  <h4 id=edits1><span class=secno>3.11.5 </span>Edits and lists</h4>
+  <h4 id=edits1><span class=secno>3.10.5 </span>Edits and lists</h4>
 
   <p>The content models of the <code><a href="#ol">ol</a></code> and <code><a
    href="#ul">ul</a></code> elements do not allow <code><a
@@ -13704,9 +13319,9 @@
 </ul></pre>
   </div>
 
-  <h3 id=embedded0><span class=secno>3.12 </span>Embedded content</h3>
+  <h3 id=embedded0><span class=secno>3.11 </span>Embedded content</h3>
 
-  <h4 id=the-figure><span class=secno>3.12.1 </span>The <dfn
+  <h4 id=the-figure><span class=secno>3.11.1 </span>The <dfn
    id=figure><code>figure</code></dfn> element</h4>
 
   <dl class=element>
@@ -13844,7 +13459,7 @@
 </figure></pre>
   </div>
 
-  <h4 id=the-img><span class=secno>3.12.2 </span>The <dfn
+  <h4 id=the-img><span class=secno>3.11.2 </span>The <dfn
    id=img><code>img</code></dfn> element</h4>
 
   <dl class=element>
@@ -14492,7 +14107,7 @@
 </article></pre>
   </div>
 
-  <h4 id=the-iframe><span class=secno>3.12.3 </span>The <dfn
+  <h4 id=the-iframe><span class=secno>3.11.3 </span>The <dfn
    id=iframe><code>iframe</code></dfn> element</h4>
 
   <dl class=element>
@@ -14916,7 +14531,7 @@
    title=dom-iframe-seamless><code>seamless</code></dfn> must <a
    href="#reflect">reflect</a> the content attributes of the same name.
 
-  <h4 id=the-embed><span class=secno>3.12.4 </span>The <dfn
+  <h4 id=the-embed><span class=secno>3.11.4 </span>The <dfn
    id=embed><code>embed</code></dfn> element</h4>
 
   <dl class=element>
@@ -15057,7 +14672,7 @@
    href="#reflect">reflect</a> the respective content attributes of the same
    name.
 
-  <h4 id=the-object><span class=secno>3.12.5 </span>The <dfn
+  <h4 id=the-object><span class=secno>3.11.5 </span>The <dfn
    id=object><code>object</code></dfn> element</h4>
 
   <dl class=element>
@@ -15425,7 +15040,7 @@
 </figure></pre>
   </div>
 
-  <h4 id=the-param><span class=secno>3.12.6 </span>The <dfn
+  <h4 id=the-param><span class=secno>3.11.6 </span>The <dfn
    id=param><code>param</code></dfn> element</h4>
 
   <dl class=element>
@@ -15481,7 +15096,7 @@
    href="#reflect">reflect</a> the respective content attributes of the same
    name.
 
-  <h4 id=video><span class=secno>3.12.7 </span>The <dfn
+  <h4 id=video><span class=secno>3.11.7 </span>The <dfn
    id=video1><code>video</code></dfn> element</h4>
 
   <dl class=element>
@@ -15712,7 +15327,7 @@
    experience. So far, browsers seem to be making the controls overlay-only,
    thus somewhat sidestepping the issue.
 
-  <h5 id=video0><span class=secno>3.12.7.1. </span>Video and audio codecs for
+  <h5 id=video0><span class=secno>3.11.7.1. </span>Video and audio codecs for
    <code><a href="#video1">video</a></code> elements</h5>
 
   <p>User agents may support any video and audio codecs and container
@@ -15732,7 +15347,7 @@
   <p class=note>Certain user agents might support no codecs at all, e.g. text
    browsers running over SSH connections.
 
-  <h4 id=audio><span class=secno>3.12.8 </span>The <dfn
+  <h4 id=audio><span class=secno>3.11.8 </span>The <dfn
    id=audio1><code>audio</code></dfn> element</h4>
 
   <dl class=element>
@@ -15828,7 +15443,7 @@
    href="#actively">actively playing</a>, audio must not play for the
    element.
 
-  <h5 id=audio0><span class=secno>3.12.8.1. </span>Audio codecs for <code><a
+  <h5 id=audio0><span class=secno>3.11.8.1. </span>Audio codecs for <code><a
    href="#audio1">audio</a></code> elements</h5>
 
   <p>User agents may support any audio codecs and container formats.
@@ -15838,7 +15453,7 @@
   <!-- XXX mention that this spec doesn't require native support or
   plugin support, either is fine -->
 
-  <h4 id=the-source><span class=secno>3.12.9 </span>The <dfn
+  <h4 id=the-source><span class=secno>3.11.9 </span>The <dfn
    id=source><code>source</code></dfn> element</h4>
 
   <dl class=element>
@@ -16059,7 +15674,7 @@
    href="#reflect">reflect</a> the <code title=attr-source-pixelratio><a
    href="#pixelratio">pixelratio</a></code> content attribute.
 
-  <h4 id=media><span class=secno>3.12.10 </span>Media elements</h4>
+  <h4 id=media><span class=secno>3.11.10 </span>Media elements</h4>
 
   <p><dfn id=media7 title="media element">Media elements</dfn> implement the
    following interface:
@@ -16174,7 +15789,7 @@
    resource</dfn> is used to refer to the complete set of media data, e.g.
    the complete video file, or complete audio file.
 
-  <h5 id=error><span class=secno>3.12.10.1. </span>Error codes</h5>
+  <h5 id=error><span class=secno>3.11.10.1. </span>Error codes</h5>
 
   <p>All <a href="#media7" title="media element">media elements</a> have an
    associated error status, which records the last error the element
@@ -16218,7 +15833,7 @@
     href="#media10">media resource</a>.
   </dl>
 
-  <h5 id=location><span class=secno>3.12.10.2. </span>Location of the media
+  <h5 id=location><span class=secno>3.11.10.2. </span>Location of the media
    resource</h5>
 
   <p>The <dfn id=src7 title=attr-media-src><code>src</code></dfn> content
@@ -16338,7 +15953,7 @@
    href="#empty" title=dom-media-EMPTY>EMPTY</a>, and the absolute URL of the
    <a href="#chosen">chosen media resource</a> otherwise.
 
-  <h5 id=network0><span class=secno>3.12.10.3. </span>Network states</h5>
+  <h5 id=network0><span class=secno>3.11.10.3. </span>Network states</h5>
 
   <p>As <a href="#media7" title="media element">media elements</a> interact
    with the network, they go through several states. The <dfn id=networkstate
@@ -16392,7 +16007,7 @@
    the <code title=dom-media-networkState><a
    href="#networkstate">networkState</a></code> attribute changes value.
 
-  <h5 id=loading><span class=secno>3.12.10.4. </span>Loading the media
+  <h5 id=loading><span class=secno>3.11.10.4. </span>Loading the media
    resource</h5>
 
   <p>All <a href="#media7" title="media element">media elements</a> have a
@@ -16824,7 +16439,7 @@
    radio), or if no <a href="#media9">media data</a> is available, the
    attribute must return 0.
 
-  <h5 id=offsets><span class=secno>3.12.10.5. </span>Offsets into the media
+  <h5 id=offsets><span class=secno>3.11.10.5. </span>Offsets into the media
    resource</h5>
 
   <p>The <dfn id=duration
@@ -17021,7 +16636,7 @@
      end.
   </ol>
 
-  <h5 id=the-ready><span class=secno>3.12.10.6. </span>The ready states</h5>
+  <h5 id=the-ready><span class=secno>3.11.10.6. </span>The ready states</h5>
 
   <p><a href="#media7" title="media element">Media elements</a> have a
    <em>ready state</em>, which describes to what degree they are ready to be
@@ -17184,7 +16799,7 @@
    title=dom-media-autoplay><code>autoplay</code></dfn> DOM attribute must <a
    href="#reflect">reflect</a> the content attribute of the same name.
 
-  <h5 id=playing><span class=secno>3.12.10.7. </span>Playing the media
+  <h5 id=playing><span class=secno>3.11.10.7. </span>Playing the media
    resource</h5>
 
   <p>The <dfn id=paused title=dom-media-paused><code>paused</code></dfn>
@@ -17491,7 +17106,7 @@
    href="#media10">media resource</a>, if any, that the user agent has so far
    rendered, at the time the attribute is evaluated.
 
-  <h5 id=seeking><span class=secno>3.12.10.8. </span>Seeking</h5>
+  <h5 id=seeking><span class=secno>3.11.10.8. </span>Seeking</h5>
 
   <p>The <dfn id=seeking0 title=dom-media-seeking><code>seeking</code></dfn>
    attribute must initially have the value false.
@@ -17619,7 +17234,7 @@
    href="#duration">duration</a></code> attribute's value (which would equal
    the time of the last frame).
 
-  <h5 id=cue-ranges><span class=secno>3.12.10.9. </span>Cue ranges</h5>
+  <h5 id=cue-ranges><span class=secno>3.11.10.9. </span>Cue ranges</h5>
 
   <p><a href="#media7" title="media element">Media elements</a> have a set of
    <dfn id=cue-ranges0 title="cue range">cue ranges</dfn>. Each cue range is
@@ -17777,7 +17392,7 @@
    href="#voidcallback">VoidCallback</a></code> interface is the entry point
    for the callback represented by the object.
 
-  <h5 id=user-interface><span class=secno>3.12.10.10. </span>User interface</h5>
+  <h5 id=user-interface><span class=secno>3.11.10.10. </span>User interface</h5>
 
   <p>The <dfn id=controls
    title=attr-media-controls><code>controls</code></dfn> attribute is a <a
@@ -17843,7 +17458,7 @@
    title=event-volumechange><a href="#volumechange">volumechange</a></code>
    at the <a href="#media7">media element</a>.
 
-  <h5 id=time-ranges><span class=secno>3.12.10.11. </span>Time ranges</h5>
+  <h5 id=time-ranges><span class=secno>3.11.10.11. </span>Time ranges</h5>
 
   <p>Objects implementing the <code><a
    href="#timeranges">TimeRanges</a></code> interface represent a list of
@@ -17895,7 +17510,7 @@
    of <a href="#media7" title="media element">media elements</a> must be the
    same as that element's <a href="#media10">media resource</a>'s timeline.
 
-  <h5 id=byte-ranges><span class=secno>3.12.10.12. </span>Byte ranges</h5>
+  <h5 id=byte-ranges><span class=secno>3.11.10.12. </span>Byte ranges</h5>
 
   <p>Objects implementing the <code><a
    href="#byteranges">ByteRanges</a></code> interface represent a list of
@@ -17944,7 +17559,7 @@
    aren't empty, and don't touch (adjacent ranges are folded into one bigger
    range).
 
-  <h5 id=mediaevents><span class=secno>3.12.10.13. </span>Event summary</h5>
+  <h5 id=mediaevents><span class=secno>3.11.10.13. </span>Event summary</h5>
 
   <p>The following events fire on <a href="#media7" title="media
    element">media elements</a> as part of the processing model described
@@ -18290,7 +17905,7 @@
      <td>
   </table>
 
-  <h5 id=security0><span class=secno>3.12.10.14. </span>Security and privacy
+  <h5 id=security0><span class=secno>3.11.10.14. </span>Security and privacy
    considerations</h5>
 
   <p class=big-issue>Talk about making sure interactive media files (e.g.
@@ -18298,7 +17913,7 @@
    not exposing any sensitive data like metadata from tracks in the media
    files (intranet snooping risk)
 
-  <h4 id=the-canvas><span class=secno>3.12.11 </span>The <dfn
+  <h4 id=the-canvas><span class=secno>3.11.11 </span>The <dfn
    id=canvas><code>canvas</code></dfn> element</h4>
 
   <dl class=element>
@@ -18509,7 +18124,7 @@
    href="#todataurl">toDataURL()</a></code> to allow authors to more
    carefully control compression settings, image metadata, etc.
 
-  <h5 id=the-2d><span class=secno>3.12.11.1. </span>The 2D context</h5>
+  <h5 id=the-2d><span class=secno>3.11.11.1. </span>The 2D context</h5>
 
   <p>When the <code title=dom-canvas-getContext><a
    href="#getcontext">getContext()</a></code> method of a <code><a
@@ -18663,7 +18278,7 @@
    > exceptions when passing in non-finite arguments.
   -->
 
-  <h6 id=the-canvas0><span class=secno>3.12.11.1.1. </span>The canvas state</h6>
+  <h6 id=the-canvas0><span class=secno>3.11.11.1.1. </span>The canvas state</h6>
 
   <p>Each context maintains a stack of drawing states. <dfn id=drawing0
    title="drawing state">Drawing states</dfn> consist of:
@@ -18735,7 +18350,7 @@
 > But how would it interact with normal calls to ctx.restore()?
   -->
 
-  <h6 id=transformations><span class=secno>3.12.11.1.2. </span><dfn
+  <h6 id=transformations><span class=secno>3.11.11.1.2. </span><dfn
    id=transformations0
    title=dom-context-2d-transformation>Transformations</dfn></h6>
 
@@ -18818,7 +18433,7 @@
    title="">dx</var>, <var title="">dy</var>)</code> method with the same
    arguments.
 
-  <h6 id=compositing><span class=secno>3.12.11.1.3. </span>Compositing</h6>
+  <h6 id=compositing><span class=secno>3.11.11.1.3. </span>Compositing</h6>
 
   <p>All drawing operations are affected by the global compositing
    attributes, <code title=dom-context-2d-globalAlpha><a
@@ -18958,7 +18573,7 @@
    href="#globalcompositeoperation">globalCompositeOperation</a></code>
    attribute must initially have the value <code>source-over</code>.
 
-  <h6 id=colors><span class=secno>3.12.11.1.4. </span>Colors and styles</h6>
+  <h6 id=colors><span class=secno>3.11.11.1.4. </span>Colors and styles</h6>
 
   <p>The <dfn id=strokestyle
    title=dom-context-2d-strokeStyle><code>strokeStyle</code></dfn> attribute
@@ -19238,7 +18853,7 @@
       canvas then using that canvas as the pattern.
   -->
 
-  <h6 id=line-styles><span class=secno>3.12.11.1.5. </span>Line styles</h6>
+  <h6 id=line-styles><span class=secno>3.11.11.1.5. </span>Line styles</h6>
 
   <p>The <dfn id=linewidth
    title=dom-context-2d-lineWidth><code>lineWidth</code></dfn> attribute
@@ -19353,7 +18968,7 @@
 > allowing whatever behavior the graphics library has.)
   -->
 
-  <h6 id=shadows><span class=secno>3.12.11.1.6. </span><dfn
+  <h6 id=shadows><span class=secno>3.11.11.1.6. </span><dfn
    id=shadows0>Shadows</dfn></h6>
 
   <p>All drawing operations are affected by the four global shadow
@@ -19472,7 +19087,7 @@
      part of the drawing model described below.</p>
   </ol>
 
-  <h6 id=simple><span class=secno>3.12.11.1.7. </span>Simple shapes
+  <h6 id=simple><span class=secno>3.11.11.1.7. </span>Simple shapes
    (rectangles)</h6>
 
   <p>There are three methods that immediately draw rectangles to the bitmap.
@@ -19533,7 +19148,7 @@
    will draw a line instead (the path for the outline is just a straight line
    along the non-zero dimension).
 
-  <h6 id=complex><span class=secno>3.12.11.1.8. </span>Complex shapes (paths)</h6>
+  <h6 id=complex><span class=secno>3.11.11.1.8. </span>Complex shapes (paths)</h6>
 
   <p>The context always has a current path. There is only one current path,
    it is not part of the <span title=dom-context-2d->drawing state</span>.
@@ -19782,7 +19397,7 @@
    If either of the arguments is infinite or NaN, then the method must return
    false.
 
-  <h6 id=text><span class=secno>3.12.11.1.9. </span>Text</h6>
+  <h6 id=text><span class=secno>3.11.11.1.9. </span>Text</h6>
   <!-- a v3 feature -->
 
   <p>The <dfn id=font title=dom-context-2d-font><code>font</code></dfn> DOM
@@ -20282,7 +19897,7 @@
    This would be provided in preference to a dedicated way of doing multiline
    layout.
 
-  <h6 id=images><span class=secno>3.12.11.1.10. </span>Images</h6>
+  <h6 id=images><span class=secno>3.11.11.1.10. </span>Images</h6>
 
   <p>To draw images onto the canvas, the <dfn id=drawimage
    title=dom-context-2d-drawImage><code>drawImage</code></dfn> method can be
@@ -20385,7 +20000,7 @@
   of the target element, not the rendered image (e.g. height/width
   attributes don't affect it -->
 
-  <h6 id=pixel><span class=secno>3.12.11.1.11. </span><dfn id=pixel1>Pixel
+  <h6 id=pixel><span class=secno>3.11.11.1.11. </span><dfn id=pixel1>Pixel
    manipulation</dfn></h6>
   <!--
   <span>ImageData</span> <span title="dom-context-2d-createImageData">createImageData</span>(in float sw, in float sh);
@@ -20694,7 +20309,7 @@
 </html></pre>
   </div>
 
-  <h6 id=drawing><span class=secno>3.12.11.1.12. </span>Drawing model</h6>
+  <h6 id=drawing><span class=secno>3.11.11.1.12. </span>Drawing model</h6>
 
   <p>When a shape or image is painted, user agents must follow these steps,
    in the order given (or act as if they do):
@@ -20740,7 +20355,7 @@
   <p class="big-issue">Well, one day.</p>
 -->
 
-  <h5 id=color><span class=secno>3.12.11.2. </span>Color spaces and color
+  <h5 id=color><span class=secno>3.11.11.2. </span>Color spaces and color
    correction</h5>
 
   <p>The <code><a href="#canvas">canvas</a></code> APIs must perform color
@@ -20785,7 +20400,7 @@
    href="#todataurl">toDataURL()</a></code> method to the canvas, given the
    appropriate dimensions, has no visible effect.
 
-  <h5 id=security1><span class=secno>3.12.11.3. </span>Security with <code><a
+  <h5 id=security1><span class=secno>3.11.11.3. </span>Security with <code><a
    href="#canvas">canvas</a></code> elements</h5>
 
   <p><strong>Information leakage</strong> can occur if scripts from one <a
@@ -20860,7 +20475,7 @@
    <i>origin-clean</i> flag is set to false is called, the method must
    immediately raise a security exception.
 
-  <h4 id=the-map><span class=secno>3.12.12 </span>The <dfn
+  <h4 id=the-map><span class=secno>3.11.12 </span>The <dfn
    id=map><code>map</code></dfn> element</h4>
 
   <dl class=element>
@@ -20918,7 +20533,7 @@
    title=dom-map-name><code>name</code></dfn> must <a
    href="#reflect">reflect</a> the content attribute of the same name.
 
-  <h4 id=the-area><span class=secno>3.12.13 </span>The <dfn
+  <h4 id=the-area><span class=secno>3.11.13 </span>The <dfn
    id=area><code>area</code></dfn> element</h4>
 
   <dl class=element>
@@ -21135,8 +20750,8 @@
   <ol>
    <li>If the <code title=event-DOMActivate>DOMActivate</code> event in
     question is not <span title=concept-events-trusted>trusted</span> (i.e. a
-    <code title=dom-click><a href="#click">click()</a></code> method call was
-    the reason for the event being dispatched), and the <code><a
+    <code title=dom-click><a href="#click1">click()</a></code> method call
+    was the reason for the event being dispatched), and the <code><a
     href="#area">area</a></code> element's <code
     title=attr-area-target>target</code> attribute is <span
     class=big-issue>...</span> then raise an <code>INVALID_ACCESS_ERR</code>
@@ -21177,7 +20792,7 @@
    href="#reflect">reflect</a> the <code title=attr-hyperlink-rel><a
    href="#rel3">rel</a></code> content attribute.
 
-  <h4 id=image-maps><span class=secno>3.12.14 </span>Image maps</h4>
+  <h4 id=image-maps><span class=secno>3.11.14 </span>Image maps</h4>
   <!-- TESTS
   http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20html%3E%0A%3Cimg%20src%3D%22http%3A//hixie.ch/resources/images/smallcats%22%20usemap%3D%23a%20onclick%3Dw%28%27img%27%29%3E%0A%3Cmap%20name%3Da%3E%0A%20%3Carea%20onclick%3Dw%28%271%27%29%20coords%3D%270%25%200%25%20100%25%20100%25%27%20href%3Djavascript%3A%3E%0A%3C/map%3E
   http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20html%3E%0A%3Cbody%20onfocus%3D%22w%28document.activeElement.tagName%29%22%3E%0A%3Cimg%20src%3D%22http%3A//hixie.ch/resources/images/smallcats%22%20usemap%3D%23a%20onclick%3Dw%28%27img%27%29%20onfocus%3D%22w%28document.activeElement.tagName%29%22%3E%0A%3Cimg%20src%3D%22http%3A//hixie.ch/resources/images/sample%22%20usemap%3D%23a%20onclick%3Dw%28%27img%27%29%20onfocus%3D%22w%28document.activeElement.tagName%29%22%3E%0A%3Cmap%20name%3Da%20onfocus%3D%22w%28document.activeElement.tagName%29%22%3E%0A%20%3Carea%20onclick%3Dw%28%271%27%29%20coords%3D%270%200%2050%2050%27%20href%3Djavascript%3A%20onfocus%3D%22w%28document.activeElement.tagName%29%22%3E%0A%3C/map%3E%0A%3Cscript%3E%0A%20var%20x%20%3D%20document.getElementsByTagName%28%27img%27%29%5B0%5D%3B%0A%20x.parentNode.appendChild%28x%29%3B%0A%20document.getElementsByTagName%28%27area%27%29%5B0%5D.focus%28%29%3B%0A%3C/script%3E
@@ -21472,7 +21087,7 @@
    then the user agent must act as if it had rerun the algorithms for image
    maps.
 
-  <h4 id=mathml><span class=secno>3.12.15 </span>MathML</h4>
+  <h4 id=mathml><span class=secno>3.11.15 </span>MathML</h4>
 
   <p>The <code>math</code> element from the <a href="#mathml0">MathML
    namespace</a> falls into the <a href="#embedded1">embedded content</a>
@@ -21497,7 +21112,7 @@
    form, interactive HTML user agents are encouraged to provide a way to
    export any MathML fragment as a namespace-well-formed XML fragment.
 
-  <h4 id=svg><span class=secno>3.12.16 </span>SVG</h4>
+  <h4 id=svg><span class=secno>3.11.16 </span>SVG</h4>
 
   <p>The <code>svg</code> element from the <a href="#svg-namespace">SVG
    namespace</a> falls into the <a href="#embedded1">embedded content</a>
@@ -21507,7 +21122,7 @@
    interactive HTML user agents are encouraged to provide a way to export any
    SVG fragment as a namespace-well-formed XML fragment.
 
-  <h4 id=dimension><span class=secno>3.12.17 </span><dfn
+  <h4 id=dimension><span class=secno>3.11.17 </span><dfn
    id=dimension0>Dimension attributes</dfn></h4>
 
   <p>The <dfn id=width4 title=attr-dim-width><code>width</code></dfn> and
@@ -21546,16 +21161,16 @@
    href="#video1">video</a></code> elements must <a
    href="#reflect">reflect</a> the content attributes of the same name.
 
-  <h3 id=tabular><span class=secno>3.13 </span>Tabular data</h3>
+  <h3 id=tabular><span class=secno>3.12 </span>Tabular data</h3>
 
-  <h4 id=table-intro><span class=secno>3.13.1 </span>Introduction</h4>
+  <h4 id=table-intro><span class=secno>3.12.1 </span>Introduction</h4>
 
   <p><em>This section is non-normative.</em>
 
   <p class=big-issue>...examples, how to write tables accessibly, a brief
    mention of the table model, etc...
 
-  <h4 id=the-table><span class=secno>3.13.2 </span>The <dfn
+  <h4 id=the-table><span class=secno>3.12.2 </span>The <dfn
    id=table><code>table</code></dfn> element</h4>
 
   <dl class=element>
@@ -21855,7 +21470,7 @@
      href="#rows">rows</a></code> collection from its parent.</p>
   </ol>
 
-  <h4 id=the-caption><span class=secno>3.13.3 </span>The <dfn
+  <h4 id=the-caption><span class=secno>3.12.3 </span>The <dfn
    id=caption0><code>caption</code></dfn> element</h4>
 
   <dl class=element>
@@ -21889,7 +21504,7 @@
   <p>The <code><a href="#caption0">caption</a></code> element takes part in
    the <a href="#table0">table model</a>.
 
-  <h4 id=the-colgroup><span class=secno>3.13.4 </span>The <dfn
+  <h4 id=the-colgroup><span class=secno>3.12.4 </span>The <dfn
    id=colgroup><code>colgroup</code></dfn> element</h4>
 
   <dl class=element>
@@ -21943,7 +21558,7 @@
    same name. The value must be <a href="#limited1">limited to only positive
    non-zero numbers</a>.
 
-  <h4 id=the-col><span class=secno>3.13.5 </span>The <dfn
+  <h4 id=the-col><span class=secno>3.12.5 </span>The <dfn
    id=col><code>col</code></dfn> element</h4>
 
   <dl class=element>
@@ -21997,7 +21612,7 @@
    same name. The value must be <a href="#limited1">limited to only positive
    non-zero numbers</a>.
 
-  <h4 id=the-tbody><span class=secno>3.13.6 </span>The <dfn
+  <h4 id=the-tbody><span class=secno>3.12.6 </span>The <dfn
    id=tbody><code>tbody</code></dfn> element</h4>
 
   <dl class=element>
@@ -22085,7 +21700,7 @@
    href="#rows0">rows</a></code> collection, the method must instead raise an
    <code>INDEX_SIZE_ERR</code> exception.
 
-  <h4 id=the-thead><span class=secno>3.13.7 </span>The <dfn
+  <h4 id=the-thead><span class=secno>3.12.7 </span>The <dfn
    id=thead0><code>thead</code></dfn> element</h4>
 
   <dl class=element>
@@ -22128,7 +21743,7 @@
   <p>The <code><a href="#thead0">thead</a></code> element takes part in the
    <a href="#table0">table model</a>.
 
-  <h4 id=the-tfoot><span class=secno>3.13.8 </span>The <dfn
+  <h4 id=the-tfoot><span class=secno>3.12.8 </span>The <dfn
    id=tfoot0><code>tfoot</code></dfn> element</h4>
 
   <dl class=element>
@@ -22180,7 +21795,7 @@
   <p>The <code><a href="#tfoot0">tfoot</a></code> element takes part in the
    <a href="#table0">table model</a>.
 
-  <h4 id=the-tr><span class=secno>3.13.9 </span>The <dfn
+  <h4 id=the-tr><span class=secno>3.12.9 </span>The <dfn
    id=tr><code>tr</code></dfn> element</h4>
 
   <dl class=element>
@@ -22297,7 +21912,7 @@
    href="#cells">cells</a></code> collection, the method must instead raise
    an <code>INDEX_SIZE_ERR</code> exception.
 
-  <h4 id=the-td><span class=secno>3.13.10 </span>The <dfn
+  <h4 id=the-td><span class=secno>3.12.10 </span>The <dfn
    id=td><code>td</code></dfn> element</h4>
 
   <dl class=element>
@@ -22359,7 +21974,7 @@
    attribute must <a href="#reflect">reflect</a> the content attribute of the
    same name.
 
-  <h4 id=the-th><span class=secno>3.13.11 </span>The <dfn
+  <h4 id=the-th><span class=secno>3.12.11 </span>The <dfn
    id=th><code>th</code></dfn> element</h4>
 
   <dl class=element>
@@ -22451,7 +22066,7 @@
    attribute must <a href="#reflect">reflect</a> the content attribute of the
    same name.
 
-  <h4 id=attributes0><span class=secno>3.13.12 </span>Attributes common to
+  <h4 id=attributes0><span class=secno>3.12.12 </span>Attributes common to
    <code><a href="#td">td</a></code> and <code><a href="#th">th</a></code>
    elements</h4>
 
@@ -22497,7 +22112,7 @@
    title=dom-tr-cells><a href="#cells">cells</a></code> collection. If there
    is no such parent element, then the attribute must return 0.
 
-  <h4 id=processing><span class=secno>3.13.13 </span>Processing model</h4>
+  <h4 id=processing><span class=secno>3.12.13 </span>Processing model</h4>
 
   <p>The various table elements and their content attributes together define
    the <dfn id=table0>table model</dfn>.
@@ -22601,7 +22216,7 @@
    represented by <code><a href="#table">table</a></code> elements and their
    descendants. Documents must not have table model errors.
 
-  <h5 id=forming><span class=secno>3.13.13.1. </span>Forming a table</h5>
+  <h5 id=forming><span class=secno>3.12.13.1. </span>Forming a table</h5>
 
   <p>To determine which elements correspond to which slots in a <a
    href="#table1" title=concept-table>table</a> associated with a <code><a
@@ -23097,7 +22712,7 @@
    title="">x</var> < <var title="">cell<sub
    title="">x</sub></var>+<var title="">width</var></span>.
 
-  <h5 id=header-and-data-cell-semantics><span class=secno>3.13.13.2.
+  <h5 id=header-and-data-cell-semantics><span class=secno>3.12.13.2.
    </span>Forming relationships between data cells and header cells</h5>
 
   <p>Each data cell can be assigned zero or more header cells. The <dfn
@@ -23384,7 +22999,7 @@
    data cells</a> when analyzing data in a <a href="#table1"
    title=concept-table>table</a>.
 
-  <h3 id=forms><span class=secno>3.14 </span>Forms</h3>
+  <h3 id=forms><span class=secno>3.13 </span>Forms</h3>
   <!-- XXX everything in WF2 -->
 
   <p class=big-issue>This section will contain definitions of the
@@ -23395,46 +23010,46 @@
   <!-- From HTML4: BUTTON FIELDSET FORM INPUT LABEL OPTGROUP OPTION
   SELECT TEXTAREA -->
 
-  <h4 id=the-form><span class=secno>3.14.1 </span>The <code>form</code>
+  <h4 id=the-form><span class=secno>3.13.1 </span>The <code>form</code>
    element</h4>
 
-  <h4 id=the-fieldset><span class=secno>3.14.2 </span>The
+  <h4 id=the-fieldset><span class=secno>3.13.2 </span>The
    <code>fieldset</code> element</h4>
 
-  <h4 id=the-input><span class=secno>3.14.3 </span>The <code>input</code>
+  <h4 id=the-input><span class=secno>3.13.3 </span>The <code>input</code>
    element</h4>
 
-  <h4 id=the-button><span class=secno>3.14.4 </span>The <code>button</code>
+  <h4 id=the-button><span class=secno>3.13.4 </span>The <code>button</code>
    element</h4>
 
-  <h4 id=the-label><span class=secno>3.14.5 </span>The <code>label</code>
+  <h4 id=the-label><span class=secno>3.13.5 </span>The <code>label</code>
    element</h4>
 
-  <h4 id=the-select><span class=secno>3.14.6 </span>The <code>select</code>
+  <h4 id=the-select><span class=secno>3.13.6 </span>The <code>select</code>
    element</h4>
 
-  <h4 id=the-datalist><span class=secno>3.14.7 </span>The
+  <h4 id=the-datalist><span class=secno>3.13.7 </span>The
    <code>datalist</code> element</h4>
 
-  <h4 id=the-optgroup><span class=secno>3.14.8 </span>The
+  <h4 id=the-optgroup><span class=secno>3.13.8 </span>The
    <code>optgroup</code> element</h4>
 
-  <h4 id=the-option><span class=secno>3.14.9 </span>The <code>option</code>
+  <h4 id=the-option><span class=secno>3.13.9 </span>The <code>option</code>
    element</h4>
 
-  <h4 id=the-textarea><span class=secno>3.14.10 </span>The
+  <h4 id=the-textarea><span class=secno>3.13.10 </span>The
    <code>textarea</code> element</h4>
 
-  <h4 id=the-output><span class=secno>3.14.11 </span>The <code>output</code>
+  <h4 id=the-output><span class=secno>3.13.11 </span>The <code>output</code>
    element</h4>
 
-  <h4 id=processing0><span class=secno>3.14.12 </span>Processing model</h4>
+  <h4 id=processing0><span class=secno>3.13.12 </span>Processing model</h4>
 
   <p class=big-issue>See <a
    href="http://www.whatwg.org/specs/web-forms/current-work/#extend-form-controls">WF2</a>
    for now
 
-  <h5 id=form-submission><span class=secno>3.14.12.1. </span>Form submission</h5>
+  <h5 id=form-submission><span class=secno>3.13.12.1. </span>Form submission</h5>
 
   <p class=big-issue>See <a
    href="http://www.whatwg.org/specs/web-forms/current-work/#form-submission">WF2</a>
@@ -23444,7 +23059,7 @@
    context whose <a href="#sandboxed3">sandboxed forms browsing context
    flag</a> is set, it must not be submitted.
 
-  <h3 id=scripting0><span class=secno>3.15 </span>Scripting</h3>
+  <h3 id=scripting0><span class=secno>3.14 </span>Scripting</h3>
 
   <p>Scripts allow authors to add interactivity to their documents.
 
@@ -23467,7 +23082,7 @@
     without scripts by requesting the sorted table from the server.</p>
   </div>
 
-  <h4 id=script><span class=secno>3.15.1 </span>The <dfn
+  <h4 id=script><span class=secno>3.14.1 </span>The <dfn
    id=script1><code>script</code></dfn> element</h4>
 
   <dl class=element>
@@ -23948,7 +23563,7 @@
    way as the <code><a href="#textcontent">textContent</a></code> DOM
    attribute.
 
-  <h5 id=scriptingLanguages><span class=secno>3.15.1.1. </span>Scripting
+  <h5 id=scriptingLanguages><span class=secno>3.14.1.1. </span>Scripting
    languages</h5>
 
   <p>A user agent is said to <dfn id=support>support the scripting
@@ -23979,7 +23594,7 @@
    XXX we should reference #refsRFC4329 http://www.ietf.org/rfc/rfc4329
   -->
 
-  <h4 id=the-noscript><span class=secno>3.15.2 </span>The <dfn
+  <h4 id=the-noscript><span class=secno>3.14.2 </span>The <dfn
    id=noscript><code>noscript</code></dfn> element</h4>
 
   <dl class=element>
@@ -24140,7 +23755,7 @@
    that will have <code title=dom-document-designMode><a
    href="#designMode">designMode</a></code> enabled.
 
-  <h4 id=the-event-source><span class=secno>3.15.3 </span>The <dfn
+  <h4 id=the-event-source><span class=secno>3.14.3 </span>The <dfn
    id=event-source><code>event-source</code></dfn> element</h4>
 
   <dl class=element>
@@ -24227,10 +23842,10 @@
    attribute must <a href="#reflect">reflect</a> the content attribute of the
    same name.
 
-  <h3 id=interactive-elements><span class=secno>3.16 </span>Interactive
+  <h3 id=interactive-elements><span class=secno>3.15 </span>Interactive
    elements</h3>
 
-  <h4 id=the-details><span class=secno>3.16.1 </span>The <dfn
+  <h4 id=the-details><span class=secno>3.15.1 </span>The <dfn
    id=details><code>details</code></dfn> element</h4>
 
   <dl class=element>
@@ -24307,7 +23922,7 @@
    reflecting state has been a pain in the neck before. But is it
    semantically ok?
 
-  <h4 id=datagrid><span class=secno>3.16.2 </span>The <dfn
+  <h4 id=datagrid><span class=secno>3.15.2 </span>The <dfn
    id=datagrid0><code>datagrid</code></dfn> element</h4>
 
   <dl class=element>
@@ -24400,7 +24015,7 @@
    <code title=attr-datagrid-disabled><a
    href="#disabled3">disabled</a></code> content attributes respectively.
 
-  <h5 id=the-datagrid><span class=secno>3.16.2.1. </span>The <code><a
+  <h5 id=the-datagrid><span class=secno>3.15.2.1. </span>The <code><a
    href="#datagrid0">datagrid</a></code> data model</h5>
 
   <p><em>This section is non-normative.</em>
@@ -24447,7 +24062,7 @@
    scripted data providers.</p>
   <!-- XXX check xrefs -->
 
-  <h5 id=how-rows><span class=secno>3.16.2.2. </span>How rows are identified</h5>
+  <h5 id=how-rows><span class=secno>3.15.2.2. </span>How rows are identified</h5>
 
   <p>The chains of numbers that give a row's path, or identifier, are
    represented by objects that implement the <a
@@ -24479,7 +24094,7 @@
    href="#getchildatposition">GetChildAtPosition()</a></code> methods ever
    get called with the empty path.
 
-  <h5 id=the-data><span class=secno>3.16.2.3. </span>The data provider
+  <h5 id=the-data><span class=secno>3.15.2.3. </span>The data provider
    interface</h5>
 
   <p><em>The conformance criteria in this section apply to any implementation
@@ -24946,7 +24561,7 @@
 -->
   </table>
 
-  <h5 id=the-default><span class=secno>3.16.2.4. </span>The default data
+  <h5 id=the-default><span class=secno>3.15.2.4. </span>The default data
    provider</h5>
 
   <p>The user agent must supply a default data provider for the case where
@@ -25449,7 +25064,7 @@
      <code><a href="#datagrid0">datagrid</a></code>.</p>
   </dl>
 
-  <h6 id=commonDefaultDataGridMethodDefinitions><span class=secno>3.16.2.4.1.
+  <h6 id=commonDefaultDataGridMethodDefinitions><span class=secno>3.15.2.4.1.
    </span>Common default data provider method definitions for cells</h6>
 
   <p>These definitions are used for the cell-specific methods of the default
@@ -25590,7 +25205,7 @@
   </dl>
   <!-- XXX Calculated cells, like in spreadsheets? -->
 
-  <h5 id=populating><span class=secno>3.16.2.5. </span>Populating the
+  <h5 id=populating><span class=secno>3.15.2.5. </span>Populating the
    <code><a href="#datagrid0">datagrid</a></code> element</h5>
 
   <p>A <code><a href="#datagrid0">datagrid</a></code> must be disabled until
@@ -26036,7 +25651,7 @@
   <!-- XXX speaking of which, do we actually want that
   limitation? -->
 
-  <h5 id=updating><span class=secno>3.16.2.6. </span>Updating the <code><a
+  <h5 id=updating><span class=secno>3.15.2.6. </span>Updating the <code><a
    href="#datagrid0">datagrid</a></code></h5>
 
   <p>Whenever the <code title=dom-datagrid-data><a
@@ -26116,7 +25731,7 @@
    href="#inconsistentDataProvider">likely to result in inconsistent
    renderings</a>, and the user agent is likely to disable the data grid.
 
-  <h5 id=requirements><span class=secno>3.16.2.7. </span>Requirements for
+  <h5 id=requirements><span class=secno>3.15.2.7. </span>Requirements for
    interactive user agents</h5>
 
   <p><em>This section only applies to interactive user agents.</em>
@@ -26185,7 +25800,7 @@
    provider's method was invoked.</p>
   <!-- XXXPA <p class="big-issue">define actions (performAction(), etc)</p> -->
 
-  <h5 id=the-selection><span class=secno>3.16.2.8. </span>The selection</h5>
+  <h5 id=the-selection><span class=secno>3.15.2.8. </span>The selection</h5>
 
   <p><em>This section only applies to interactive user agents. For other user
    agents, the <code title=dom-datagrid-selection><a
@@ -26311,7 +25926,7 @@
    relation to the <code><a href="#selection1">Selection</a></code>
    interface.
 
-  <h5 id=columns><span class=secno>3.16.2.9. </span>Columns and captions</h5>
+  <h5 id=columns><span class=secno>3.15.2.9. </span>Columns and captions</h5>
 
   <p><em>This section only applies to interactive user agents.</em>
 
@@ -26363,7 +25978,7 @@
   <p class="big-issue">define drag and drop in datagrids; selectiondraggable, etc.</p>
 -->
 
-  <h4 id=the-command><span class=secno>3.16.3 </span>The <dfn
+  <h4 id=the-command><span class=secno>3.15.3 </span>The <dfn
    id=command0><code>command</code></dfn> element</h4>
 
   <dl class=element>
@@ -26422,7 +26037,7 @@
            attribute boolean <a href="#checked1" title=dom-command-checked>checked</a>;
            attribute DOMString <a href="#radiogroup0" title=dom-command-radiogroup>radiogroup</a>;
            attribute boolean <a href="#default2" title=dom-command-default>default</a>;
- void <a href="#click0" title=dom-command-click>click</a>(); // shadows <code><a href="#htmlelement">HTMLElement</a></code>.<code title=dom-click><a href="#click">click()</a></code>
+ void <a href="#click" title=dom-command-click>click</a>(); // shadows <code><a href="#htmlelement">HTMLElement</a></code>.<code title=dom-click><a href="#click1">click()</a></code>
 };</pre>
 
     <p>The <code title=command-ro><a href="#command2">Command</a></code>
@@ -26515,7 +26130,7 @@
    attributes must <a href="#reflect">reflect</a> their respective namesake
    content attributes.
 
-  <p>The <dfn id=click0 title=dom-command-click><code>click()</code></dfn>
+  <p>The <dfn id=click title=dom-command-click><code>click()</code></dfn>
    method's behavior depends on the value of the <code
    title=attr-command-type><a href="#type13">type</a></code> attribute of the
    element, as follows:
@@ -26576,7 +26191,7 @@
   <p class=note><code><a href="#command0">command</a></code> elements are not
    rendered unless they <a href="#menu" title=menu>form part of a menu</a>.
 
-  <h4 id=menus><span class=secno>3.16.4 </span>The <dfn
+  <h4 id=menus><span class=secno>3.15.4 </span>The <dfn
    id=menu><code>menu</code></dfn> element</h4>
 
   <dl class=element>
@@ -26685,7 +26300,7 @@
    the UA must invoke the <code title=dom-form-submit>submit()</code> method
    of the <code>form</code> element indicated by that DOM attribute.
 
-  <h5 id=menus-intro><span class=secno>3.16.4.1. </span>Introduction</h5>
+  <h5 id=menus-intro><span class=secno>3.15.4.1. </span>Introduction</h5>
 
   <p><em>This section is non-normative.</em>
 
@@ -26783,7 +26398,7 @@
 
 -->
 
-  <h5 id=building><span class=secno>3.16.4.2. </span><dfn
+  <h5 id=building><span class=secno>3.15.4.2. </span><dfn
    id=building0>Building menus and tool bars</dfn></h5>
 
   <p>A menu (or tool bar) consists of a list of zero or more of the following
@@ -26872,7 +26487,7 @@
    <li>Any separator at the start or end of the menu must be removed.
   </ol>
 
-  <h5 id=context><span class=secno>3.16.4.3. </span><dfn id=context2>Context
+  <h5 id=context><span class=secno>3.15.4.3. </span><dfn id=context2>Context
    menus</dfn></h5>
 
   <p>The <dfn id=contextmenu
@@ -26943,7 +26558,7 @@
    href="#reflect">reflect</a> the <code title=attr-contextmenu><a
    href="#contextmenu">contextmenu</a></code> content attribute.
 
-  <h5 id=toolbars><span class=secno>3.16.4.4. </span>Toolbars</h5>
+  <h5 id=toolbars><span class=secno>3.15.4.4. </span>Toolbars</h5>
 
   <p><dfn id=toolbars0>Toolbars</dfn> are a kind of menu that is always
    visible.
@@ -26960,7 +26575,7 @@
   <p>The user agent must reflect changes made to the <code><a
    href="#menu">menu</a></code>'s DOM immediately in the UI.
 
-  <h4 id=commands><span class=secno>3.16.5 </span>Commands</h4>
+  <h4 id=commands><span class=secno>3.15.5 </span>Commands</h4>
 
   <p>A <dfn id=command1 title=concept-command>command</dfn> is the
    abstraction behind menu items, buttons, and links. Once a command is
@@ -27053,7 +26668,7 @@
   readonly attribute boolean <a href="#hidden2" title=dom-command-ro-hidden>hidden</a>;
   readonly attribute boolean <a href="#disabled7" title=dom-command-ro-disabled>disabled</a>;              
   readonly attribute boolean <a href="#checked3" title=dom-command-ro-checked>checked</a>;              
-  void <a href="#click1" title=dom-command-ro-click>click</a>();
+  void <a href="#click0" title=dom-command-ro-click>click</a>();
   readonly attribute <a href="#htmlcollection0">HTMLCollection</a> <a href="#triggers0" title=dom-command-ro-triggers>triggers</a>;
   readonly attribute <a href="#command0">Command</a> <span title=dom-command-ro-command>command</span>;
 };</pre>
@@ -27141,11 +26756,11 @@
    on <code>input</code> and <code><a href="#command0">command</a></code>
    elements.
 
-  <p>The <dfn id=click1 title=dom-command-ro-click><code>click()</code></dfn>
+  <p>The <dfn id=click0 title=dom-command-ro-click><code>click()</code></dfn>
    method must trigger the <a href="#action"
    title=command-facet-Action>Action</a> for the command. If the element does
    not define a command, this method must do nothing. This method will be
-   shadowed by the <code title=dom-click><a href="#click">click()</a></code>
+   shadowed by the <code title=dom-click><a href="#click1">click()</a></code>
    method on <a href="#html-elements">HTML elements</a>, and is included only
    for completeness.
 
@@ -27170,7 +26785,7 @@
    href="#using7">option</a></code>, <code title=command-element><a
    href="#command3">command</a></code>.
 
-  <h5 id=using><span class=secno>3.16.5.1. </span><dfn id=using4
+  <h5 id=using><span class=secno>3.15.5.1. </span><dfn id=using4
    title=a-command>Using the <code>a</code> element to define a command</dfn></h5>
 
   <p>An <code><a href="#a">a</a></code> element with an <code
@@ -27227,7 +26842,7 @@
    command is to <a href="#firing" title="fire a click event">fire a <code
    title="">click</code> event</a> at the element.
 
-  <h5 id=using0><span class=secno>3.16.5.2. </span><dfn id=using5
+  <h5 id=using0><span class=secno>3.15.5.2. </span><dfn id=using5
    title=button-command>Using the <code>button</code> element to define a
    command</dfn></h5>
 
@@ -27253,7 +26868,7 @@
    <code>move-up</code> button type is disabled when it would have no
    effect).
 
-  <h5 id=using1><span class=secno>3.16.5.3. </span><dfn id=using6
+  <h5 id=using1><span class=secno>3.15.5.3. </span><dfn id=using6
    title=input-command>Using the <code>input</code> element to define a
    command</dfn></h5>
 
@@ -27326,7 +26941,7 @@
   is probably wrong for radio and checkbox types, depending on how we
   define <input>. -->
 
-  <h5 id=using2><span class=secno>3.16.5.4. </span><dfn id=using7
+  <h5 id=using2><span class=secno>3.15.5.4. </span><dfn id=using7
    title=option-command>Using the <code>option</code> element to define a
    command</dfn></h5>
 
@@ -27386,7 +27001,7 @@
    <code>select</code> element (if there is one), as if the selection had
    been changed directly.
 
-  <h5 id=using3><span class=secno>3.16.5.5. </span>Using the <dfn id=command3
+  <h5 id=using3><span class=secno>3.15.5.5. </span>Using the <dfn id=command3
    title=command-element><code>command</code></dfn> element to define a
    command</h5>
 
@@ -27440,21 +27055,21 @@
 
   <p>The <a href="#action" title=command-facet-Action>Action</a> of the
    command is to invoke the behavior described in the definition of the <code
-   title=dom-command-click><a href="#click0">click()</a></code> method of the
+   title=dom-command-click><a href="#click">click()</a></code> method of the
    <code><a href="#htmlcommandelement">HTMLCommandElement</a></code>
    interface.</p>
   <!-- XXX update to
   point to dom-click when we remove dom-command-click -->
 
-  <h3 id=datatemplate><span class=secno>3.17 </span>Data Templates</h3>
+  <h3 id=datatemplate><span class=secno>3.16 </span>Data Templates</h3>
 
-  <h4 id=introduction0><span class=secno>3.17.1 </span>Introduction</h4>
+  <h4 id=introduction0><span class=secno>3.16.1 </span>Introduction</h4>
 
   <p><em>This section is non-normative.</em>
 
   <p class=big-issue>...examples...
 
-  <h4 id=the-datatemplate><span class=secno>3.17.2 </span>The <dfn
+  <h4 id=the-datatemplate><span class=secno>3.16.2 </span>The <dfn
    id=datatemplate0><code>datatemplate</code></dfn> element</h4>
 
   <dl class=element>
@@ -27490,7 +27105,7 @@
    brings together the various rules that form a data template. The element
    doesn't itself do anything exciting.
 
-  <h4 id=the-rule><span class=secno>3.17.3 </span>The <dfn
+  <h4 id=the-rule><span class=secno>3.16.3 </span>The <dfn
    id=rule><code>rule</code></dfn> element</h4>
 
   <dl class=element>
@@ -27567,7 +27182,7 @@
    attributes must <a href="#reflect">reflect</a> the <code
    title=attr-rule-mode><a href="#mode">mode</a></code> content attribute.
 
-  <h4 id=the-nest><span class=secno>3.17.4 </span>The <dfn
+  <h4 id=the-nest><span class=secno>3.16.4 </span>The <dfn
    id=nest><code>nest</code></dfn> element</h4>
 
   <dl class=element>
@@ -27630,7 +27245,7 @@
    attribute must <a href="#reflect">reflect</a> the <code
    title=attr-nest-mode><a href="#mode1">mode</a></code> content attribute.
 
-  <h4 id=global0><span class=secno>3.17.5 </span>Global attributes for data
+  <h4 id=global0><span class=secno>3.16.5 </span>Global attributes for data
    templates</h4>
   <!-- authoring side, with DOM reflections -->
 
@@ -27686,10 +27301,10 @@
    title=attr-registrationmark><a
    href="#registrationmark">registrationmark</a></code> content attribute.
 
-  <h4 id=processing1><span class=secno>3.17.6 </span>Processing model</h4>
+  <h4 id=processing1><span class=secno>3.16.6 </span>Processing model</h4>
   <!-- ua side -->
 
-  <h5 id=the-originalcontent><span class=secno>3.17.6.1. </span>The <code
+  <h5 id=the-originalcontent><span class=secno>3.16.6.1. </span>The <code
    title=dom-originalContent><a
    href="#originalcontent">originalContent</a></code> DOM attribute</h5>
 
@@ -27707,7 +27322,7 @@
    just as the <code title=dom-templateElement><a
    href="#templateelement">templateElement</a></code> DOM attribute can.
 
-  <h5 id=the-template><span class=secno>3.17.6.2. </span>The <code
+  <h5 id=the-template><span class=secno>3.16.6.2. </span>The <code
    title=attr-template><a href="#template">template</a></code> attribute</h5>
 
   <p><dfn id=setting title=datatemplate-template-set>Setting</dfn>: When an
@@ -27832,7 +27447,7 @@
    <code><a href="#datatemplate0">datatemplate</a></code> element. Initially,
    the attribute must have the value null.
 
-  <h5 id=the-ref><span class=secno>3.17.6.3. </span>The <code
+  <h5 id=the-ref><span class=secno>3.16.6.3. </span>The <code
    title=attr-ref><a href="#ref">ref</a></code> attribute</h5>
 
   <p><dfn id=setting0 title=datatemplate-ref-set>Setting</dfn>: When an <a
@@ -27920,7 +27535,7 @@
    that is also null, in which case no template is currently being applied.
    Initially, the attribute must have the value null.
 
-  <h5 id=the-nodedatatemplate><span class=secno>3.17.6.4. </span>The <code><a
+  <h5 id=the-nodedatatemplate><span class=secno>3.16.6.4. </span>The <code><a
    href="#nodedatatemplate">NodeDataTemplate</a></code> interface</h5>
 
   <p>All objects that implement the <code>Node</code> interface must also
@@ -27939,7 +27554,7 @@
    for updating the generated content</a> of elements that are using the data
    template feature.
 
-  <h5 id=mutations><span class=secno>3.17.6.5. </span>Mutations</h5>
+  <h5 id=mutations><span class=secno>3.16.6.5. </span>Mutations</h5>
 
   <p>An element with a non-null <code title=dom-templateElement><a
    href="#templateelement">templateElement</a></code> is said to be a <dfn
@@ -27984,7 +27599,7 @@
    a template whenever either the backing data changes or the template itself
    changes.
 
-  <h5 id=updating0><span class=secno>3.17.6.6. </span>Updating the generated
+  <h5 id=updating0><span class=secno>3.16.6.6. </span>Updating the generated
    content</h5>
 
   <p>When the user agent is to <dfn id=update title=datatemplate-regen>update
@@ -28327,9 +27942,9 @@
   <!-- this is basically used for expanding
   nodeValue values -->
 
-  <h3 id=miscellaneous><span class=secno>3.18 </span>Miscellaneous elements</h3>
+  <h3 id=miscellaneous><span class=secno>3.17 </span>Miscellaneous elements</h3>
 
-  <h4 id=the-legend><span class=secno>3.18.1 </span>The <dfn
+  <h4 id=the-legend><span class=secno>3.17.1 </span>The <dfn
    id=legend><code>legend</code></dfn> element</h4>
 
   <dl class=element>
@@ -28365,7 +27980,7 @@
    or explanatory caption for the rest of the contents of the <code><a
    href="#legend">legend</a></code> element's parent element.
 
-  <h4 id=the-div><span class=secno>3.18.2 </span>The <dfn
+  <h4 id=the-div><span class=secno>3.17.2 </span>The <dfn
    id=div><code>div</code></dfn> element</h4>
 
   <dl class=element>
@@ -30023,10 +29638,11 @@
    have the actual dispatch use those generic terms when firing events.
 
   <p>Certain operations and methods are defined as firing events on elements.
-   For example, the <code title=dom-click><a href="#click">click()</a></code>
-   method on the <code><a href="#htmlelement">HTMLElement</a></code>
-   interface is defined as firing a <code title=event-click>click</code>
-   event on the element. <a href="#refsDOM3EVENTS">[DOM3EVENTS]</a>
+   For example, the <code title=dom-click><a
+   href="#click1">click()</a></code> method on the <code><a
+   href="#htmlelement">HTMLElement</a></code> interface is defined as firing
+   a <code title=event-click>click</code> event on the element. <a
+   href="#refsDOM3EVENTS">[DOM3EVENTS]</a>
 
   <p><dfn id=firing title="fire a click event">Firing a <code
    title=event-click>click</code> event</dfn> means that a <a
@@ -36800,8 +36416,7 @@
    <code title=rel-up><a href="#up">up</a></code> keywords (the interface
    hides duplicates).
 
-  <h5 id=sequential0><span class=secno>4.12.3.19. </span>Sequential link
-   types</h5>
+  <h5 id=sequential><span class=secno>4.12.3.19. </span>Sequential link types</h5>
 
   <p>Some documents form part of a sequence of documents.
 
@@ -37223,7 +36838,8 @@
   http://wp.netscape.com/eng/mozilla/3.0/handbook/javascript/ref_h-l.htm#84722
 -->
 
-  <h2 id=editing><span class=secno>5. </span><dfn id=editing0>Editing</dfn></h2>
+  <h2 id=editing><span class=secno>5. </span><dfn id=user-interaction>User
+   Interaction</dfn></h2>
 
   <p>This section describes various features that allow authors to enable
    users to edit documents and parts of documents interactively.
@@ -37235,7 +36851,725 @@
   <p class=big-issue>Would be nice to explain how these features work
    together.
 
-  <h3 id=contenteditable><span class=secno>5.2 </span>The <code
+  <h3 id=the-irrelevant><span class=secno>5.2 </span>The <dfn id=irrelevant
+   title=attr-irrelevant><code>irrelevant</code></dfn> attribute</h3>
+
+  <p>All elements may have the <code title=attr-irrelevant><a
+   href="#irrelevant">irrelevant</a></code> content attribute set. The <code
+   title=attr-irrelevant><a href="#irrelevant">irrelevant</a></code>
+   attribute is a <a href="#boolean0">boolean attribute</a>. When specified
+   on an element, it indicates that the element is not yet, or is no longer,
+   relevant. User agents should not render elements that have the <code
+   title=attr-irrelevant><a href="#irrelevant">irrelevant</a></code>
+   attribute specified.
+
+  <div class=example>
+   <p>In the following skeletal example, the attribute is used to hide the
+    Web game's main screen until the user logs in:</p>
+
+   <pre>  <h1>The Example Game</h1>
+  <section id="login">
+   <h2>Login</h2>
+   <form>
+    ...
+    <!-- calls login() once the user's credentials have been checked -->
+   </form>
+   <script>
+    function login() {
+      // switch screens
+      document.getElementById('login').irrelevant = true;
+      document.getElementById('game').irrelevant = false;
+    }
+   </script>
+  </section>
+  <section id="game" irrelevant>
+   ...
+  </section></pre>
+  </div>
+
+  <p>The <code title=attr-irrelevant><a
+   href="#irrelevant">irrelevant</a></code> attribute must not be used to
+   hide content that could legitimately be shown in another presentation. For
+   example, it is incorrect to use <code title=attr-irrelevant><a
+   href="#irrelevant">irrelevant</a></code> to hide panels in a tabbed
+   dialog, because the tabbed interface is merely a kind of overflow
+   presentation — showing all the form controls in one big page with a
+   scrollbar would be equivalent, and no less correct.
+
+  <p>Elements in a section hidden by the <code title=attr-irrelevant><a
+   href="#irrelevant">irrelevant</a></code> attribute are still active, e.g.
+   scripts and form controls in such sections still render execute and submit
+   respectively. Only their presentation to the user changes.
+
+  <p>The <dfn id=irrelevant0
+   title=dom-irrelevant><code>irrelevant</code></dfn> DOM attribute must <a
+   href="#reflect">reflect</a> the content attribute of the same name.
+
+  <h3 id=activation><span class=secno>5.3 </span>Activation</h3>
+
+  <p>The <dfn id=click1 title=dom-click>click()</dfn> method must <a
+   href="#firing">fire a <code>click</code> event</a> at the element, whose
+   default action is the <span title="fire a DOMActivate event">firing of a
+   further <code title=event-DOMActivate>DOMActivate</code> event</span> at
+   the same element, whose own default action is to go through all the
+   elements the <code title=event-DOMActivate>DOMActivate</code> event
+   bubbled through (starting at the target node and going towards the
+   <code>Document</code> node), looking for an element with an <a
+   href="#activation0">activation behavior</a>; the first element, in reverse
+   tree order, to have one, must have its activation behavior executed.
+
+  <h3 id=scrolling><span class=secno>5.4 </span>Scrolling elements into view</h3>
+
+  <p>The <dfn id=scrollintoview
+   title=dom-scrollIntoView><code>scrollIntoView([<var
+   title="">top</var>])</code></dfn> method, when called, must cause the
+   element on which the method was called to have the attention of the user
+   called to it.
+
+  <p class=note>In a speech browser, this could happen by having the current
+   playback position move to the start of the given element.
+
+  <p>In visual user agents, if the argument is present and has the value
+   false, the user agent should scroll the element into view such that both
+   the bottom and the top of the element are in the viewport, with the bottom
+   of the element aligned with the bottom of the viewport. If it isn't
+   possible to show the entire element in that way, or if the argument is
+   omitted or is true, then the user agent should instead align the top of
+   the element with the top of the viewport. Visual user agents should
+   further scroll horizontally as necessary to bring the element to the
+   attention of the user.
+
+  <p>Non-visual user agents may ignore the argument, or may treat it in some
+   media-specific manner most useful to the user.</p>
+  <!-- XXX maybe this should move to CSSOM -->
+
+  <h3 id=focus><span class=secno>5.5 </span>Focus</h3>
+  <!-- http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%20%0A...%3Cform%3E%3Cinput%20name%3Da%20onfocus%3D%22value%2B%3D1%3Bd.name%3D%27a%27%3Bname%3D%27d%27%3Bb.focus()%22%3E%0A%3Cinput%20name%3Db%20onfocus%3D%22value%2B%3D1%3Bc.focus()%22%3E%0A%3Cinput%20name%3Dc%20onfocus%3D%22value%2B%3D1%3Bd.focus()%22%3E%0A%3Cinput%20name%3Dd%20onfocus%3D%22value%2B%3D1%3Ba.focus()%22%3E -->
+  <!-- http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%0A...%3Cform%3E%0A%3Ctextarea%20name%3Dt%20cols%3D100%20rows%3D3%3E%3C%2Ftextarea%3E%3Cp%3E%0A%3Cinput%20name%3Da%20onfocus%3D%22t.value%2B%3D%27af1%20%27%3Bb.focus()%3Balert(document.activeElement.name)%3Bt.value%2B%3D%27af2%20%27%3B%22%20onblur%3D%22t.value%2B%3D%27ab%20%27%3B%22%3E%0A%3Cinput%20name%3Db%20onfocus%3D%22t.value%2B%3D%27bf1%20%27%3Bc.focus()%3Bt.value%2B%3D%27bf2%20%27%3B%22%20onblur%3D%22t.value%2B%3D%27bb%20%27%3B%22%3E%0A%3Cinput%20name%3Dc%20onfocus%3D%22t.value%2B%3D%27cf1%20%27%3Bc.focus()%3Bt.value%2B%3D%27cf2%20%27%3B%22%20onblur%3D%22t.value%2B%3D%27cb%20%27%3B%22%3E%0A -->
+  <!-- http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%3Cbody%20onload%3D%22document.forms%5B0%5D.a.focus()%22%3E%0A...%3Cform%3E%0A%3Ctextarea%20name%3Dt%20cols%3D100%20rows%3D3%3E%3C%2Ftextarea%3E%3Cp%3E%0A%3Cinput%20name%3Da%20onblur%3D%22t.value%2B%3D'ab%20'%3B%20b.focus()%3B%22%3E%0A%3Cinput%20name%3Db%20onfocus%3D%22t.value%2B%3D'bf1%20'%3Ba.focus()%3Bt.value%2B%3D'bf2%20'%3B%22%20onblur%3D%22t.value%2B%3D'bb%20'%3B%22%3E -->
+  <!-- http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%3Cbody%3E...%3Cform%3E%0A%3Ctextarea%20name%3Dt%20cols%3D100%20rows%3D3%3E%3C%2Ftextarea%3E%3Cp%3E%0A%3Cinput%20name%3Da%20onfocus%3D%22t.value%2B%3D%27af%20%27%3B%22%20onblur%3D%22t.value%2B%3D%27ab1%20%27%3Bb.focus()%3Bt.value%2B%3D%27ab2%20%27%3B%22%3E%0A%3Cinput%20name%3Db%20onfocus%3D%22t.value%2B%3D%27bf1%20%27%3Ba.focus()%3Bt.value%2B%3D%27bf2%20%27%3B%22%20onblur%3D%22t.value%2B%3D%27bb%20%27%3B%22%3E -->
+
+  <p>When an element is <em>focused</em>, key events received by the document
+   must be targeted at that element. There may be no element focused; when no
+   element is focused, key events received by the document must be targetted
+   at <a href="#the-body1">the <code>body</code> element</a>.
+
+  <p>User agents may track focus for each <a href="#browsing1">browsing
+   context</a> or <code>Document</code> individually, or may support only one
+   focused elment per <a href="#top-level">top-level browsing context</a>
+   — user agents should follow platform conventions in this regard.
+
+  <p>Which element(s) within a <a href="#top-level">top-level browsing
+   context</a> currently has focus must be independent of whether or not the
+   <a href="#top-level">top-level browsing context</a> itself has the
+   <em>system focus</em>.
+
+  <h4 id=focus-management><span class=secno>5.5.1 </span>Focus management</h4>
+
+  <p>The <dfn id=focusing>focusing steps</dfn> are as follows:
+
+  <ol>
+   <li>
+    <p>If focusing the element will remove the focus from another element,
+     then run the <a href="#unfocusing">unfocusing steps</a> for that
+     element.
+
+   <li>
+    <p>Make the element the currently focused element in its <a
+     href="#top-level">top-level browsing context</a>.</p>
+
+    <p>Some elements, most notably <code><a href="#area">area</a></code>, can
+     correspond to more than one distinct focusable area. If a particular
+     area was indicated when the element was focused, then that is the area
+     that must get focus; otherwise, e.g. when using the <code
+     title=dom-focus><a href="#focus0">focus()</a></code> method, the first
+     such region in tree order is the one that must be focused.</p>
+
+   <li>
+    <p><a href="#firing2">Fire a simple event</a> that doesn't bubble called
+     <code title=event-focus>focus</code> at the element.
+  </ol>
+
+  <p>User agents must run the <a href="#focusing">focusing steps</a> for an
+   element whenever the user moves the focus to a <a
+   href="#focusable">focusable</a> element.
+
+  <p>The <dfn id=unfocusing>unfocusing steps</dfn> are as follows:
+
+  <ol><!-- XXX onchange event for input controls -->
+
+   <li>
+    <p>Unfocus the element.
+
+   <li>
+    <p><a href="#firing2">Fire a simple event</a> that doesn't bubble called
+     <code title=event-blur>blur</code> at the element.
+  </ol>
+
+  <p>User agents should run the <a href="#unfocusing">unfocusing steps</a>
+   for an element whenever the user moves the focus away from any <a
+   href="#focusable">focusable</a> element.
+
+  <hr>
+
+  <p>The <dfn id=focus0 title=dom-focus><code>focus()</code></dfn> method,
+   when invoked, must run the following algorithm:
+
+  <ol>
+   <li>
+    <p>If the element is marked as <i><a href="#locked">locked for
+     focus</a></i>, then abort these steps.
+
+   <li>
+    <p>If the element is not <a href="#focusable">focusable</a>, then abort
+     these steps.
+
+   <li>
+    <p>Mark the element as <dfn id=locked>locked for focus</dfn>.
+
+   <li>
+    <p>If the element is not already focused, run the <a
+     href="#focusing">focusing steps</a> for the element.
+
+   <li>
+    <p>Unmark the element as <i><a href="#locked">locked for focus</a></i>.
+  </ol>
+
+  <p>The <dfn id=blur title=dom-blur><code>blur()</code></dfn> method, when
+   invoked, should run the <a href="#unfocusing">unfocusing steps</a> for the
+   element. User agents may selectively or uniformly ignore calls to this
+   method for usability reasons.</p>
+  <!-- XXX define onfocus/onblur behaviour for Window -->
+
+  <hr>
+
+  <p>The <dfn id=activeelement
+   title=dom-document-activeElement><code>activeElement</code></dfn>
+   attribute must return the element in the document that is focused. If no
+   element in the <code>Document</code> is focused, this must return <a
+   href="#the-body1">the <code>body</code> element</a>.
+
+  <p>The <dfn id=hasfocus
+   title=dom-document-hasFocus><code>hasFocus()</code></dfn> method must
+   return true if the document, one of its nested <a href="#browsing1"
+   title="browsing context">browsing contexts</a>, or any element in the
+   document or its browsing contexts currently has the system focus.
+
+  <h4 id=sequential0><span class=secno>5.5.2 </span>Sequential focus
+   navigation</h4>
+
+  <p>The <dfn id=tabindex title=attr-tabindex><code>tabindex</code></dfn>
+   content attribute specifies whether the element is focusable, whether it
+   can be reached using sequential focus navigation, and the relative order
+   of the element for the purposes of sequential focus navigation. The name
+   "tab index" comes from the common use of the "tab" key to navigate through
+   the focusable elements. The term "tabbing" refers to moving forward
+   through the focusable elements that can be reached using sequential focus
+   navigation.
+
+  <p>The <code title=attr-tabindex><a href="#tabindex">tabindex</a></code>
+   attribute, if specified, must have a value that is a <a
+   href="#valid0">valid integer</a>.
+
+  <p>If the attribute is specified, it must be parsed using the <a
+   href="#rules0">rules for parsing integers</a>. The attribute's values have
+   the following meanings:
+
+  <dl>
+   <dt>If the attribute is omitted or parsing the value returns an error
+
+   <dd>
+    <p>The user agent should follow platform conventions to determine if the
+     element is to be focusable and, if so, whether the element can be
+     reached using sequential focus navigation, and if so, what its relative
+     order should be.</p>
+
+   <dt id=negative-tabindex>If the value is a negative integer
+
+   <dd>
+    <p>The user agent must allow the element to be focused, but should not
+     allow the element to be reached using sequential focus navigation.</p>
+
+   <dt>If the value is a zero
+
+   <dd>
+    <p>The user agent must allow the element to be focused, should allow the
+     element to be reached using sequential focus navigation, and should
+     follow platform conventions to determine the element's relative order.</p>
+
+   <dt>If the value is greater than zero
+
+   <dd>
+    <p>The user agent must allow the element to be focused, should allow the
+     element to be reached using sequential focus navigation, and should
+     place the element in the sequential focus navigation order so that it
+     is:</p>
+
+    <ul>
+     <li>before any focusable element whose <code title=attr-tabindex><a
+      href="#tabindex">tabindex</a></code> attribute has been omitted or
+      whose value, when parsed, returns an error,
+
+     <li>before any focusable element whose <code title=attr-tabindex><a
+      href="#tabindex">tabindex</a></code> attribute has a value equal to or
+      less than zero,
+
+     <li>after any element whose <code title=attr-tabindex><a
+      href="#tabindex">tabindex</a></code> attribute has a value greater than
+      zero but less than the value of the <code title=attr-tabindex><a
+      href="#tabindex">tabindex</a></code> attribute on the element,
+
+     <li>after any element whose <code title=attr-tabindex><a
+      href="#tabindex">tabindex</a></code> attribute has a value equal to the
+      value of the <code title=attr-tabindex><a
+      href="#tabindex">tabindex</a></code> attribute on the element but that
+      is earlier in the document in <a href="#tree-order">tree order</a> than
+      the element,
+
+     <li>before any element whose <code title=attr-tabindex><a
+      href="#tabindex">tabindex</a></code> attribute has a value equal to the
+      value of the <code title=attr-tabindex><a
+      href="#tabindex">tabindex</a></code> attribute on the element but that
+      is later in the document in <a href="#tree-order">tree order</a> than
+      the element, and
+
+     <li>before any element whose <code title=attr-tabindex><a
+      href="#tabindex">tabindex</a></code> attribute has a value greater than
+      the value of the <code title=attr-tabindex><a
+      href="#tabindex">tabindex</a></code> attribute on the element.
+    </ul>
+  </dl>
+
+  <p>An element is <dfn id=focusable>focusable</dfn> if the <code
+   title=attr-tabindex><a href="#tabindex">tabindex</a></code> attribute's
+   definition above defines the element to be focusable <em>and</em> the
+   element is <span>being
+   rendered</span><!-- XXX xref, define display:none as not
+  being rendered, off-screen as being rendered? -->.
+
+  <p>When an element is focused, the element matches the CSS
+   <code>:focus</code> pseudo-class and key events are dispatched on that
+   element in response to keyboard input.
+
+  <p>The <dfn id=tabindex0 title=dom-tabIndex><code>tabIndex</code></dfn> DOM
+   attribute must <a href="#reflect">reflect</a> the value of the <code
+   title=attr-tabIndex><a href="#tabindex">tabIndex</a></code> content
+   attribute. If the attribute is not present, or parsing its value returns
+   an error, then the DOM attribute must return 0 for elements that are
+   focusable and &#x2212;1 for elements that are not focusable.</p>
+  <!--XXX
+  <h4>The <dfn><code>DocumentFocus</code></dfn> interface</h4>
+
+  <p>The <code>DocumentFocus</code> interface contains methods for
+  moving focus around the document. It can be obtained from objects
+  that implement the <code>Document</code> interface using
+  binding-specific casting methods.</p>
+
+  <p class="big-issue">Actually even better would be to just mix it
+  straight into those interfaces somehow.</p>
+
+  <pre class="idl">[NoInterfaceObject] interface <dfn>DocumentFocus</dfn> {
+  void moveFocusForward();
+  void moveFocusBackward();
+  void moveFocusUp();
+  void moveFocusRight();
+  void moveFocusDown();
+  void moveFocusLeft();
+};</pre>
+
+  <p>The <dfn><code>currentFocus</code></dfn> attribute returns the
+  element to which key events will be sent when the document receives
+  key events.</p>
+
+  <p>The <dfn><code>moveFocusForward</code></dfn> method uses the
+  <code>'nav-index'</code> property and the <code
+  title="attr-tabindex">tabindex</code> attribute to find the next
+  focusable element and focuses it.</p>
+
+  <p>The <dfn><code>moveFocusBackward</code></dfn> method uses the
+  <code>'nav-index'</code> property and the <code
+  title="attr-tabindex>tabindex</code> attribute to find the previous
+  focusable element and focuses it.</p>
+
+  <p>The <dfn><code>moveFocusUp</code></dfn> method uses the
+  <code>'nav-up'</code> property and the <code
+  title="attr-tabindex>tabindex</code> attribute to find an
+  appropriate focusable element and focuses it.</p>
+
+  <p>In a similar manner, the <dfn><code>moveFocusRight</code></dfn>,
+  <dfn><code>moveFocusDown</code></dfn>, and
+  <dfn><code>moveFocusLeft</code></dfn> methods use the
+  <code>'nav-right'</code>, <code>'nav-down'</code>, and
+  <code>'nav-left'</code> properties (respectively), and the <code
+  title="attr-tabindex>tabindex</code> attribute, to find an
+  appropriate focusable element and focus it.</p>
+
+  <p>The <code>'nav-index'</code>, <code>'nav-up'</code>,
+  <code>'nav-right'</code>, <code>'nav-down'</code>, and
+  <code>'nav-left'</code> properties are defined in <a
+  href="#refsCSS3UI">[CSS3UI]</a>.</p>
+
+Other things to look at are IE's focus APIs (document.activeElement,
+document.hasFocus, HTMLElement.setActive(), onBeforeActivate,
+onActivate, onBeforeDeactivate, onDeactivate, document.hasFocus):
+   https://bugzilla.mozilla.org/show_bug.cgi?id=296471
+   https://bugzilla.mozilla.org/show_bug.cgi?id=296469
+   http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/activeelement.asp
+   http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/setactive.asp
+   http://msdn.microsoft.com/workshop/author/dhtml/reference/events/onbeforeactivate.asp
+   http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/focus.asp
+-->
+
+  <h3 id=selection><span class=secno>5.6 </span>The text selection APIs</h3>
+
+  <p>Every <a href="#browsing1">browsing context</a> has <dfn id=a-selection
+   title="the selection">a selection</dfn>. The selection can be empty, and
+   the selection can have more than one range (a disjointed selection). The
+   user should be able to change the selection. User agents are not required
+   to let the user select more than one range, and may collapse multiple
+   ranges in the selection to a single range when the user interacts with the
+   selection. (But, of course, the user agent may let the user create
+   selections with multiple ranges.)
+
+  <p>This one selection must be shared by all the content of the browsing
+   context (though not by nested <a href="#browsing1" title="browsing
+   context">browsing contexts</a>), including any editing hosts in the
+   document. (Editing hosts that are not inside a document cannot have a
+   selection.)
+
+  <p>If the selection is empty (collapsed, so that it has only one segment
+   and that segment's start and end points are the same) then the selection's
+   position should equal the caret position. When the selection is not empty,
+   this specification does not define the caret position; user agents should
+   follow platform conventions in deciding whether the caret is at the start
+   of the selection, the end of the selection, or somewhere else.
+
+  <p>On some platforms (such as those using Wordstar editing conventions),
+   the caret position is totally independent of the start and end of the
+   selection, even when the selection is empty. On such platforms, user
+   agents may ignore the requirement that the cursor position be linked to
+   the position of the selection altogether.
+
+  <p>Mostly for historical reasons, in addition to the <a
+   href="#browsing1">browsing context</a>'s <a href="#a-selection" title="the
+   selection">selection</a>, each <code>textarea</code> and
+   <code>input</code> element has an independent selection. These are the
+   <dfn id=text-field title="text field selection">text field
+   selections</dfn>.
+
+  <p>User agents may selectively ignore attempts to use the API to adjust the
+   selection made after the user has modified the selection. For example, if
+   the user has just selected part of a word, the user agent could ignore
+   attempts to use the API call to immediately unselect the selection
+   altogether, but could allow attempts to change the selection to select the
+   entire word.
+
+  <p>User agents may also allow the user to create selections that are not
+   exposed to the API.
+
+  <p>The <code><a href="#datagrid0">datagrid</a></code> and
+   <code>select</code> elements also have selections, indicating which items
+   have been picked by the user. These are not discussed in this section.
+
+  <p class=note>This specification does not specify how selections are
+   presented to the user. The Selectors specification, in conjunction with
+   CSS, can be used to style text selections using the <code><a
+   href="#selection1">::selection</a></code> pseudo-element. <a
+   href="#refsSELECTORS">[SELECTORS]</a> <a href="#refsCSS21">[CSS21]</a>
+
+  <h4 id=documentSelection><span class=secno>5.6.1 </span>APIs for the
+   browsing context selection</h4>
+
+  <p>The <dfn id=getselection
+   title=dom-getSelection><code>getSelection()</code></dfn> method on the
+   <code><a href="#window">Window</a></code> interface must return the
+   <code><a href="#selection1">Selection</a></code> object representing <a
+   href="#a-selection">the selection</a> of that <code><a
+   href="#window">Window</a></code> object's <a href="#browsing1">browsing
+   context</a>.
+
+  <p>For historical reasons, the <dfn id=getselection0
+   title=dom-document-getSelection><code>getSelection()</code></dfn> method
+   on the <code><a href="#htmldocument">HTMLDocument</a></code> interface
+   must return the same <code><a href="#selection1">Selection</a></code>
+   object.
+
+  <pre
+   class=idl>[<a href="#stringify0" title=dom-selection-toString>Stringifies</a>] interface <dfn id=selection1>Selection</dfn> {
+  readonly attribute Node <a href="#anchornode" title=dom-selection-anchorNode>anchorNode</a>;
+  readonly attribute long <a href="#anchoroffset" title=dom-selection-anchorOffset>anchorOffset</a>;
+  readonly attribute Node <a href="#focusnode" title=dom-selection-focusNode>focusNode</a>;
+  readonly attribute long <a href="#focusoffset" title=dom-selection-focusOffset>focusOffset</a>;
+  readonly attribute boolean <a href="#iscollapsed" title=dom-selection-isCollapsed>isCollapsed</a>;
+  void <a href="#collapse" title=dom-selection-collapse>collapse</a>(in Node parentNode, in long offset);
+  void <a href="#collapsetostart" title=dom-selection-collapseToStart>collapseToStart</a>();
+  void <a href="#collapsetoend" title=dom-selection-collapseToEnd>collapseToEnd</a>();
+  void <a href="#selectallchildren" title=dom-selection-selectAllChildren>selectAllChildren</a>(in Node parentNode);
+  void <a href="#deletefromdocument" title=dom-selection-deleteFromDocument>deleteFromDocument</a>();
+  readonly attribute long <a href="#rangecount" title=dom-selection-rangeCount>rangeCount</a>;
+  Range <a href="#getrangeat" title=dom-selection-getRangeAt>getRangeAt</a>(in long index);
+  void <a href="#addrange" title=dom-selection-addRange>addRange</a>(in Range range);
+  void <a href="#removerange" title=dom-selection-removeRange>removeRange</a>(in Range range);
+  void <a href="#removeallranges" title=dom-selection-removeAllRanges>removeAllRanges</a>();
+};</pre>
+  <!--
+  See also:
+    http://lxr.mozilla.org/mozilla/source/content/base/public/nsISelection.idl
+  This spec doesn't have everything from there yet, in particular
+  selectionLanguageChange() and containsNode() are missing. They are missing
+  because I couldn't work out how to define them in terms of Ranges.
+
+  I also haven't included extend():
+
+    void <span title="dom-selection-extend">extend</span>(in Node parentNode, in long offset);
+    // raise if no range
+    // raise WRONG_DOCUMENT_ERR if parentNode not in document
+    // do something
+
+  ...mostly because I can't work out how to describe what it does quickly.
+-->
+
+  <p>The <code><a href="#selection1">Selection</a></code> interface is
+   represents a list of <code>Range</code> objects. The first item in the
+   list has index 0, and the last item has index <var title="">count</var>-1,
+   where <var title="">count</var> is the number of ranges in the list. <a
+   href="#refsDOM2RANGE">[DOM2RANGE]</a>
+
+  <p>All of the members of the <code><a
+   href="#selection1">Selection</a></code> interface are defined in terms of
+   operations on the <code>Range</code> objects represented by this object.
+   These operations can raise exceptions, as defined for the
+   <code>Range</code> interface; this can therefore result in the members of
+   the <code><a href="#selection1">Selection</a></code> interface raising
+   exceptions as well, in addition to any explicitly called out below.</p>
+  <!-- XXX example -->
+
+  <p>The <dfn id=anchornode
+   title=dom-selection-anchorNode><code>anchorNode</code></dfn> attribute
+   must return the value returned by the <code title="">startContainer</code>
+   attribute of the last <code>Range</code> object in the list, or null if
+   the list is empty.
+
+  <p>The <dfn id=anchoroffset
+   title=dom-selection-anchorOffset><code>anchorOffset</code></dfn> attribute
+   must return the value returned by the <code title="">startOffset</code>
+   attribute of the last <code>Range</code> object in the list, or 0 if the
+   list is empty.
+
+  <p>The <dfn id=focusnode
+   title=dom-selection-focusNode><code>focusNode</code></dfn> attribute must
+   return the value returned by the <code title="">endContainer</code>
+   attribute of the last <code>Range</code> object in the list, or null if
+   the list is empty.
+
+  <p>The <dfn id=focusoffset
+   title=dom-selection-focusOffset><code>focusOffset</code></dfn> attribute
+   must return the value returned by the <code title="">endOffset</code>
+   attribute of the last <code>Range</code> object in the list, or 0 if the
+   list is empty.
+
+  <p>The <dfn id=iscollapsed
+   title=dom-selection-isCollapsed><code>isCollapsed</code></dfn> attribute
+   must return true if there are zero ranges, or if there is exactly one
+   range and its <code title="">collapsed</code> attribute is itself true.
+   Otherwise it must return false.
+
+  <p>The <dfn id=collapse title=dom-selection-collapse><code>collapse(<var
+   title="">parentNode</var>, <var title="">offset</var>)</code></dfn> method
+   must raise a <code>WRONG_DOCUMENT_ERR</code> DOM exception if <var
+   title="">parentNode</var>'s <code title="">ownerDocument</code> is not the
+   <code><a href="#htmldocument">HTMLDocument</a></code> object with which
+   the <code><a href="#selection1">Selection</a></code> object is associated.
+   Otherwise it is, and the method must remove all the ranges in the <code><a
+   href="#selection1">Selection</a></code> list, then create a new
+   <code>Range</code> object, add it to the list, and invoke its <code
+   title="">setStart()</code> and <code title="">setEnd()</code> methods with
+   the <var title="">parentNode</var> and <var title="">offset</var> values
+   as their arguments.
+
+  <p>The <dfn id=collapsetostart
+   title=dom-selection-collapseToStart><code>collapseToStart()</code></dfn>
+   method must raise an <code>INVALID_STATE_ERR</code> DOM exception if there
+   are no ranges in the list. Otherwise, it must invoke the <code
+   title=dom-selection-collapse><a href="#collapse">collapse()</a></code>
+   method with the <code title="">startContainer</code> and <code
+   title="">startOffset</code> values of the first <code>Range</code> object
+   in the list as the arguments.
+
+  <p>The <dfn id=collapsetoend
+   title=dom-selection-collapseToEnd><code>collapseToEnd()</code></dfn>
+   method must raise an <code>INVALID_STATE_ERR</code> DOM exception if there
+   are no ranges in the list. Otherwise, it must invoke the <code
+   title=dom-selection-collapse><a href="#collapse">collapse()</a></code>
+   method with the <code title="">endContainer</code> and <code
+   title="">endOffset</code> values of the last <code>Range</code> object in
+   the list as the arguments.
+
+  <p>The <dfn id=selectallchildren
+   title=dom-selection-selectAllChildren><code>selectAllChildren(<var
+   title="">parentNode</var>)</code></dfn> method must invoke the <code
+   title=dom-selection-collapse><a href="#collapse">collapse()</a></code>
+   method with the <var title="">parentNode</var> value as the first argument
+   and 0 as the second argument, and must then invoke the <code
+   title="">selectNodeContents()</code> method on the first (and only) range
+   in the list with the <var title="">parentNode</var> value as the argument.
+
+  <p>The <dfn id=deletefromdocument
+   title=dom-selection-deleteFromDocument><code>deleteFromDocument()</code></dfn>
+   method must invoke the <code title="">deleteContents()</code> method on
+   each range in the list, if any, from first to last.
+
+  <p>The <dfn id=rangecount
+   title=dom-selection-rangeCount><code>rangeCount</code></dfn> attribute
+   must return the number of ranges in the list.
+
+  <p>The <dfn id=getrangeat
+   title=dom-selection-getRangeAt><code>getRangeAt(<var
+   title="">index</var>)</code></dfn> method must return the <var
+   title="">index</var>th range in the list. If <var title="">index</var> is
+   less than zero or greater or equal to the value returned by the <code
+   title=dom-selection-rangeCount><a href="#rangecount">rangeCount</a></code>
+   attribute, then the method must raise an <code>INDEX_SIZE_ERR</code> DOM
+   exception.
+
+  <p>The <dfn id=addrange title=dom-selection-addRange><code>addRange(<var
+   title="">range</var>)</code></dfn> method must add the given <var
+   title="">range</var> Range object to the list of selections, at the end
+   (so the newly added range is the new last range). Duplicates are not
+   prevented; a range may be added more than once in which case it appears in
+   the list more than once, which (for example) will cause <a
+   href="#stringify0" title=dom-selection-toString>stringification</a> to
+   return the range's text twice.</p>
+  <!-- XXX how does this interact with
+  deleteFromDocument() which acts on all ranges? -->
+
+  <p>The <dfn id=removerange
+   title=dom-selection-removeRange><code>removeRange(<var
+   title="">range</var>)</code></dfn> method must remove the first occurrence
+   of <var title="">range</var> in the list of ranges, if it appears at all.
+
+  <p>The <dfn id=removeallranges
+   title=dom-selection-removeAllRanges><code>removeAllRanges()</code></dfn>
+   method must remove all the ranges from the list of ranges, such that the
+   <code title=dom-selection-rangeCount><a
+   href="#rangecount">rangeCount</a></code> attribute returns 0 after the
+   <code title=dom-selection-removeAllRanges><a
+   href="#removeallranges">removeAllRanges()</a></code> method is invoked
+   (and until a new range is added to the list, either through this interface
+   or via user interaction).
+
+  <p>Objects implementing this interface must <dfn id=stringify0
+   title=dom-selection-toString>stringify</dfn> to a concatenation of the
+   results of invoking the <code title="">toString()</code> method of the
+   <code>Range</code> object on each of the ranges of the selection, in the
+   order they appear in the list (first to last).
+
+  <div class=example>
+   <p>In the following document fragment, the emphasised parts indicate the
+    selection.</p>
+
+   <pre><p>The cute girl likes <em>the </em><cite><em>Oxford English</em> Dictionary</cite>.</p></pre>
+
+   <p>If a script invoked <code
+    title="">window.getSelection().toString()</code>, the return value would
+    be "<code>the Oxford English</code>".</p>
+  </div>
+
+  <p class=note>The <code><a href="#selection1">Selection</a></code>
+   interface has no relation to the <code><a
+   href="#datagridselection">DataGridSelection</a></code> interface.
+
+  <h4 id=textFieldSelection><span class=secno>5.6.2 </span>APIs for the text
+   field selections</h4>
+
+  <p class=big-issue>When we define HTMLTextAreaElement and HTMLInputElement
+   we will have to add the IDL given below to both of their IDLs.
+
+  <p>The <code>input</code> and <code>textarea</code> elements define four
+   members in their DOM interfaces for handling their text selection:
+
+  <pre
+   class=idl>  void <a href="#select1" title="dom-textarea/input-select">select</a>();
+           attribute unsigned long <a href="#selectionstart" title="dom-textarea/input-selectionStart">selectionStart</a>;
+           attribute unsigned long <a href="#selectionend" title="dom-textarea/input-selectionEnd">selectionEnd</a>;
+  void <a href="#setselectionrange" title="dom-textarea/input-setSelectionRange">setSelectionRange</a>(in unsigned long start, in unsigned long end);</pre>
+  <!-- XXX also add textLength? it seems to be widely used -->
+
+  <p>These methods and attributes expose and control the selection of
+   <code>input</code> and <code>textarea</code> text fields.
+
+  <p>The <dfn id=select1
+   title="dom-textarea/input-select"><code>select()</code></dfn> method must
+   cause the contents of the text field to be fully selected.
+
+  <p>The <dfn id=selectionstart
+   title="dom-textarea/input-selectionStart"><code>selectionStart</code></dfn>
+   attribute must, on getting, return the offset (in logical order) to the
+   character that immediately follows the start of the selection. If there is
+   no selection, then it must return the offset (in logical order) to the
+   character that immediately follows the text entry cursor.
+
+  <p>On setting, it must act as if the <code
+   title="dom-textarea/input-setSelectionRange"><a
+   href="#setselectionrange">setSelectionRange()</a></code> method had been
+   called, with the new value as the first argument, and the current value of
+   the <code title="dom-textarea/input-selectionEnd"><a
+   href="#selectionend">selectionEnd</a></code> attribute as the second
+   argument, unless the current value of the <code
+   title="dom-textarea/input-selectionEnd"><a
+   href="#selectionend">selectionEnd</a></code> is less than the new value,
+   in which case the second argument must also be the new value.
+
+  <p>The <dfn id=selectionend
+   title="dom-textarea/input-selectionEnd"><code>selectionEnd</code></dfn>
+   attribute must, on getting, return the offset (in logical order) to the
+   character that immediately follows the end of the selection. If there is
+   no selection, then it must return the offset (in logical order) to the
+   character that immediately follows the text entry cursor.
+
+  <p>On setting, it must act as if the <code
+   title="dom-textarea/input-setSelectionRange"><a
+   href="#setselectionrange">setSelectionRange()</a></code> method had been
+   called, with the current value of the <code
+   title="dom-textarea/input-selectionStart"><a
+   href="#selectionstart">selectionStart</a></code> attribute as the first
+   argument, and new value as the second argument.
+
+  <p>The <dfn id=setselectionrange
+   title="dom-textarea/input-setSelectionRange"><code>setSelectionRange(<var
+   title="">start</var>, <var title="">end</var>)</code></dfn> method must
+   set the selection of the text field to the sequence of characters starting
+   with the character at the <var title="">start</var>th position (in logical
+   order) and ending with the character at the <span>(<var
+   title="">end</var>-1)</span>th position. Arguments greater than the length
+   of the value in the text field must be treated as pointing at the end of
+   the text field. If <var title="">end</var> is less than or equal to <var
+   title="">start</var> then the start of the selection and the end of the
+   selection must both be placed immediately before the character with offset
+   <var title="">end</var>. In UAs where there is no concept of an empty
+   selection, this must set the cursor to be just before the character with
+   offset <var title="">end</var>.
+
+  <div class=example>
+   <p>To obtain the currently selected text, the following JavaScript
+    suffices:</p>
+
+   <pre>var selectionText = control.value.substring(control.selectionStart, control.selectionEnd);</pre>
+
+   <p>...where <var title="">control</var> is the <code>input</code> or
+    <code>textarea</code> element.</p>
+  </div>
+
+  <p>Characters with no visible rendering, such as U+200D ZERO WIDTH JOINER,
+   still count as characters. Thus, for instance, the selection can include
+   just an invisible character, and the text insertion cursor can be placed
+   to one side or another of such a character.
+
+  <p>When these methods and attributes are used with <code>input</code>
+   elements that are not displaying simple text fields, they must raise an
+   <code>INVALID_STATE_ERR</code> exception.
+
+  <h3 id=contenteditable><span class=secno>5.7 </span>The <code
    title=attr-contenteditable><a
    href="#contenteditable0">contenteditable</a></code> attribute</h3>
 
@@ -37312,7 +37646,7 @@
 
   <p>If an element is <a href="#editable0">editable</a> and its parent
    element is not, or if an element is <a href="#editable0">editable</a> and
-   it has no parent element, then the element is an <dfn id=editing1>editing
+   it has no parent element, then the element is an <dfn id=editing0>editing
    host</dfn>. Editable elements can be nested. User agents must make editing
    hosts focusable (which typically means they enter the <a href="#tabindex"
    title=attr-tabindex>tab order</a>). An editing host can contain
@@ -37332,7 +37666,7 @@
   <!-- XXX would be useful to have a way to mark an element as
   unremovable. -->
 
-  <h4 id=user-editing><span class=secno>5.2.1 </span>User editing actions</h4>
+  <h4 id=user-editing><span class=secno>5.7.1 </span>User editing actions</h4>
 
   <p>There are several actions that the user agent should allow the user to
    perform while the user is interacting with an editing host. How exactly
@@ -37520,7 +37854,7 @@
    href="#a-selection">the selection</a> followed by a request to break the
    paragraph at that position.
 
-  <h4 id=making><span class=secno>5.2.2 </span>Making entire documents
+  <h4 id=making><span class=secno>5.7.2 </span>Making entire documents
    editable</h4>
 
   <p>Documents have a <dfn id=designMode
@@ -37555,7 +37889,7 @@
    href="#designModeScriptBlocked">causes scripts in general to be
    disabled</a> and the document to become editable.
 
-  <h3 id=dnd><span class=secno>5.3 </span><dfn id=drag-and>Drag and
+  <h3 id=dnd><span class=secno>5.8 </span><dfn id=drag-and>Drag and
    drop</dfn></h3>
   <!--XXX
 
@@ -37611,13 +37945,13 @@
    (so if the operation is not canceled, there must be at least one element
    in the middle step).
 
-  <h4 id=introduction4><span class=secno>5.3.1 </span>Introduction</h4>
+  <h4 id=introduction4><span class=secno>5.8.1 </span>Introduction</h4>
 
   <p><em>This section is non-normative.</em>
 
   <p class=big-issue>It's also currently non-existent.
 
-  <h4 id=the-dragevent><span class=secno>5.3.2 </span>The <code><a
+  <h4 id=the-dragevent><span class=secno>5.8.2 </span>The <code><a
    href="#dragevent">DragEvent</a></code> and <code><a
    href="#datatransfer0">DataTransfer</a></code> interfaces</h4>
 
@@ -37767,7 +38101,7 @@
    the drag feedback</a>. It adds an element to the <code><a
    href="#datatransfer0">DataTransfer</a></code> object.
 
-  <h4 id=events1><span class=secno>5.3.3 </span>Events fired during a
+  <h4 id=events1><span class=secno>5.8.3 </span>Events fired during a
    drag-and-drop action</h4>
 
   <p>The following events are involved in the drag-and-drop model. Whenever
@@ -38021,7 +38355,7 @@
      <td><code title="">copy</code>
   </table>
 
-  <h4 id=drag-and-drop><span class=secno>5.3.4 </span>Drag-and-drop
+  <h4 id=drag-and-drop><span class=secno>5.8.4 </span>Drag-and-drop
    processing model</h4>
 
   <p>When the user attempts to begin a drag operation, the user agent must
@@ -38459,7 +38793,7 @@
     </ol>
   </ol>
 
-  <h5 id=when-the><span class=secno>5.3.4.1. </span>When the drag-and-drop
+  <h5 id=when-the><span class=secno>5.8.4.1. </span>When the drag-and-drop
    operation starts or ends in another document</h5>
 
   <p>The model described above is independent of which <code>Document</code>
@@ -38470,7 +38804,7 @@
   source in the events to the target, or is that obvious enough from
   the requirements in the event section above? -->
 
-  <h5 id=when-the0><span class=secno>5.3.4.2. </span>When the drag-and-drop
+  <h5 id=when-the0><span class=secno>5.8.4.2. </span>When the drag-and-drop
    operation starts or ends in another application</h5>
 
   <p>If the drag is initiated in another application, the <a
@@ -38494,7 +38828,7 @@
    ended in another application from the case of a drag-and-drop operation
    being started or ended in another document from another domain.
 
-  <h4 id=the-draggable><span class=secno>5.3.5 </span>The <dfn id=draggable
+  <h4 id=the-draggable><span class=secno>5.8.5 </span>The <dfn id=draggable
    title=attr-draggable><code>draggable</code></dfn> attribute</h4>
 
   <p>All elements may have the <code title=attr-draggable><a
@@ -38544,7 +38878,7 @@
    href="#draggable">draggable</a></code> content attribute must be set to
    the literal value <code title="">true</code>.
 
-  <h4 id=copy-and><span class=secno>5.3.6 </span>Copy and paste</h4>
+  <h4 id=copy-and><span class=secno>5.8.6 </span>Copy and paste</h4>
 
   <p>Copy-and-paste is a form of drag-and-drop: the "copy" part is equivalent
    to dragging content to another application (the "clipboard"), and the
@@ -38555,7 +38889,7 @@
    System) is equivalent to a drag-and-drop operation where the source is the
    selection.
 
-  <h5 id=copy-to><span class=secno>5.3.6.1. </span>Copy to clipboard</h5>
+  <h5 id=copy-to><span class=secno>5.8.6.1. </span>Copy to clipboard</h5>
 
   <p>When the user invokes a copy operation, the user agent must act as if
    the user had invoked a drag on the current selection. If the drag-and-drop
@@ -38567,14 +38901,14 @@
    agent should then follow the relevant platform-specific conventions for
    copy operations (e.g. updating the clipboard).
 
-  <h5 id=cut-to><span class=secno>5.3.6.2. </span>Cut to clipboard</h5>
+  <h5 id=cut-to><span class=secno>5.8.6.2. </span>Cut to clipboard</h5>
 
   <p>When the user invokes a cut operation, the user agent must act as if the
    user had invoked a copy operation (see the previous section), followed, if
    the copy was completed successfully, by <a
    href="#contenteditable-delete">a selection delete operation</a>.
 
-  <h5 id=paste><span class=secno>5.3.6.3. </span>Paste from clipboard</h5>
+  <h5 id=paste><span class=secno>5.8.6.3. </span>Paste from clipboard</h5>
 
   <p>When the user invokes a clipboard paste operation, the user agent must
    act as if the user had invoked a drag on a hypothetical application
@@ -38586,7 +38920,7 @@
    keyboard focus, and then ended the drag-and-drop operation without
    canceling it.
 
-  <h5 id=paste0><span class=secno>5.3.6.4. </span>Paste from selection</h5>
+  <h5 id=paste0><span class=secno>5.8.6.4. </span>Paste from selection</h5>
 
   <p>When the user invokes a selection paste operation, the user agent must
    act as if the user had invoked a drag on the current selection, then
@@ -38594,7 +38928,7 @@
    element with the keyboard focus, and then ended the drag-and-drop
    operation without canceling it.
 
-  <h4 id=security8><span class=secno>5.3.7 </span>Security risks in the
+  <h4 id=security8><span class=secno>5.8.7 </span>Security risks in the
    drag-and-drop model</h4>
 
   <p>User agents must not make the data added to the <code><a
@@ -38620,7 +38954,7 @@
    sensitive sources and dropped into hostile documents without the user's
    consent.
 
-  <h3 id=undo><span class=secno>5.4 </span><dfn id=undo-history>Undo
+  <h3 id=undo><span class=secno>5.9 </span><dfn id=undo-history>Undo
    history</dfn></h3>
 
   <p class=big-issue>There has got to be a better way of doing this, surely.
@@ -38666,7 +39000,7 @@
    actions (such as interactions with server-side state, or in the
    implementation of a drawing tool).
 
-  <h4 id=the-undomanager><span class=secno>5.4.1 </span>The <code><a
+  <h4 id=the-undomanager><span class=secno>5.9.1 </span>The <code><a
    href="#undomanager">UndoManager</a></code> interface</h4>
 
   <div class=big-issue>
@@ -38809,7 +39143,7 @@
    "startBatchingDOMChangesForUndo()" and after that the changes to the DOM
    go in as if the user had done them.
 
-  <h4 id=undo-moving><span class=secno>5.4.2 </span><dfn id=undo-moving0
+  <h4 id=undo-moving><span class=secno>5.9.2 </span><dfn id=undo-moving0
    title=do-undo>Undo: moving back in the undo transaction history</dfn></h4>
 
   <p>When the user invokes an undo operation, or when the <code
@@ -38851,7 +39185,7 @@
    used to populate the redo history, and will then be used if the user
    invokes the "redo" command to undo his undo.
 
-  <h4 id=redo-moving><span class=secno>5.4.3 </span><dfn id=redo-moving0
+  <h4 id=redo-moving><span class=secno>5.9.3 </span><dfn id=redo-moving0
    title=do-redo>Redo: moving forward in the undo transaction history</dfn></h4>
 
   <p>When the user invokes a redo operation, or when the <code
@@ -38890,7 +39224,7 @@
    on the <code>Document</code> object, using the <a href="#undo-object">undo
    object</a> entry's associated undo object as the event's data.
 
-  <h4 id=the-undomanagerevent><span class=secno>5.4.4 </span>The <code><a
+  <h4 id=the-undomanagerevent><span class=secno>5.9.4 </span>The <code><a
    href="#undomanagerevent">UndoManagerEvent</a></code> interface and the
    <code title=event-undo><a href="#undo0">undo</a></code> and <code
    title=event-redo><a href="#redo">redo</a></code> events</h4>
@@ -38922,7 +39256,7 @@
    <code title=dom-UndoManagerEvent-data><a href="#data3">data</a></code>
    field containing the relevant <a href="#undo-object">undo object</a>.
 
-  <h4 id=implementation0><span class=secno>5.4.5 </span>Implementation notes</h4>
+  <h4 id=implementation0><span class=secno>5.9.5 </span>Implementation notes</h4>
 
   <p>How user agents present the above conceptual model to the user is not
    defined. The undo interface could be a filtered view of the <a
@@ -38939,357 +39273,8 @@
    history</a> described in this section, however, such that to a script
    there is no detectable difference.
 
-  <h3 id=selection><span class=secno>5.5 </span>The text selection APIs</h3>
+  <h3 id=command><span class=secno>5.10 </span>Command APIs</h3>
 
-  <p>Every <a href="#browsing1">browsing context</a> has <dfn id=a-selection
-   title="the selection">a selection</dfn>. The selection can be empty, and
-   the selection can have more than one range (a disjointed selection). The
-   user should be able to change the selection. User agents are not required
-   to let the user select more than one range, and may collapse multiple
-   ranges in the selection to a single range when the user interacts with the
-   selection. (But, of course, the user agent may let the user create
-   selections with multiple ranges.)
-
-  <p>This one selection must be shared by all the content of the browsing
-   context (though not by nested <a href="#browsing1" title="browsing
-   context">browsing contexts</a>), including any editing hosts in the
-   document. (Editing hosts that are not inside a document cannot have a
-   selection.)
-
-  <p>If the selection is empty (collapsed, so that it has only one segment
-   and that segment's start and end points are the same) then the selection's
-   position should equal the caret position. When the selection is not empty,
-   this specification does not define the caret position; user agents should
-   follow platform conventions in deciding whether the caret is at the start
-   of the selection, the end of the selection, or somewhere else.
-
-  <p>On some platforms (such as those using Wordstar editing conventions),
-   the caret position is totally independent of the start and end of the
-   selection, even when the selection is empty. On such platforms, user
-   agents may ignore the requirement that the cursor position be linked to
-   the position of the selection altogether.
-
-  <p>Mostly for historical reasons, in addition to the <a
-   href="#browsing1">browsing context</a>'s <a href="#a-selection" title="the
-   selection">selection</a>, each <code>textarea</code> and
-   <code>input</code> element has an independent selection. These are the
-   <dfn id=text-field title="text field selection">text field
-   selections</dfn>.
-
-  <p>User agents may selectively ignore attempts to use the API to adjust the
-   selection made after the user has modified the selection. For example, if
-   the user has just selected part of a word, the user agent could ignore
-   attempts to use the API call to immediately unselect the selection
-   altogether, but could allow attempts to change the selection to select the
-   entire word.
-
-  <p>User agents may also allow the user to create selections that are not
-   exposed to the API.
-
-  <p>The <code><a href="#datagrid0">datagrid</a></code> and
-   <code>select</code> elements also have selections, indicating which items
-   have been picked by the user. These are not discussed in this section.
-
-  <p class=note>This specification does not specify how selections are
-   presented to the user. The Selectors specification, in conjunction with
-   CSS, can be used to style text selections using the <code><a
-   href="#selection1">::selection</a></code> pseudo-element. <a
-   href="#refsSELECTORS">[SELECTORS]</a> <a href="#refsCSS21">[CSS21]</a>
-
-  <h4 id=documentSelection><span class=secno>5.5.1 </span>APIs for the
-   browsing context selection</h4>
-
-  <p>The <dfn id=getselection
-   title=dom-getSelection><code>getSelection()</code></dfn> method on the
-   <code><a href="#window">Window</a></code> interface must return the
-   <code><a href="#selection1">Selection</a></code> object representing <a
-   href="#a-selection">the selection</a> of that <code><a
-   href="#window">Window</a></code> object's <a href="#browsing1">browsing
-   context</a>.
-
-  <p>For historical reasons, the <dfn id=getselection0
-   title=dom-document-getSelection><code>getSelection()</code></dfn> method
-   on the <code><a href="#htmldocument">HTMLDocument</a></code> interface
-   must return the same <code><a href="#selection1">Selection</a></code>
-   object.
-
-  <pre
-   class=idl>[<a href="#stringify0" title=dom-selection-toString>Stringifies</a>] interface <dfn id=selection1>Selection</dfn> {
-  readonly attribute Node <a href="#anchornode" title=dom-selection-anchorNode>anchorNode</a>;
-  readonly attribute long <a href="#anchoroffset" title=dom-selection-anchorOffset>anchorOffset</a>;
-  readonly attribute Node <a href="#focusnode" title=dom-selection-focusNode>focusNode</a>;
-  readonly attribute long <a href="#focusoffset" title=dom-selection-focusOffset>focusOffset</a>;
-  readonly attribute boolean <a href="#iscollapsed" title=dom-selection-isCollapsed>isCollapsed</a>;
-  void <a href="#collapse" title=dom-selection-collapse>collapse</a>(in Node parentNode, in long offset);
-  void <a href="#collapsetostart" title=dom-selection-collapseToStart>collapseToStart</a>();
-  void <a href="#collapsetoend" title=dom-selection-collapseToEnd>collapseToEnd</a>();
-  void <a href="#selectallchildren" title=dom-selection-selectAllChildren>selectAllChildren</a>(in Node parentNode);
-  void <a href="#deletefromdocument" title=dom-selection-deleteFromDocument>deleteFromDocument</a>();
-  readonly attribute long <a href="#rangecount" title=dom-selection-rangeCount>rangeCount</a>;
-  Range <a href="#getrangeat" title=dom-selection-getRangeAt>getRangeAt</a>(in long index);
-  void <a href="#addrange" title=dom-selection-addRange>addRange</a>(in Range range);
-  void <a href="#removerange" title=dom-selection-removeRange>removeRange</a>(in Range range);
-  void <a href="#removeallranges" title=dom-selection-removeAllRanges>removeAllRanges</a>();
-};</pre>
-  <!--
-  See also:
-    http://lxr.mozilla.org/mozilla/source/content/base/public/nsISelection.idl
-  This spec doesn't have everything from there yet, in particular
-  selectionLanguageChange() and containsNode() are missing. They are missing
-  because I couldn't work out how to define them in terms of Ranges.
-
-  I also haven't included extend():
-
-    void <span title="dom-selection-extend">extend</span>(in Node parentNode, in long offset);
-    // raise if no range
-    // raise WRONG_DOCUMENT_ERR if parentNode not in document
-    // do something
-
-  ...mostly because I can't work out how to describe what it does quickly.
--->
-
-  <p>The <code><a href="#selection1">Selection</a></code> interface is
-   represents a list of <code>Range</code> objects. The first item in the
-   list has index 0, and the last item has index <var title="">count</var>-1,
-   where <var title="">count</var> is the number of ranges in the list. <a
-   href="#refsDOM2RANGE">[DOM2RANGE]</a>
-
-  <p>All of the members of the <code><a
-   href="#selection1">Selection</a></code> interface are defined in terms of
-   operations on the <code>Range</code> objects represented by this object.
-   These operations can raise exceptions, as defined for the
-   <code>Range</code> interface; this can therefore result in the members of
-   the <code><a href="#selection1">Selection</a></code> interface raising
-   exceptions as well, in addition to any explicitly called out below.</p>
-  <!-- XXX example -->
-
-  <p>The <dfn id=anchornode
-   title=dom-selection-anchorNode><code>anchorNode</code></dfn> attribute
-   must return the value returned by the <code title="">startContainer</code>
-   attribute of the last <code>Range</code> object in the list, or null if
-   the list is empty.
-
-  <p>The <dfn id=anchoroffset
-   title=dom-selection-anchorOffset><code>anchorOffset</code></dfn> attribute
-   must return the value returned by the <code title="">startOffset</code>
-   attribute of the last <code>Range</code> object in the list, or 0 if the
-   list is empty.
-
-  <p>The <dfn id=focusnode
-   title=dom-selection-focusNode><code>focusNode</code></dfn> attribute must
-   return the value returned by the <code title="">endContainer</code>
-   attribute of the last <code>Range</code> object in the list, or null if
-   the list is empty.
-
-  <p>The <dfn id=focusoffset
-   title=dom-selection-focusOffset><code>focusOffset</code></dfn> attribute
-   must return the value returned by the <code title="">endOffset</code>
-   attribute of the last <code>Range</code> object in the list, or 0 if the
-   list is empty.
-
-  <p>The <dfn id=iscollapsed
-   title=dom-selection-isCollapsed><code>isCollapsed</code></dfn> attribute
-   must return true if there are zero ranges, or if there is exactly one
-   range and its <code title="">collapsed</code> attribute is itself true.
-   Otherwise it must return false.
-
-  <p>The <dfn id=collapse title=dom-selection-collapse><code>collapse(<var
-   title="">parentNode</var>, <var title="">offset</var>)</code></dfn> method
-   must raise a <code>WRONG_DOCUMENT_ERR</code> DOM exception if <var
-   title="">parentNode</var>'s <code title="">ownerDocument</code> is not the
-   <code><a href="#htmldocument">HTMLDocument</a></code> object with which
-   the <code><a href="#selection1">Selection</a></code> object is associated.
-   Otherwise it is, and the method must remove all the ranges in the <code><a
-   href="#selection1">Selection</a></code> list, then create a new
-   <code>Range</code> object, add it to the list, and invoke its <code
-   title="">setStart()</code> and <code title="">setEnd()</code> methods with
-   the <var title="">parentNode</var> and <var title="">offset</var> values
-   as their arguments.
-
-  <p>The <dfn id=collapsetostart
-   title=dom-selection-collapseToStart><code>collapseToStart()</code></dfn>
-   method must raise an <code>INVALID_STATE_ERR</code> DOM exception if there
-   are no ranges in the list. Otherwise, it must invoke the <code
-   title=dom-selection-collapse><a href="#collapse">collapse()</a></code>
-   method with the <code title="">startContainer</code> and <code
-   title="">startOffset</code> values of the first <code>Range</code> object
-   in the list as the arguments.
-
-  <p>The <dfn id=collapsetoend
-   title=dom-selection-collapseToEnd><code>collapseToEnd()</code></dfn>
-   method must raise an <code>INVALID_STATE_ERR</code> DOM exception if there
-   are no ranges in the list. Otherwise, it must invoke the <code
-   title=dom-selection-collapse><a href="#collapse">collapse()</a></code>
-   method with the <code title="">endContainer</code> and <code
-   title="">endOffset</code> values of the last <code>Range</code> object in
-   the list as the arguments.
-
-  <p>The <dfn id=selectallchildren
-   title=dom-selection-selectAllChildren><code>selectAllChildren(<var
-   title="">parentNode</var>)</code></dfn> method must invoke the <code
-   title=dom-selection-collapse><a href="#collapse">collapse()</a></code>
-   method with the <var title="">parentNode</var> value as the first argument
-   and 0 as the second argument, and must then invoke the <code
-   title="">selectNodeContents()</code> method on the first (and only) range
-   in the list with the <var title="">parentNode</var> value as the argument.
-
-  <p>The <dfn id=deletefromdocument
-   title=dom-selection-deleteFromDocument><code>deleteFromDocument()</code></dfn>
-   method must invoke the <code title="">deleteContents()</code> method on
-   each range in the list, if any, from first to last.
-
-  <p>The <dfn id=rangecount
-   title=dom-selection-rangeCount><code>rangeCount</code></dfn> attribute
-   must return the number of ranges in the list.
-
-  <p>The <dfn id=getrangeat
-   title=dom-selection-getRangeAt><code>getRangeAt(<var
-   title="">index</var>)</code></dfn> method must return the <var
-   title="">index</var>th range in the list. If <var title="">index</var> is
-   less than zero or greater or equal to the value returned by the <code
-   title=dom-selection-rangeCount><a href="#rangecount">rangeCount</a></code>
-   attribute, then the method must raise an <code>INDEX_SIZE_ERR</code> DOM
-   exception.
-
-  <p>The <dfn id=addrange title=dom-selection-addRange><code>addRange(<var
-   title="">range</var>)</code></dfn> method must add the given <var
-   title="">range</var> Range object to the list of selections, at the end
-   (so the newly added range is the new last range). Duplicates are not
-   prevented; a range may be added more than once in which case it appears in
-   the list more than once, which (for example) will cause <a
-   href="#stringify0" title=dom-selection-toString>stringification</a> to
-   return the range's text twice.</p>
-  <!-- XXX how does this interact with
-  deleteFromDocument() which acts on all ranges? -->
-
-  <p>The <dfn id=removerange
-   title=dom-selection-removeRange><code>removeRange(<var
-   title="">range</var>)</code></dfn> method must remove the first occurrence
-   of <var title="">range</var> in the list of ranges, if it appears at all.
-
-  <p>The <dfn id=removeallranges
-   title=dom-selection-removeAllRanges><code>removeAllRanges()</code></dfn>
-   method must remove all the ranges from the list of ranges, such that the
-   <code title=dom-selection-rangeCount><a
-   href="#rangecount">rangeCount</a></code> attribute returns 0 after the
-   <code title=dom-selection-removeAllRanges><a
-   href="#removeallranges">removeAllRanges()</a></code> method is invoked
-   (and until a new range is added to the list, either through this interface
-   or via user interaction).
-
-  <p>Objects implementing this interface must <dfn id=stringify0
-   title=dom-selection-toString>stringify</dfn> to a concatenation of the
-   results of invoking the <code title="">toString()</code> method of the
-   <code>Range</code> object on each of the ranges of the selection, in the
-   order they appear in the list (first to last).
-
-  <div class=example>
-   <p>In the following document fragment, the emphasised parts indicate the
-    selection.</p>
-
-   <pre><p>The cute girl likes <em>the </em><cite><em>Oxford English</em> Dictionary</cite>.</p></pre>
-
-   <p>If a script invoked <code
-    title="">window.getSelection().toString()</code>, the return value would
-    be "<code>the Oxford English</code>".</p>
-  </div>
-
-  <p class=note>The <code><a href="#selection1">Selection</a></code>
-   interface has no relation to the <code><a
-   href="#datagridselection">DataGridSelection</a></code> interface.
-
-  <h4 id=textFieldSelection><span class=secno>5.5.2 </span>APIs for the text
-   field selections</h4>
-
-  <p class=big-issue>When we define HTMLTextAreaElement and HTMLInputElement
-   we will have to add the IDL given below to both of their IDLs.
-
-  <p>The <code>input</code> and <code>textarea</code> elements define four
-   members in their DOM interfaces for handling their text selection:
-
-  <pre
-   class=idl>  void <a href="#select1" title="dom-textarea/input-select">select</a>();
-           attribute unsigned long <a href="#selectionstart" title="dom-textarea/input-selectionStart">selectionStart</a>;
-           attribute unsigned long <a href="#selectionend" title="dom-textarea/input-selectionEnd">selectionEnd</a>;
-  void <a href="#setselectionrange" title="dom-textarea/input-setSelectionRange">setSelectionRange</a>(in unsigned long start, in unsigned long end);</pre>
-  <!-- XXX also add textLength? it seems to be widely used -->
-
-  <p>These methods and attributes expose and control the selection of
-   <code>input</code> and <code>textarea</code> text fields.
-
-  <p>The <dfn id=select1
-   title="dom-textarea/input-select"><code>select()</code></dfn> method must
-   cause the contents of the text field to be fully selected.
-
-  <p>The <dfn id=selectionstart
-   title="dom-textarea/input-selectionStart"><code>selectionStart</code></dfn>
-   attribute must, on getting, return the offset (in logical order) to the
-   character that immediately follows the start of the selection. If there is
-   no selection, then it must return the offset (in logical order) to the
-   character that immediately follows the text entry cursor.
-
-  <p>On setting, it must act as if the <code
-   title="dom-textarea/input-setSelectionRange"><a
-   href="#setselectionrange">setSelectionRange()</a></code> method had been
-   called, with the new value as the first argument, and the current value of
-   the <code title="dom-textarea/input-selectionEnd"><a
-   href="#selectionend">selectionEnd</a></code> attribute as the second
-   argument, unless the current value of the <code
-   title="dom-textarea/input-selectionEnd"><a
-   href="#selectionend">selectionEnd</a></code> is less than the new value,
-   in which case the second argument must also be the new value.
-
-  <p>The <dfn id=selectionend
-   title="dom-textarea/input-selectionEnd"><code>selectionEnd</code></dfn>
-   attribute must, on getting, return the offset (in logical order) to the
-   character that immediately follows the end of the selection. If there is
-   no selection, then it must return the offset (in logical order) to the
-   character that immediately follows the text entry cursor.
-
-  <p>On setting, it must act as if the <code
-   title="dom-textarea/input-setSelectionRange"><a
-   href="#setselectionrange">setSelectionRange()</a></code> method had been
-   called, with the current value of the <code
-   title="dom-textarea/input-selectionStart"><a
-   href="#selectionstart">selectionStart</a></code> attribute as the first
-   argument, and new value as the second argument.
-
-  <p>The <dfn id=setselectionrange
-   title="dom-textarea/input-setSelectionRange"><code>setSelectionRange(<var
-   title="">start</var>, <var title="">end</var>)</code></dfn> method must
-   set the selection of the text field to the sequence of characters starting
-   with the character at the <var title="">start</var>th position (in logical
-   order) and ending with the character at the <span>(<var
-   title="">end</var>-1)</span>th position. Arguments greater than the length
-   of the value in the text field must be treated as pointing at the end of
-   the text field. If <var title="">end</var> is less than or equal to <var
-   title="">start</var> then the start of the selection and the end of the
-   selection must both be placed immediately before the character with offset
-   <var title="">end</var>. In UAs where there is no concept of an empty
-   selection, this must set the cursor to be just before the character with
-   offset <var title="">end</var>.
-
-  <div class=example>
-   <p>To obtain the currently selected text, the following JavaScript
-    suffices:</p>
-
-   <pre>var selectionText = control.value.substring(control.selectionStart, control.selectionEnd);</pre>
-
-   <p>...where <var title="">control</var> is the <code>input</code> or
-    <code>textarea</code> element.</p>
-  </div>
-
-  <p>Characters with no visible rendering, such as U+200D ZERO WIDTH JOINER,
-   still count as characters. Thus, for instance, the selection can include
-   just an invisible character, and the text insertion cursor can be placed
-   to one side or another of such a character.
-
-  <p>When these methods and attributes are used with <code>input</code>
-   elements that are not displaying simple text fields, they must raise an
-   <code>INVALID_STATE_ERR</code> exception.
-
-  <h3 id=command><span class=secno>5.6 </span>Command APIs</h3>
-
   <p>The <dfn id=execCommand
    title=dom-document-execCommand><code>execCommand(<var
    title="">commandId</var>, <var title="">showUI</var>, <var
@@ -39319,9 +39304,9 @@
   </ol>
 
   <p>A document is <dfn id=ready>ready for editing host commands</dfn> if it
-   has a selection that is entirely within an <a href="#editing1">editing
+   has a selection that is entirely within an <a href="#editing0">editing
    host</a>, or if it has no selection but its caret is inside an <a
-   href="#editing1">editing host</a>.
+   href="#editing0">editing host</a>.
 
   <p>The <dfn id=querycommandenabled
    title=dom-document-queryCommandEnabled><code>queryCommandEnabled(<var
@@ -39682,8 +39667,8 @@
     title=command-selectAll><code>selectAll</code></dfn>
 
    <dd><strong>Action:</strong> The user agent must change the selection so
-    that all the content in the currently focused <a href="#editing1">editing
-    host</a> is selected. If no <a href="#editing1">editing host</a> is
+    that all the content in the currently focused <a href="#editing0">editing
+    host</a> is selected. If no <a href="#editing0">editing host</a> is
     focused, then the content of the entire document must be selected.
 
    <dd><strong>Enabled When:</strong> Always.
@@ -39767,7 +39752,7 @@
     completely included in the current selection.
 
    <dd><strong>Enabled When:</strong> The document has a selection that is
-    entirely within an <a href="#editing1">editing host</a>.
+    entirely within an <a href="#editing0">editing host</a>.
 
    <dd><strong>Indeterminate When:</strong> Never.
 

Modified: source
===================================================================
--- source	2008-06-09 22:32:31 UTC (rev 1735)
+++ source	2008-06-10 21:18:18 UTC (rev 1736)
@@ -958,7 +958,7 @@
   longer defined as inheriting from <code>Document</code>.</p>
 
   <pre class="idl">interface <dfn>HTMLDocument</dfn> {
-  // <span>Resource metadata management</span>
+  // <span>resource metadata management</span>
   [PutForwards=href] readonly attribute <span>Location</span> <span title="dom-document-location">location</span>;
   readonly attribute DOMString <span title="dom-document-URL">URL</span>;
            attribute DOMString <span title="dom-document-domain">domain</span>;
@@ -985,7 +985,7 @@
   NodeList <span title="dom-document-getElementsByName">getElementsByName</span>(in DOMString elementName);
   NodeList <span title="dom-document-getElementsByClassName">getElementsByClassName</span>(in DOMString classNames);
 
-  // <span>Dynamic markup insertion</span>
+  // <span>dynamic markup insertion</span>
            attribute DOMString <span title="dom-innerHTML">innerHTML</span>;
   <span>HTMLDocument</span> <span title="dom-document-open">open</span>();
   <span>HTMLDocument</span> <span title="dom-document-open">open</span>(in DOMString type);
@@ -996,14 +996,10 @@
   void <span title="dom-document-write">write</span>(in DOMString text);
   void <span title="dom-document-writeln">writeln</span>(in DOMString text);
 
-  // <span>Interaction</span>
+  // <span>user interaction</span>
+  <span>Selection</span> <span title="dom-document-getSelection">getSelection</span>();
   readonly attribute <span>Element</span> <span title="dom-document-activeElement">activeElement</span>;
   boolean <span title="dom-document-hasFocus">hasFocus</span>();
-
-  // <span title="concept-command">Commands</span>
-  readonly attribute <span>HTMLCollection</span> <span title="dom-document-commands">commands</span>;
-
-  // <span>Editing</span>
            attribute boolean <span title="dom-document-designMode">designMode</span>;
   boolean <span title="dom-document-execCommand">execCommand</span>(in DOMString commandId);
   boolean <span title="dom-document-execCommand">execCommand</span>(in DOMString commandId, in boolean showUI);
@@ -1013,7 +1009,7 @@
   boolean <span title="dom-document-queryCommandState">queryCommandState</span>(in DOMString commandId);
   boolean <span title="dom-document-queryCommandSupported">queryCommandSupported</span>(in DOMString commandId);
   DOMString <span title="dom-document-queryCommandValue">queryCommandValue</span>(in DOMString commandId);
-  <span>Selection</span> <span title="dom-document-getSelection">getSelection</span>();
+  readonly attribute <span>HTMLCollection</span> <span title="dom-document-commands">commands</span>;
 };</pre>
 
   <p>Since the <code>HTMLDocument</code> interface holds methods and
@@ -1247,22 +1243,18 @@
   readonly attribute <span>DOMTokenList</span> <span title="dom-classList">classList</span>;
   readonly attribute <span>DOMStringMap</span> <span title="dom-dataset">dataset</span>;
 
-  // <span>interaction</span>
+  // <span>user interaction</span>
            attribute boolean <span title="dom-irrelevant">irrelevant</span>;
-           attribute long <span title="dom-tabindex">tabIndex</span>;
   void <span title="dom-click">click</span>();
-  void <span title="dom-focus">focus</span>();
-  void <span title="dom-blur">blur</span>();
   void <span title="dom-scrollIntoView">scrollIntoView</span>();
   void <span title="dom-scrollIntoView">scrollIntoView</span>(in boolean top);
-
-  // <span title="concept-command">commands</span>
-           attribute <span>HTMLMenuElement</span> <span title="dom-contextMenu">contextMenu</span>;
-
-  // <span>editing</span>
+           attribute long <span title="dom-tabindex">tabIndex</span>;
+  void <span title="dom-focus">focus</span>();
+  void <span title="dom-blur">blur</span>();
            attribute boolean <span title="dom-draggable">draggable</span>;
            attribute DOMString <span title="dom-contentEditable">contentEditable</span>;
   readonly attribute DOMString <span title="dom-isContentEditable">isContentEditable</span>;
+           attribute <span>HTMLMenuElement</span> <span title="dom-contextMenu">contextMenu</span>;
 
   // <span>styling</span>
   readonly attribute <span>CSSStyleDeclaration</span> <span title="dom-style">style</span>;
@@ -5488,63 +5480,7 @@
   title="attr-class">class</code> content attribute.</p>
 
 
-  <h4>The <dfn title="attr-irrelevant"><code>irrelevant</code></dfn> attribute</h4>
 
-  <p>All elements may have the <code
-  title="attr-irrelevant">irrelevant</code> content attribute
-  set. The <code title="attr-irrelevant">irrelevant</code> attribute
-  is a <span>boolean attribute</span>. When specified on an element,
-  it indicates that the element is not yet, or is no longer,
-  relevant. User agents should not render elements that have the <code
-  title="attr-irrelevant">irrelevant</code> attribute specified.</p>
-
-  <div class="example">
-
-   <p>In the following skeletal example, the attribute is used to hide
-   the Web game's main screen until the user logs in:</p>
-
-   <pre>  <h1>The Example Game</h1>
-  <section id="login">
-   <h2>Login</h2>
-   <form>
-    ...
-    <!-- calls login() once the user's credentials have been checked -->
-   </form>
-   <script>
-    function login() {
-      // switch screens
-      document.getElementById('login').irrelevant = true;
-      document.getElementById('game').irrelevant = false;
-    }
-   </script>
-  </section>
-  <section id="game" irrelevant>
-   ...
-  </section></pre>
-
-  </div>
-
-
-  <p>The <code title="attr-irrelevant">irrelevant</code> attribute
-  must not be used to hide content that could legitimately be shown in
-  another presentation. For example, it is incorrect to use <code
-  title="attr-irrelevant">irrelevant</code> to hide panels in a
-  tabbed dialog, because the tabbed interface is merely a kind of
-  overflow presentation — showing all the form controls in one
-  big page with a scrollbar would be equivalent, and no less
-  correct.</p>
-
-  <p>Elements in a section hidden by the <code
-  title="attr-irrelevant">irrelevant</code> attribute are still
-  active, e.g. scripts and form controls in such sections still render
-  execute and submit respectively. Only their presentation to the user
-  changes.</p>
-
-  <p>The <dfn title="dom-irrelevant"><code>irrelevant</code></dfn> DOM
-  attribute must <span>reflect</span> the content attribute of the
-  same name.</p>
-
-
   <h4>The <dfn title="attr-style"><code>style</code></dfn> attribute</h4>
 
   <p>All elements may have the <code title="attr-style">style</code>
@@ -5708,365 +5644,8 @@
 
 
 
-  <h3><dfn>Interaction</dfn></h3>
 
 
-  <h4>Activation</h4>
-
-  <p>The <dfn title="dom-click">click()</dfn> method must <span>fire a
-  <code>click</code> event</span> at the element, whose default action
-  is the <span title="fire a DOMActivate event">firing of a further
-  <code title="event-DOMActivate">DOMActivate</code> event</span> at
-  the same element, whose own default action is to go through all the
-  elements the <code title="event-DOMActivate">DOMActivate</code>
-  event bubbled through (starting at the target node and going towards
-  the <code>Document</code> node), looking for an element with an
-  <span>activation behavior</span>; the first element, in reverse tree
-  order, to have one, must have its activation behavior executed.</p>
-
-
-
-  <h4>Focus</h4>
-
-  <!-- http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%20%0A...%3Cform%3E%3Cinput%20name%3Da%20onfocus%3D%22value%2B%3D1%3Bd.name%3D%27a%27%3Bname%3D%27d%27%3Bb.focus()%22%3E%0A%3Cinput%20name%3Db%20onfocus%3D%22value%2B%3D1%3Bc.focus()%22%3E%0A%3Cinput%20name%3Dc%20onfocus%3D%22value%2B%3D1%3Bd.focus()%22%3E%0A%3Cinput%20name%3Dd%20onfocus%3D%22value%2B%3D1%3Ba.focus()%22%3E -->
-
-  <!-- http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%0A...%3Cform%3E%0A%3Ctextarea%20name%3Dt%20cols%3D100%20rows%3D3%3E%3C%2Ftextarea%3E%3Cp%3E%0A%3Cinput%20name%3Da%20onfocus%3D%22t.value%2B%3D%27af1%20%27%3Bb.focus()%3Balert(document.activeElement.name)%3Bt.value%2B%3D%27af2%20%27%3B%22%20onblur%3D%22t.value%2B%3D%27ab%20%27%3B%22%3E%0A%3Cinput%20name%3Db%20onfocus%3D%22t.value%2B%3D%27bf1%20%27%3Bc.focus()%3Bt.value%2B%3D%27bf2%20%27%3B%22%20onblur%3D%22t.value%2B%3D%27bb%20%27%3B%22%3E%0A%3Cinput%20name%3Dc%20onfocus%3D%22t.value%2B%3D%27cf1%20%27%3Bc.focus()%3Bt.value%2B%3D%27cf2%20%27%3B%22%20onblur%3D%22t.value%2B%3D%27cb%20%27%3B%22%3E%0A -->
-
-  <!-- http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%3Cbody%20onload%3D%22document.forms%5B0%5D.a.focus()%22%3E%0A...%3Cform%3E%0A%3Ctextarea%20name%3Dt%20cols%3D100%20rows%3D3%3E%3C%2Ftextarea%3E%3Cp%3E%0A%3Cinput%20name%3Da%20onblur%3D%22t.value%2B%3D'ab%20'%3B%20b.focus()%3B%22%3E%0A%3Cinput%20name%3Db%20onfocus%3D%22t.value%2B%3D'bf1%20'%3Ba.focus()%3Bt.value%2B%3D'bf2%20'%3B%22%20onblur%3D%22t.value%2B%3D'bb%20'%3B%22%3E -->
-
-  <!-- http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%3Cbody%3E...%3Cform%3E%0A%3Ctextarea%20name%3Dt%20cols%3D100%20rows%3D3%3E%3C%2Ftextarea%3E%3Cp%3E%0A%3Cinput%20name%3Da%20onfocus%3D%22t.value%2B%3D%27af%20%27%3B%22%20onblur%3D%22t.value%2B%3D%27ab1%20%27%3Bb.focus()%3Bt.value%2B%3D%27ab2%20%27%3B%22%3E%0A%3Cinput%20name%3Db%20onfocus%3D%22t.value%2B%3D%27bf1%20%27%3Ba.focus()%3Bt.value%2B%3D%27bf2%20%27%3B%22%20onblur%3D%22t.value%2B%3D%27bb%20%27%3B%22%3E -->
-
-  <p>When an element is <em>focused</em>, key events received by the
-  document must be targeted at that element. There may be no element
-  focused; when no element is focused, key events received by the
-  document must be targetted at <span>the <code>body</code>
-  element</span>.</p>
-
-  <p>User agents may track focus for each <span>browsing
-  context</span> or <code>Document</code> individually, or may support
-  only one focused elment per <span>top-level browsing context</span>
-  — user agents should follow platform conventions in this
-  regard.</p>
-
-  <p>Which element(s) within a <span>top-level browsing context</span>
-  currently has focus must be independent of whether or not the
-  <span>top-level browsing context</span> itself has the <em>system
-  focus</em>.</p>
-
-
-  <h5 id="focus-management">Focus management</h5>
-
-  <p>The <dfn>focusing steps</dfn> are as follows:</p>
-
-  <ol>
-
-   <li><p>If focusing the element will remove the focus from another
-   element, then run the <span>unfocusing steps</span> for that
-   element.</p></li>
-
-   <li>
-
-    <p>Make the element the currently focused element in its
-    <span>top-level browsing context</span>.</p>
-
-    <p>Some elements, most notably <code>area</code>, can correspond
-    to more than one distinct focusable area. If a particular area was
-    indicated when the element was focused, then that is the area that
-    must get focus; otherwise, e.g. when using the <code
-    title="dom-focus">focus()</code> method, the first such region in
-    tree order is the one that must be focused.</p>
-
-   </li>
-
-   <li><p><span>Fire a simple event</span> that doesn't bubble called
-   <code title="event-focus">focus</code> at the element.</p></li>
-
-  </ol>
-
-  <p>User agents must run the <span>focusing steps</span> for an
-  element whenever the user moves the focus to a
-  <span>focusable</span> element.</p>
-
-  <p>The <dfn>unfocusing steps</dfn> are as follows:</p>
-
-  <ol>
-
-   <!-- XXX onchange event for input controls -->
-
-   <li><p>Unfocus the element.</p></li>
-
-   <li><p><span>Fire a simple event</span> that doesn't bubble called
-   <code title="event-blur">blur</code> at the element.</p></li>
-
-  </ol>
-
-  <p>User agents should run the <span>unfocusing steps</span> for an
-  element whenever the user moves the focus away from any
-  <span>focusable</span> element.</p>
-
-  <hr>
-
-  <p>The <dfn title="dom-focus"><code>focus()</code></dfn> method,
-  when invoked, must run the following algorithm:</p>
-
-  <ol>
-
-   <li><p>If the element is marked as <i>locked for focus</i>, then abort
-   these steps.</p></li>
-
-   <li><p>If the element is not <span>focusable</span>, then abort these
-   steps.</p></li>
-
-   <li><p>Mark the element as <dfn>locked for focus</dfn>.</p></li>
-
-   <li><p>If the element is not already focused, run the <span>focusing
-   steps</span> for the element.</p></li>
-
-   <li><p>Unmark the element as <i>locked for focus</i>.</p></li>
-
-  </ol>
-
-  <p>The <dfn title="dom-blur"><code>blur()</code></dfn> method, when
-  invoked, should run the <span>unfocusing steps</span> for the
-  element. User agents may selectively or uniformly ignore calls to
-  this method for usability reasons.</p>
-
-
-
-  <!-- XXX define onfocus/onblur behaviour for Window -->
-
-
-  <hr>
-
-
-  <p>The <dfn
-  title="dom-document-activeElement"><code>activeElement</code></dfn>
-  attribute must return the element in the document that is
-  focused. If no element in the <code>Document</code> is focused, this
-  must return <span>the <code>body</code> element</span>.</p>
-
-  <p>The <dfn
-  title="dom-document-hasFocus"><code>hasFocus()</code></dfn> method
-  must return true if the document, one of its nested <span
-  title="browsing context">browsing contexts</span>, or any element in
-  the document or its browsing contexts currently has the system
-  focus.</p>
-
-
-  <h5>Sequential focus navigation</h5>
-
-  <p>The <dfn title="attr-tabindex"><code>tabindex</code></dfn>
-  content attribute specifies whether the element is focusable,
-  whether it can be reached using sequential focus navigation, and the
-  relative order of the element for the purposes of sequential focus
-  navigation. The name "tab index" comes from the common use of the
-  "tab" key to navigate through the focusable elements. The term
-  "tabbing" refers to moving forward through the focusable elements
-  that can be reached using sequential focus navigation.</p>
-
-  <p>The <code title="attr-tabindex">tabindex</code> attribute, if
-  specified, must have a value that is a <span>valid
-  integer</span>.</p>
-
-  <p>If the attribute is specified, it must be parsed using the
-  <span>rules for parsing integers</span>. The attribute's values have
-  the following meanings:</p>
-
-  <dl>
-
-   <dt>If the attribute is omitted or parsing the value returns an
-   error</dt>
-
-   <dd>
-
-    <p>The user agent should follow platform conventions to determine if
-    the element is to be focusable and, if so, whether the element can
-    be reached using sequential focus navigation, and if so, what its
-    relative order should be.</p>
-
-   </dd>
-
-   <dt id="negative-tabindex">If the value is a negative integer</dt>
-
-   <dd>
-
-    <p>The user agent must allow the element to be focused, but should
-    not allow the element to be reached using sequential focus
-    navigation.</p>
-
-   </dd>
-
-   <dt>If the value is a zero</dt>
-
-   <dd>
-
-    <p>The user agent must allow the element to be focused, should
-    allow the element to be reached using sequential focus navigation,
-    and should follow platform conventions to determine the element's
-    relative order.</p>
-
-   </dd>
-
-   <dt>If the value is greater than zero</dt>
-
-   <dd>
-
-    <p>The user agent must allow the element to be focused, should
-    allow the element to be reached using sequential focus navigation,
-    and should place the element in the sequential focus navigation
-    order so that it is:</p>
-
-    <ul>
-
-     <li>before any focusable element whose <code
-     title="attr-tabindex">tabindex</code> attribute has been
-     omitted or whose value, when parsed, returns an error,</li>
-
-     <li>before any focusable element whose <code
-     title="attr-tabindex">tabindex</code> attribute has a value equal
-     to or less than zero,</li>
-
-     <li>after any element whose <code
-     title="attr-tabindex">tabindex</code> attribute has a value
-     greater than zero but less than the value of the <code
-     title="attr-tabindex">tabindex</code> attribute on the
-     element,</li>
-
-     <li>after any element whose <code
-     title="attr-tabindex">tabindex</code> attribute has a value equal
-     to the value of the <code title="attr-tabindex">tabindex</code>
-     attribute on the element but that is earlier in the document in
-     <span>tree order</span> than the element,</li>
-
-     <li>before any element whose <code
-     title="attr-tabindex">tabindex</code> attribute has a value equal
-     to the value of the <code title="attr-tabindex">tabindex</code>
-     attribute on the element but that is later in the document in
-     <span>tree order</span> than the element, and</li>
-
-     <li>before any element whose <code
-     title="attr-tabindex">tabindex</code> attribute has a value
-     greater than the value of the <code
-     title="attr-tabindex">tabindex</code> attribute on the
-     element.</li>
-
-    </ul>
-
-   </dd>
-
-  </dl>
-
-  <p>An element is <dfn>focusable</dfn> if the <code
-  title="attr-tabindex">tabindex</code> attribute's definition above
-  defines the element to be focusable <em>and</em> the element is
-  <span>being rendered</span><!-- XXX xref, define display:none as not
-  being rendered, off-screen as being rendered? -->.</p>
-
-  <p>When an element is focused, the element matches the CSS
-  <code>:focus</code> pseudo-class and key events are dispatched on
-  that element in response to keyboard input.</p>
-
-  <p>The <dfn title="dom-tabIndex"><code>tabIndex</code></dfn> DOM
-  attribute must <span>reflect</span> the value of the <code
-  title="attr-tabIndex">tabIndex</code> content attribute. If the
-  attribute is not present, or parsing its value returns an error,
-  then the DOM attribute must return 0 for elements that are focusable
-  and &#x2212;1 for elements that are not focusable.</p>
-
-
-<!--XXX
-  <h5>The <dfn><code>DocumentFocus</code></dfn> interface</h5>
-
-  <p>The <code>DocumentFocus</code> interface contains methods for
-  moving focus around the document. It can be obtained from objects
-  that implement the <code>Document</code> interface using
-  binding-specific casting methods.</p>
-
-  <p class="big-issue">Actually even better would be to just mix it
-  straight into those interfaces somehow.</p>
-
-  <pre class="idl">[NoInterfaceObject] interface <dfn>DocumentFocus</dfn> {
-  void moveFocusForward();
-  void moveFocusBackward();
-  void moveFocusUp();
-  void moveFocusRight();
-  void moveFocusDown();
-  void moveFocusLeft();
-};</pre>
-
-  <p>The <dfn><code>currentFocus</code></dfn> attribute returns the
-  element to which key events will be sent when the document receives
-  key events.</p>
-
-  <p>The <dfn><code>moveFocusForward</code></dfn> method uses the
-  <code>'nav-index'</code> property and the <code
-  title="attr-tabindex">tabindex</code> attribute to find the next
-  focusable element and focuses it.</p>
-
-  <p>The <dfn><code>moveFocusBackward</code></dfn> method uses the
-  <code>'nav-index'</code> property and the <code
-  title="attr-tabindex>tabindex</code> attribute to find the previous
-  focusable element and focuses it.</p>
-
-  <p>The <dfn><code>moveFocusUp</code></dfn> method uses the
-  <code>'nav-up'</code> property and the <code
-  title="attr-tabindex>tabindex</code> attribute to find an
-  appropriate focusable element and focuses it.</p>
-
-  <p>In a similar manner, the <dfn><code>moveFocusRight</code></dfn>,
-  <dfn><code>moveFocusDown</code></dfn>, and
-  <dfn><code>moveFocusLeft</code></dfn> methods use the
-  <code>'nav-right'</code>, <code>'nav-down'</code>, and
-  <code>'nav-left'</code> properties (respectively), and the <code
-  title="attr-tabindex>tabindex</code> attribute, to find an
-  appropriate focusable element and focus it.</p>
-
-  <p>The <code>'nav-index'</code>, <code>'nav-up'</code>,
-  <code>'nav-right'</code>, <code>'nav-down'</code>, and
-  <code>'nav-left'</code> properties are defined in <a
-  href="#refsCSS3UI">[CSS3UI]</a>.</p>
-
-Other things to look at are IE's focus APIs (document.activeElement,
-document.hasFocus, HTMLElement.setActive(), onBeforeActivate,
-onActivate, onBeforeDeactivate, onDeactivate, document.hasFocus):
-   https://bugzilla.mozilla.org/show_bug.cgi?id=296471
-   https://bugzilla.mozilla.org/show_bug.cgi?id=296469
-   http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/activeelement.asp
-   http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/setactive.asp
-   http://msdn.microsoft.com/workshop/author/dhtml/reference/events/onbeforeactivate.asp
-   http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/focus.asp
--->
-
-
-  <h4>Scrolling elements into view</h4>
-
-  <p>The <dfn title="dom-scrollIntoView"><code>scrollIntoView([<var
-  title="">top</var>])</code></dfn> method, when called, must cause
-  the element on which the method was called to have the attention of
-  the user called to it.</p>
-
-  <p class="note">In a speech browser, this could happen by having the
-  current playback position move to the start of the given
-  element.</p>
-
-  <p>In visual user agents, if the argument is present and has the
-  value false, the user agent should scroll the element into view such
-  that both the bottom and the top of the element are in the viewport,
-  with the bottom of the element aligned with the bottom of the
-  viewport. If it isn't possible to show the entire element in that
-  way, or if the argument is omitted or is true, then the user agent
-  should instead align the top of the element with the top of the
-  viewport. Visual user agents should further scroll horizontally as
-  necessary to bring the element to the attention of the user.</p>
-
-  <p>Non-visual user agents may ignore the argument, or may treat it
-  in some media-specific manner most useful to the user.</p>
-
-  <!-- XXX maybe this should move to CSSOM -->
-
-
-
-
   <h3>The root element</h3>
 
   <h4>The <dfn><code>html</code></dfn> element</h4>
@@ -34910,7 +34489,7 @@
 
 
 
-  <h2 id="editing"><dfn>Editing</dfn></h2>
+  <h2 id="editing"><dfn>User Interaction</dfn></h2>
 
   <p>This section describes various features that allow authors to
   enable users to edit documents and parts of documents
@@ -34924,6 +34503,774 @@
   work together.</p>
 
 
+
+  <h3>The <dfn title="attr-irrelevant"><code>irrelevant</code></dfn> attribute</h3>
+
+  <p>All elements may have the <code
+  title="attr-irrelevant">irrelevant</code> content attribute
+  set. The <code title="attr-irrelevant">irrelevant</code> attribute
+  is a <span>boolean attribute</span>. When specified on an element,
+  it indicates that the element is not yet, or is no longer,
+  relevant. User agents should not render elements that have the <code
+  title="attr-irrelevant">irrelevant</code> attribute specified.</p>
+
+  <div class="example">
+
+   <p>In the following skeletal example, the attribute is used to hide
+   the Web game's main screen until the user logs in:</p>
+
+   <pre>  <h1>The Example Game</h1>
+  <section id="login">
+   <h2>Login</h2>
+   <form>
+    ...
+    <!-- calls login() once the user's credentials have been checked -->
+   </form>
+   <script>
+    function login() {
+      // switch screens
+      document.getElementById('login').irrelevant = true;
+      document.getElementById('game').irrelevant = false;
+    }
+   </script>
+  </section>
+  <section id="game" irrelevant>
+   ...
+  </section></pre>
+
+  </div>
+
+
+  <p>The <code title="attr-irrelevant">irrelevant</code> attribute
+  must not be used to hide content that could legitimately be shown in
+  another presentation. For example, it is incorrect to use <code
+  title="attr-irrelevant">irrelevant</code> to hide panels in a
+  tabbed dialog, because the tabbed interface is merely a kind of
+  overflow presentation — showing all the form controls in one
+  big page with a scrollbar would be equivalent, and no less
+  correct.</p>
+
+  <p>Elements in a section hidden by the <code
+  title="attr-irrelevant">irrelevant</code> attribute are still
+  active, e.g. scripts and form controls in such sections still render
+  execute and submit respectively. Only their presentation to the user
+  changes.</p>
+
+  <p>The <dfn title="dom-irrelevant"><code>irrelevant</code></dfn> DOM
+  attribute must <span>reflect</span> the content attribute of the
+  same name.</p>
+
+
+
+  <h3>Activation</h3>
+
+  <p>The <dfn title="dom-click">click()</dfn> method must <span>fire a
+  <code>click</code> event</span> at the element, whose default action
+  is the <span title="fire a DOMActivate event">firing of a further
+  <code title="event-DOMActivate">DOMActivate</code> event</span> at
+  the same element, whose own default action is to go through all the
+  elements the <code title="event-DOMActivate">DOMActivate</code>
+  event bubbled through (starting at the target node and going towards
+  the <code>Document</code> node), looking for an element with an
+  <span>activation behavior</span>; the first element, in reverse tree
+  order, to have one, must have its activation behavior executed.</p>
+
+
+
+  <h3>Scrolling elements into view</h3>
+
+  <p>The <dfn title="dom-scrollIntoView"><code>scrollIntoView([<var
+  title="">top</var>])</code></dfn> method, when called, must cause
+  the element on which the method was called to have the attention of
+  the user called to it.</p>
+
+  <p class="note">In a speech browser, this could happen by having the
+  current playback position move to the start of the given
+  element.</p>
+
+  <p>In visual user agents, if the argument is present and has the
+  value false, the user agent should scroll the element into view such
+  that both the bottom and the top of the element are in the viewport,
+  with the bottom of the element aligned with the bottom of the
+  viewport. If it isn't possible to show the entire element in that
+  way, or if the argument is omitted or is true, then the user agent
+  should instead align the top of the element with the top of the
+  viewport. Visual user agents should further scroll horizontally as
+  necessary to bring the element to the attention of the user.</p>
+
+  <p>Non-visual user agents may ignore the argument, or may treat it
+  in some media-specific manner most useful to the user.</p>
+
+  <!-- XXX maybe this should move to CSSOM -->
+
+
+  <h3>Focus</h3>
+
+  <!-- http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%20%0A...%3Cform%3E%3Cinput%20name%3Da%20onfocus%3D%22value%2B%3D1%3Bd.name%3D%27a%27%3Bname%3D%27d%27%3Bb.focus()%22%3E%0A%3Cinput%20name%3Db%20onfocus%3D%22value%2B%3D1%3Bc.focus()%22%3E%0A%3Cinput%20name%3Dc%20onfocus%3D%22value%2B%3D1%3Bd.focus()%22%3E%0A%3Cinput%20name%3Dd%20onfocus%3D%22value%2B%3D1%3Ba.focus()%22%3E -->
+
+  <!-- http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%0A...%3Cform%3E%0A%3Ctextarea%20name%3Dt%20cols%3D100%20rows%3D3%3E%3C%2Ftextarea%3E%3Cp%3E%0A%3Cinput%20name%3Da%20onfocus%3D%22t.value%2B%3D%27af1%20%27%3Bb.focus()%3Balert(document.activeElement.name)%3Bt.value%2B%3D%27af2%20%27%3B%22%20onblur%3D%22t.value%2B%3D%27ab%20%27%3B%22%3E%0A%3Cinput%20name%3Db%20onfocus%3D%22t.value%2B%3D%27bf1%20%27%3Bc.focus()%3Bt.value%2B%3D%27bf2%20%27%3B%22%20onblur%3D%22t.value%2B%3D%27bb%20%27%3B%22%3E%0A%3Cinput%20name%3Dc%20onfocus%3D%22t.value%2B%3D%27cf1%20%27%3Bc.focus()%3Bt.value%2B%3D%27cf2%20%27%3B%22%20onblur%3D%22t.value%2B%3D%27cb%20%27%3B%22%3E%0A -->
+
+  <!-- http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%3Cbody%20onload%3D%22document.forms%5B0%5D.a.focus()%22%3E%0A...%3Cform%3E%0A%3Ctextarea%20name%3Dt%20cols%3D100%20rows%3D3%3E%3C%2Ftextarea%3E%3Cp%3E%0A%3Cinput%20name%3Da%20onblur%3D%22t.value%2B%3D'ab%20'%3B%20b.focus()%3B%22%3E%0A%3Cinput%20name%3Db%20onfocus%3D%22t.value%2B%3D'bf1%20'%3Ba.focus()%3Bt.value%2B%3D'bf2%20'%3B%22%20onblur%3D%22t.value%2B%3D'bb%20'%3B%22%3E -->
+
+  <!-- http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%3Cbody%3E...%3Cform%3E%0A%3Ctextarea%20name%3Dt%20cols%3D100%20rows%3D3%3E%3C%2Ftextarea%3E%3Cp%3E%0A%3Cinput%20name%3Da%20onfocus%3D%22t.value%2B%3D%27af%20%27%3B%22%20onblur%3D%22t.value%2B%3D%27ab1%20%27%3Bb.focus()%3Bt.value%2B%3D%27ab2%20%27%3B%22%3E%0A%3Cinput%20name%3Db%20onfocus%3D%22t.value%2B%3D%27bf1%20%27%3Ba.focus()%3Bt.value%2B%3D%27bf2%20%27%3B%22%20onblur%3D%22t.value%2B%3D%27bb%20%27%3B%22%3E -->
+
+  <p>When an element is <em>focused</em>, key events received by the
+  document must be targeted at that element. There may be no element
+  focused; when no element is focused, key events received by the
+  document must be targetted at <span>the <code>body</code>
+  element</span>.</p>
+
+  <p>User agents may track focus for each <span>browsing
+  context</span> or <code>Document</code> individually, or may support
+  only one focused elment per <span>top-level browsing context</span>
+  — user agents should follow platform conventions in this
+  regard.</p>
+
+  <p>Which element(s) within a <span>top-level browsing context</span>
+  currently has focus must be independent of whether or not the
+  <span>top-level browsing context</span> itself has the <em>system
+  focus</em>.</p>
+
+
+  <h4 id="focus-management">Focus management</h4>
+
+  <p>The <dfn>focusing steps</dfn> are as follows:</p>
+
+  <ol>
+
+   <li><p>If focusing the element will remove the focus from another
+   element, then run the <span>unfocusing steps</span> for that
+   element.</p></li>
+
+   <li>
+
+    <p>Make the element the currently focused element in its
+    <span>top-level browsing context</span>.</p>
+
+    <p>Some elements, most notably <code>area</code>, can correspond
+    to more than one distinct focusable area. If a particular area was
+    indicated when the element was focused, then that is the area that
+    must get focus; otherwise, e.g. when using the <code
+    title="dom-focus">focus()</code> method, the first such region in
+    tree order is the one that must be focused.</p>
+
+   </li>
+
+   <li><p><span>Fire a simple event</span> that doesn't bubble called
+   <code title="event-focus">focus</code> at the element.</p></li>
+
+  </ol>
+
+  <p>User agents must run the <span>focusing steps</span> for an
+  element whenever the user moves the focus to a
+  <span>focusable</span> element.</p>
+
+  <p>The <dfn>unfocusing steps</dfn> are as follows:</p>
+
+  <ol>
+
+   <!-- XXX onchange event for input controls -->
+
+   <li><p>Unfocus the element.</p></li>
+
+   <li><p><span>Fire a simple event</span> that doesn't bubble called
+   <code title="event-blur">blur</code> at the element.</p></li>
+
+  </ol>
+
+  <p>User agents should run the <span>unfocusing steps</span> for an
+  element whenever the user moves the focus away from any
+  <span>focusable</span> element.</p>
+
+  <hr>
+
+  <p>The <dfn title="dom-focus"><code>focus()</code></dfn> method,
+  when invoked, must run the following algorithm:</p>
+
+  <ol>
+
+   <li><p>If the element is marked as <i>locked for focus</i>, then abort
+   these steps.</p></li>
+
+   <li><p>If the element is not <span>focusable</span>, then abort these
+   steps.</p></li>
+
+   <li><p>Mark the element as <dfn>locked for focus</dfn>.</p></li>
+
+   <li><p>If the element is not already focused, run the <span>focusing
+   steps</span> for the element.</p></li>
+
+   <li><p>Unmark the element as <i>locked for focus</i>.</p></li>
+
+  </ol>
+
+  <p>The <dfn title="dom-blur"><code>blur()</code></dfn> method, when
+  invoked, should run the <span>unfocusing steps</span> for the
+  element. User agents may selectively or uniformly ignore calls to
+  this method for usability reasons.</p>
+
+
+
+  <!-- XXX define onfocus/onblur behaviour for Window -->
+
+
+  <hr>
+
+
+  <p>The <dfn
+  title="dom-document-activeElement"><code>activeElement</code></dfn>
+  attribute must return the element in the document that is
+  focused. If no element in the <code>Document</code> is focused, this
+  must return <span>the <code>body</code> element</span>.</p>
+
+  <p>The <dfn
+  title="dom-document-hasFocus"><code>hasFocus()</code></dfn> method
+  must return true if the document, one of its nested <span
+  title="browsing context">browsing contexts</span>, or any element in
+  the document or its browsing contexts currently has the system
+  focus.</p>
+
+
+  <h4>Sequential focus navigation</h4>
+
+  <p>The <dfn title="attr-tabindex"><code>tabindex</code></dfn>
+  content attribute specifies whether the element is focusable,
+  whether it can be reached using sequential focus navigation, and the
+  relative order of the element for the purposes of sequential focus
+  navigation. The name "tab index" comes from the common use of the
+  "tab" key to navigate through the focusable elements. The term
+  "tabbing" refers to moving forward through the focusable elements
+  that can be reached using sequential focus navigation.</p>
+
+  <p>The <code title="attr-tabindex">tabindex</code> attribute, if
+  specified, must have a value that is a <span>valid
+  integer</span>.</p>
+
+  <p>If the attribute is specified, it must be parsed using the
+  <span>rules for parsing integers</span>. The attribute's values have
+  the following meanings:</p>
+
+  <dl>
+
+   <dt>If the attribute is omitted or parsing the value returns an
+   error</dt>
+
+   <dd>
+
+    <p>The user agent should follow platform conventions to determine if
+    the element is to be focusable and, if so, whether the element can
+    be reached using sequential focus navigation, and if so, what its
+    relative order should be.</p>
+
+   </dd>
+
+   <dt id="negative-tabindex">If the value is a negative integer</dt>
+
+   <dd>
+
+    <p>The user agent must allow the element to be focused, but should
+    not allow the element to be reached using sequential focus
+    navigation.</p>
+
+   </dd>
+
+   <dt>If the value is a zero</dt>
+
+   <dd>
+
+    <p>The user agent must allow the element to be focused, should
+    allow the element to be reached using sequential focus navigation,
+    and should follow platform conventions to determine the element's
+    relative order.</p>
+
+   </dd>
+
+   <dt>If the value is greater than zero</dt>
+
+   <dd>
+
+    <p>The user agent must allow the element to be focused, should
+    allow the element to be reached using sequential focus navigation,
+    and should place the element in the sequential focus navigation
+    order so that it is:</p>
+
+    <ul>
+
+     <li>before any focusable element whose <code
+     title="attr-tabindex">tabindex</code> attribute has been
+     omitted or whose value, when parsed, returns an error,</li>
+
+     <li>before any focusable element whose <code
+     title="attr-tabindex">tabindex</code> attribute has a value equal
+     to or less than zero,</li>
+
+     <li>after any element whose <code
+     title="attr-tabindex">tabindex</code> attribute has a value
+     greater than zero but less than the value of the <code
+     title="attr-tabindex">tabindex</code> attribute on the
+     element,</li>
+
+     <li>after any element whose <code
+     title="attr-tabindex">tabindex</code> attribute has a value equal
+     to the value of the <code title="attr-tabindex">tabindex</code>
+     attribute on the element but that is earlier in the document in
+     <span>tree order</span> than the element,</li>
+
+     <li>before any element whose <code
+     title="attr-tabindex">tabindex</code> attribute has a value equal
+     to the value of the <code title="attr-tabindex">tabindex</code>
+     attribute on the element but that is later in the document in
+     <span>tree order</span> than the element, and</li>
+
+     <li>before any element whose <code
+     title="attr-tabindex">tabindex</code> attribute has a value
+     greater than the value of the <code
+     title="attr-tabindex">tabindex</code> attribute on the
+     element.</li>
+
+    </ul>
+
+   </dd>
+
+  </dl>
+
+  <p>An element is <dfn>focusable</dfn> if the <code
+  title="attr-tabindex">tabindex</code> attribute's definition above
+  defines the element to be focusable <em>and</em> the element is
+  <span>being rendered</span><!-- XXX xref, define display:none as not
+  being rendered, off-screen as being rendered? -->.</p>
+
+  <p>When an element is focused, the element matches the CSS
+  <code>:focus</code> pseudo-class and key events are dispatched on
+  that element in response to keyboard input.</p>
+
+  <p>The <dfn title="dom-tabIndex"><code>tabIndex</code></dfn> DOM
+  attribute must <span>reflect</span> the value of the <code
+  title="attr-tabIndex">tabIndex</code> content attribute. If the
+  attribute is not present, or parsing its value returns an error,
+  then the DOM attribute must return 0 for elements that are focusable
+  and &#x2212;1 for elements that are not focusable.</p>
+
+
+<!--XXX
+  <h4>The <dfn><code>DocumentFocus</code></dfn> interface</h4>
+
+  <p>The <code>DocumentFocus</code> interface contains methods for
+  moving focus around the document. It can be obtained from objects
+  that implement the <code>Document</code> interface using
+  binding-specific casting methods.</p>
+
+  <p class="big-issue">Actually even better would be to just mix it
+  straight into those interfaces somehow.</p>
+
+  <pre class="idl">[NoInterfaceObject] interface <dfn>DocumentFocus</dfn> {
+  void moveFocusForward();
+  void moveFocusBackward();
+  void moveFocusUp();
+  void moveFocusRight();
+  void moveFocusDown();
+  void moveFocusLeft();
+};</pre>
+
+  <p>The <dfn><code>currentFocus</code></dfn> attribute returns the
+  element to which key events will be sent when the document receives
+  key events.</p>
+
+  <p>The <dfn><code>moveFocusForward</code></dfn> method uses the
+  <code>'nav-index'</code> property and the <code
+  title="attr-tabindex">tabindex</code> attribute to find the next
+  focusable element and focuses it.</p>
+
+  <p>The <dfn><code>moveFocusBackward</code></dfn> method uses the
+  <code>'nav-index'</code> property and the <code
+  title="attr-tabindex>tabindex</code> attribute to find the previous
+  focusable element and focuses it.</p>
+
+  <p>The <dfn><code>moveFocusUp</code></dfn> method uses the
+  <code>'nav-up'</code> property and the <code
+  title="attr-tabindex>tabindex</code> attribute to find an
+  appropriate focusable element and focuses it.</p>
+
+  <p>In a similar manner, the <dfn><code>moveFocusRight</code></dfn>,
+  <dfn><code>moveFocusDown</code></dfn>, and
+  <dfn><code>moveFocusLeft</code></dfn> methods use the
+  <code>'nav-right'</code>, <code>'nav-down'</code>, and
+  <code>'nav-left'</code> properties (respectively), and the <code
+  title="attr-tabindex>tabindex</code> attribute, to find an
+  appropriate focusable element and focus it.</p>
+
+  <p>The <code>'nav-index'</code>, <code>'nav-up'</code>,
+  <code>'nav-right'</code>, <code>'nav-down'</code>, and
+  <code>'nav-left'</code> properties are defined in <a
+  href="#refsCSS3UI">[CSS3UI]</a>.</p>
+
+Other things to look at are IE's focus APIs (document.activeElement,
+document.hasFocus, HTMLElement.setActive(), onBeforeActivate,
+onActivate, onBeforeDeactivate, onDeactivate, document.hasFocus):
+   https://bugzilla.mozilla.org/show_bug.cgi?id=296471
+   https://bugzilla.mozilla.org/show_bug.cgi?id=296469
+   http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/activeelement.asp
+   http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/setactive.asp
+   http://msdn.microsoft.com/workshop/author/dhtml/reference/events/onbeforeactivate.asp
+   http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/focus.asp
+-->
+
+
+
+  <h3 id="selection">The text selection APIs</h3>
+
+  <p>Every <span>browsing context</span> has <dfn title="the
+  selection">a selection</dfn>. The selection can be empty, and the
+  selection can have more than one range (a disjointed selection). The
+  user should be able to change the selection. User agents are not
+  required to let the user select more than one range, and may
+  collapse multiple ranges in the selection to a single range when the
+  user interacts with the selection. (But, of course, the user agent
+  may let the user create selections with multiple ranges.)</p>
+
+  <p>This one selection must be shared by all the content of the
+  browsing context (though not by nested <span title="browsing
+  context">browsing contexts</span>), including any editing hosts in
+  the document. (Editing hosts that are not inside a document cannot
+  have a selection.)</p>
+
+  <p>If the selection is empty (collapsed, so that it has only one
+  segment and that segment's start and end points are the same) then
+  the selection's position should equal the caret position. When the
+  selection is not empty, this specification does not define the caret
+  position; user agents should follow platform conventions in deciding
+  whether the caret is at the start of the selection, the end of the
+  selection, or somewhere else.</p>
+
+  <p>On some platforms (such as those using Wordstar editing
+  conventions), the caret position is totally independent of the start
+  and end of the selection, even when the selection is empty. On such
+  platforms, user agents may ignore the requirement that the cursor
+  position be linked to the position of the selection altogether.</p>
+
+  <p>Mostly for historical reasons, in addition to the <span>browsing
+  context</span>'s <span title="the selection">selection</span>, each
+  <code>textarea</code> and <code>input</code> element has an
+  independent selection. These are the <dfn title="text field
+  selection">text field selections</dfn>.</p>
+
+  <p>User agents may selectively ignore attempts to use the API to
+  adjust the selection made after the user has modified the
+  selection. For example, if the user has just selected part of a
+  word, the user agent could ignore attempts to use the API call to
+  immediately unselect the selection altogether, but could allow
+  attempts to change the selection to select the entire word.</p>
+
+  <p>User agents may also allow the user to create selections that are
+  not exposed to the API.</p>
+
+  <p>The <code>datagrid</code> and <code>select</code> elements also
+  have selections, indicating which items have been picked by the
+  user. These are not discussed in this section.</p>
+
+  <p class="note">This specification does not specify how selections
+  are presented to the user. The Selectors specification, in
+  conjunction with CSS, can be used to style text selections using the
+  <code>::selection</code> pseudo-element. <a
+  href="#refsSELECTORS">[SELECTORS]</a> <a
+  href="#refsCSS21">[CSS21]</a></p>
+
+
+
+  <h4 id="documentSelection">APIs for the browsing context selection</h4>
+
+  <p>The <dfn
+  title="dom-getSelection"><code>getSelection()</code></dfn> method on
+  the <code>Window</code> interface must return the
+  <code>Selection</code> object representing <span>the
+  selection</span> of that <code>Window</code> object's
+  <span>browsing context</span>.
+
+  <p>For historical reasons, the <dfn
+  title="dom-document-getSelection"><code>getSelection()</code></dfn>
+  method on the <code>HTMLDocument</code> interface must return the
+  same <code>Selection</code> object.</p>
+                                   
+  <pre class="idl">[<span title="dom-selection-toString">Stringifies</span>] interface <dfn>Selection</dfn> {
+  readonly attribute Node <span title="dom-selection-anchorNode">anchorNode</span>;
+  readonly attribute long <span title="dom-selection-anchorOffset">anchorOffset</span>;
+  readonly attribute Node <span title="dom-selection-focusNode">focusNode</span>;
+  readonly attribute long <span title="dom-selection-focusOffset">focusOffset</span>;
+  readonly attribute boolean <span title="dom-selection-isCollapsed">isCollapsed</span>;
+  void <span title="dom-selection-collapse">collapse</span>(in Node parentNode, in long offset);
+  void <span title="dom-selection-collapseToStart">collapseToStart</span>();
+  void <span title="dom-selection-collapseToEnd">collapseToEnd</span>();
+  void <span title="dom-selection-selectAllChildren">selectAllChildren</span>(in Node parentNode);
+  void <span title="dom-selection-deleteFromDocument">deleteFromDocument</span>();
+  readonly attribute long <span title="dom-selection-rangeCount">rangeCount</span>;
+  Range <span title="dom-selection-getRangeAt">getRangeAt</span>(in long index);
+  void <span title="dom-selection-addRange">addRange</span>(in Range range);
+  void <span title="dom-selection-removeRange">removeRange</span>(in Range range);
+  void <span title="dom-selection-removeAllRanges">removeAllRanges</span>();
+};</pre>
+<!--
+  See also:
+    http://lxr.mozilla.org/mozilla/source/content/base/public/nsISelection.idl
+  This spec doesn't have everything from there yet, in particular
+  selectionLanguageChange() and containsNode() are missing. They are missing
+  because I couldn't work out how to define them in terms of Ranges.
+
+  I also haven't included extend():
+
+    void <span title="dom-selection-extend">extend</span>(in Node parentNode, in long offset);
+    // raise if no range
+    // raise WRONG_DOCUMENT_ERR if parentNode not in document
+    // do something
+
+  ...mostly because I can't work out how to describe what it does quickly.
+-->
+
+  <p>The <code>Selection</code> interface is represents a list of
+  <code>Range</code> objects. The first item in the list has index 0,
+  and the last item has index <var title="">count</var>-1, where
+  <var title="">count</var> is the number of ranges in the list. <a
+  href="#refsDOM2RANGE">[DOM2RANGE]</a></p>
+
+  <p>All of the members of the <code>Selection</code> interface are
+  defined in terms of operations on the <code>Range</code> objects
+  represented by this object. These operations can raise exceptions,
+  as defined for the <code>Range</code> interface; this can therefore
+  result in the members of the <code>Selection</code> interface
+  raising exceptions as well, in addition to any explicitly called out
+  below.</p> <!-- XXX example -->
+
+  <p>The <dfn
+  title="dom-selection-anchorNode"><code>anchorNode</code></dfn>
+  attribute must return the value returned by the <code
+  title="">startContainer</code> attribute of the last
+  <code>Range</code> object in the list, or null if the list is
+  empty.</p>
+
+  <p>The <dfn
+  title="dom-selection-anchorOffset"><code>anchorOffset</code></dfn>
+  attribute must return the value returned by the <code
+  title="">startOffset</code> attribute of the last <code>Range</code>
+  object in the list, or 0 if the list is empty.</p>
+
+  <p>The <dfn
+  title="dom-selection-focusNode"><code>focusNode</code></dfn>
+  attribute must return the value returned by the <code
+  title="">endContainer</code> attribute of the last
+  <code>Range</code> object in the list, or null if the list is
+  empty.</p>
+
+  <p>The <dfn
+  title="dom-selection-focusOffset"><code>focusOffset</code></dfn>
+  attribute must return the value returned by the <code
+  title="">endOffset</code> attribute of the last <code>Range</code>
+  object in the list, or 0 if the list is empty.</p>
+
+  <p>The <dfn
+  title="dom-selection-isCollapsed"><code>isCollapsed</code></dfn>
+  attribute must return true if there are zero ranges, or if there is
+  exactly one range and its <code title="">collapsed</code> attribute
+  is itself true. Otherwise it must return false.</p>
+
+  <p>The <dfn
+  title="dom-selection-collapse"><code>collapse(<var title="">parentNode</var>,
+  <var title="">offset</var>)</code></dfn> method must raise a
+  <code>WRONG_DOCUMENT_ERR</code> DOM exception if
+  <var title="">parentNode</var>'s <code title="">ownerDocument</code> is not
+  the <code>HTMLDocument</code> object with which the
+  <code>Selection</code> object is associated. Otherwise it is, and
+  the method must remove all the ranges in the <code>Selection</code>
+  list, then create a new <code>Range</code> object, add it to the
+  list, and invoke its <code title="">setStart()</code> and <code
+  title="">setEnd()</code> methods with the <var title="">parentNode</var> and
+  <var title="">offset</var> values as their arguments.</p>
+
+  <p>The <dfn
+  title="dom-selection-collapseToStart"><code>collapseToStart()</code></dfn>
+  method must raise an <code>INVALID_STATE_ERR</code> DOM exception if
+  there are no ranges in the list. Otherwise, it must invoke the <code
+  title="dom-selection-collapse">collapse()</code> method with the
+  <code title="">startContainer</code> and <code
+  title="">startOffset</code> values of the first <code>Range</code>
+  object in the list as the arguments.</p>
+
+  <p>The <dfn
+  title="dom-selection-collapseToEnd"><code>collapseToEnd()</code></dfn>
+  method must raise an <code>INVALID_STATE_ERR</code> DOM exception if
+  there are no ranges in the list. Otherwise, it must invoke the <code
+  title="dom-selection-collapse">collapse()</code> method with the
+  <code title="">endContainer</code> and <code
+  title="">endOffset</code> values of the last <code>Range</code>
+  object in the list as the arguments.</p>
+
+  <p>The <dfn
+  title="dom-selection-selectAllChildren"><code>selectAllChildren(<var title="">parentNode</var>)</code></dfn>
+  method must invoke the <code
+  title="dom-selection-collapse">collapse()</code> method with the
+  <var title="">parentNode</var> value as the first argument and 0 as the
+  second argument, and must then invoke the <code
+  title="">selectNodeContents()</code> method on the first (and only)
+  range in the list with the <var title="">parentNode</var> value as the
+  argument.</p>
+
+  <p>The <dfn
+  title="dom-selection-deleteFromDocument"><code>deleteFromDocument()</code></dfn>
+  method must invoke the <code title="">deleteContents()</code> method
+  on each range in the list, if any, from first to last.</p>
+
+  <p>The <dfn
+  title="dom-selection-rangeCount"><code>rangeCount</code></dfn>
+  attribute must return the number of ranges in the list.</p>
+
+  <p>The <dfn
+  title="dom-selection-getRangeAt"><code>getRangeAt(<var title="">index</var>)</code></dfn>
+  method must return the <var title="">index</var>th range in the list. If
+  <var title="">index</var> is less than zero or greater or equal to the value
+  returned by the <code
+  title="dom-selection-rangeCount">rangeCount</code> attribute, then
+  the method must raise an <code>INDEX_SIZE_ERR</code> DOM
+  exception.</p>
+
+  <p>The <dfn
+  title="dom-selection-addRange"><code>addRange(<var title="">range</var>)</code></dfn>
+  method must add the given <var title="">range</var> Range object to the list
+  of selections, at the end (so the newly added range is the new last
+  range). Duplicates are not prevented; a range may be added more than
+  once in which case it appears in the list more than once, which (for
+  example) will cause <span
+  title="dom-selection-toString">stringification</span> to return the
+  range's text twice.</p> <!-- XXX how does this interact with
+  deleteFromDocument() which acts on all ranges? -->
+
+  <p>The <dfn
+  title="dom-selection-removeRange"><code>removeRange(<var title="">range</var>)</code></dfn>
+  method must remove the first occurrence of <var title="">range</var> in the
+  list of ranges, if it appears at all.</p>
+
+  <p>The <dfn
+  title="dom-selection-removeAllRanges"><code>removeAllRanges()</code></dfn>
+  method must remove all the ranges from the list of ranges, such that
+  the <code title="dom-selection-rangeCount">rangeCount</code>
+  attribute returns 0 after the <code
+  title="dom-selection-removeAllRanges">removeAllRanges()</code>
+  method is invoked (and until a new range is added to the list,
+  either through this interface or via user interaction).</p>
+
+  <p>Objects implementing this interface must <dfn
+  title="dom-selection-toString">stringify</dfn> to a concatenation
+  of the results of invoking the <code title="">toString()</code>
+  method of the <code>Range</code> object on each of the ranges of the
+  selection, in the order they appear in the list (first to last).</p>
+
+  <div class="example">
+   <p>In the following document fragment, the emphasised parts
+   indicate the selection.</p>
+   <pre><p>The cute girl likes <em>the </em><cite><em>Oxford English</em> Dictionary</cite>.</p></pre>
+   <p>If a script invoked <code
+   title="">window.getSelection().toString()</code>, the return value
+   would be "<code>the Oxford English</code>".</p>
+  </div>
+
+  <p class="note">The <code>Selection</code> interface has no relation
+  to the <code>DataGridSelection</code> interface.</p>
+
+
+  <h4 id="textFieldSelection">APIs for the text field selections</h4>
+
+  <p class="big-issue">When we define HTMLTextAreaElement and
+  HTMLInputElement we will have to add the IDL given below to both of
+  their IDLs.</p>
+
+  <p>The <code>input</code> and <code>textarea</code> elements define
+  four members in their DOM interfaces for handling their text
+  selection:</p>
+
+  <pre class="idl">  void <span title="dom-textarea/input-select">select</span>();
+           attribute unsigned long <span title="dom-textarea/input-selectionStart">selectionStart</span>;
+           attribute unsigned long <span title="dom-textarea/input-selectionEnd">selectionEnd</span>;
+  void <span title="dom-textarea/input-setSelectionRange">setSelectionRange</span>(in unsigned long start, in unsigned long end);</pre>
+<!-- XXX also add textLength? it seems to be widely used -->
+
+  <p>These methods and attributes expose and control the selection of
+  <code>input</code> and <code>textarea</code> text fields.</p>
+
+  <p>The <dfn
+  title="dom-textarea/input-select"><code>select()</code></dfn> method
+  must cause the contents of the text field to be fully selected.</p>
+
+  <p>The <dfn
+  title="dom-textarea/input-selectionStart"><code>selectionStart</code></dfn>
+  attribute must, on getting, return the offset (in logical order) to
+  the character that immediately follows the start of the
+  selection. If there is no selection, then it must return the offset
+  (in logical order) to the character that immediately follows the
+  text entry cursor.</p>
+
+  <p>On setting, it must act as if the <code
+  title="dom-textarea/input-setSelectionRange">setSelectionRange()</code>
+  method had been called, with the new value as the first argument,
+  and the current value of the <code
+  title="dom-textarea/input-selectionEnd">selectionEnd</code>
+  attribute as the second argument, unless the current value of the
+  <code title="dom-textarea/input-selectionEnd">selectionEnd</code> is
+  less than the new value, in which case the second argument must also
+  be the new value.</p>
+
+  <p>The <dfn
+  title="dom-textarea/input-selectionEnd"><code>selectionEnd</code></dfn>
+  attribute must, on getting, return the offset (in logical order) to
+  the character that immediately follows the end of the selection. If
+  there is no selection, then it must return the offset (in logical
+  order) to the character that immediately follows the text entry
+  cursor.</p>
+
+  <p>On setting, it must act as if the <code
+  title="dom-textarea/input-setSelectionRange">setSelectionRange()</code>
+  method had been called, with the current value of the <code
+  title="dom-textarea/input-selectionStart">selectionStart</code>
+  attribute as the first argument, and new value as the second
+  argument.</p>
+
+  <p>The <dfn
+  title="dom-textarea/input-setSelectionRange"><code>setSelectionRange(<var
+  title="">start</var>, <var title="">end</var>)</code></dfn> method
+  must set the selection of the text field to the sequence of
+  characters starting with the character at the <var
+  title="">start</var>th position (in logical order) and ending with
+  the character at the <span>(<var title="">end</var>-1)</span>th
+  position. Arguments greater than the length of the value in the text
+  field must be treated as pointing at the end of the text field. If
+  <var title="">end</var> is less than or equal to <var
+  title="">start</var> then the start of the selection and the end of
+  the selection must both be placed immediately before the character
+  with offset <var title="">end</var>. In UAs where there is no
+  concept of an empty selection, this must set the cursor to be just
+  before the character with offset <var title="">end</var>.</p>
+
+  <div class="example">
+
+   <p>To obtain the currently selected text, the following JavaScript
+   suffices:</p>
+
+   <pre>var selectionText = control.value.substring(control.selectionStart, control.selectionEnd);</pre>
+
+   <p>...where <var title="">control</var> is the <code>input</code>
+   or <code>textarea</code> element.</p>
+
+  </div>
+
+  <p>Characters with no visible rendering, such as U+200D ZERO WIDTH
+  JOINER, still count as characters. Thus, for instance, the selection
+  can include just an invisible character, and the text insertion
+  cursor can be placed to one side or another of such a character.</p>
+
+  <p>When these methods and attributes are used with
+  <code>input</code> elements that are not displaying simple text
+  fields, they must raise an <code>INVALID_STATE_ERR</code>
+  exception.</p>
+
+
+
+
   <h3 id="contenteditable">The <code
   title="attr-contenteditable">contenteditable</code> attribute</h3>
 
@@ -36604,360 +36951,6 @@
 
 
 
-
-  <h3 id="selection">The text selection APIs</h3>
-
-  <p>Every <span>browsing context</span> has <dfn title="the
-  selection">a selection</dfn>. The selection can be empty, and the
-  selection can have more than one range (a disjointed selection). The
-  user should be able to change the selection. User agents are not
-  required to let the user select more than one range, and may
-  collapse multiple ranges in the selection to a single range when the
-  user interacts with the selection. (But, of course, the user agent
-  may let the user create selections with multiple ranges.)</p>
-
-  <p>This one selection must be shared by all the content of the
-  browsing context (though not by nested <span title="browsing
-  context">browsing contexts</span>), including any editing hosts in
-  the document. (Editing hosts that are not inside a document cannot
-  have a selection.)</p>
-
-  <p>If the selection is empty (collapsed, so that it has only one
-  segment and that segment's start and end points are the same) then
-  the selection's position should equal the caret position. When the
-  selection is not empty, this specification does not define the caret
-  position; user agents should follow platform conventions in deciding
-  whether the caret is at the start of the selection, the end of the
-  selection, or somewhere else.</p>
-
-  <p>On some platforms (such as those using Wordstar editing
-  conventions), the caret position is totally independent of the start
-  and end of the selection, even when the selection is empty. On such
-  platforms, user agents may ignore the requirement that the cursor
-  position be linked to the position of the selection altogether.</p>
-
-  <p>Mostly for historical reasons, in addition to the <span>browsing
-  context</span>'s <span title="the selection">selection</span>, each
-  <code>textarea</code> and <code>input</code> element has an
-  independent selection. These are the <dfn title="text field
-  selection">text field selections</dfn>.</p>
-
-  <p>User agents may selectively ignore attempts to use the API to
-  adjust the selection made after the user has modified the
-  selection. For example, if the user has just selected part of a
-  word, the user agent could ignore attempts to use the API call to
-  immediately unselect the selection altogether, but could allow
-  attempts to change the selection to select the entire word.</p>
-
-  <p>User agents may also allow the user to create selections that are
-  not exposed to the API.</p>
-
-  <p>The <code>datagrid</code> and <code>select</code> elements also
-  have selections, indicating which items have been picked by the
-  user. These are not discussed in this section.</p>
-
-  <p class="note">This specification does not specify how selections
-  are presented to the user. The Selectors specification, in
-  conjunction with CSS, can be used to style text selections using the
-  <code>::selection</code> pseudo-element. <a
-  href="#refsSELECTORS">[SELECTORS]</a> <a
-  href="#refsCSS21">[CSS21]</a></p>
-
-
-
-  <h4 id="documentSelection">APIs for the browsing context selection</h4>
-
-  <p>The <dfn
-  title="dom-getSelection"><code>getSelection()</code></dfn> method on
-  the <code>Window</code> interface must return the
-  <code>Selection</code> object representing <span>the
-  selection</span> of that <code>Window</code> object's
-  <span>browsing context</span>.
-
-  <p>For historical reasons, the <dfn
-  title="dom-document-getSelection"><code>getSelection()</code></dfn>
-  method on the <code>HTMLDocument</code> interface must return the
-  same <code>Selection</code> object.</p>
-                                   
-  <pre class="idl">[<span title="dom-selection-toString">Stringifies</span>] interface <dfn>Selection</dfn> {
-  readonly attribute Node <span title="dom-selection-anchorNode">anchorNode</span>;
-  readonly attribute long <span title="dom-selection-anchorOffset">anchorOffset</span>;
-  readonly attribute Node <span title="dom-selection-focusNode">focusNode</span>;
-  readonly attribute long <span title="dom-selection-focusOffset">focusOffset</span>;
-  readonly attribute boolean <span title="dom-selection-isCollapsed">isCollapsed</span>;
-  void <span title="dom-selection-collapse">collapse</span>(in Node parentNode, in long offset);
-  void <span title="dom-selection-collapseToStart">collapseToStart</span>();
-  void <span title="dom-selection-collapseToEnd">collapseToEnd</span>();
-  void <span title="dom-selection-selectAllChildren">selectAllChildren</span>(in Node parentNode);
-  void <span title="dom-selection-deleteFromDocument">deleteFromDocument</span>();
-  readonly attribute long <span title="dom-selection-rangeCount">rangeCount</span>;
-  Range <span title="dom-selection-getRangeAt">getRangeAt</span>(in long index);
-  void <span title="dom-selection-addRange">addRange</span>(in Range range);
-  void <span title="dom-selection-removeRange">removeRange</span>(in Range range);
-  void <span title="dom-selection-removeAllRanges">removeAllRanges</span>();
-};</pre>
-<!--
-  See also:
-    http://lxr.mozilla.org/mozilla/source/content/base/public/nsISelection.idl
-  This spec doesn't have everything from there yet, in particular
-  selectionLanguageChange() and containsNode() are missing. They are missing
-  because I couldn't work out how to define them in terms of Ranges.
-
-  I also haven't included extend():
-
-    void <span title="dom-selection-extend">extend</span>(in Node parentNode, in long offset);
-    // raise if no range
-    // raise WRONG_DOCUMENT_ERR if parentNode not in document
-    // do something
-
-  ...mostly because I can't work out how to describe what it does quickly.
--->
-
-  <p>The <code>Selection</code> interface is represents a list of
-  <code>Range</code> objects. The first item in the list has index 0,
-  and the last item has index <var title="">count</var>-1, where
-  <var title="">count</var> is the number of ranges in the list. <a
-  href="#refsDOM2RANGE">[DOM2RANGE]</a></p>
-
-  <p>All of the members of the <code>Selection</code> interface are
-  defined in terms of operations on the <code>Range</code> objects
-  represented by this object. These operations can raise exceptions,
-  as defined for the <code>Range</code> interface; this can therefore
-  result in the members of the <code>Selection</code> interface
-  raising exceptions as well, in addition to any explicitly called out
-  below.</p> <!-- XXX example -->
-
-  <p>The <dfn
-  title="dom-selection-anchorNode"><code>anchorNode</code></dfn>
-  attribute must return the value returned by the <code
-  title="">startContainer</code> attribute of the last
-  <code>Range</code> object in the list, or null if the list is
-  empty.</p>
-
-  <p>The <dfn
-  title="dom-selection-anchorOffset"><code>anchorOffset</code></dfn>
-  attribute must return the value returned by the <code
-  title="">startOffset</code> attribute of the last <code>Range</code>
-  object in the list, or 0 if the list is empty.</p>
-
-  <p>The <dfn
-  title="dom-selection-focusNode"><code>focusNode</code></dfn>
-  attribute must return the value returned by the <code
-  title="">endContainer</code> attribute of the last
-  <code>Range</code> object in the list, or null if the list is
-  empty.</p>
-
-  <p>The <dfn
-  title="dom-selection-focusOffset"><code>focusOffset</code></dfn>
-  attribute must return the value returned by the <code
-  title="">endOffset</code> attribute of the last <code>Range</code>
-  object in the list, or 0 if the list is empty.</p>
-
-  <p>The <dfn
-  title="dom-selection-isCollapsed"><code>isCollapsed</code></dfn>
-  attribute must return true if there are zero ranges, or if there is
-  exactly one range and its <code title="">collapsed</code> attribute
-  is itself true. Otherwise it must return false.</p>
-
-  <p>The <dfn
-  title="dom-selection-collapse"><code>collapse(<var title="">parentNode</var>,
-  <var title="">offset</var>)</code></dfn> method must raise a
-  <code>WRONG_DOCUMENT_ERR</code> DOM exception if
-  <var title="">parentNode</var>'s <code title="">ownerDocument</code> is not
-  the <code>HTMLDocument</code> object with which the
-  <code>Selection</code> object is associated. Otherwise it is, and
-  the method must remove all the ranges in the <code>Selection</code>
-  list, then create a new <code>Range</code> object, add it to the
-  list, and invoke its <code title="">setStart()</code> and <code
-  title="">setEnd()</code> methods with the <var title="">parentNode</var> and
-  <var title="">offset</var> values as their arguments.</p>
-
-  <p>The <dfn
-  title="dom-selection-collapseToStart"><code>collapseToStart()</code></dfn>
-  method must raise an <code>INVALID_STATE_ERR</code> DOM exception if
-  there are no ranges in the list. Otherwise, it must invoke the <code
-  title="dom-selection-collapse">collapse()</code> method with the
-  <code title="">startContainer</code> and <code
-  title="">startOffset</code> values of the first <code>Range</code>
-  object in the list as the arguments.</p>
-
-  <p>The <dfn
-  title="dom-selection-collapseToEnd"><code>collapseToEnd()</code></dfn>
-  method must raise an <code>INVALID_STATE_ERR</code> DOM exception if
-  there are no ranges in the list. Otherwise, it must invoke the <code
-  title="dom-selection-collapse">collapse()</code> method with the
-  <code title="">endContainer</code> and <code
-  title="">endOffset</code> values of the last <code>Range</code>
-  object in the list as the arguments.</p>
-
-  <p>The <dfn
-  title="dom-selection-selectAllChildren"><code>selectAllChildren(<var title="">parentNode</var>)</code></dfn>
-  method must invoke the <code
-  title="dom-selection-collapse">collapse()</code> method with the
-  <var title="">parentNode</var> value as the first argument and 0 as the
-  second argument, and must then invoke the <code
-  title="">selectNodeContents()</code> method on the first (and only)
-  range in the list with the <var title="">parentNode</var> value as the
-  argument.</p>
-
-  <p>The <dfn
-  title="dom-selection-deleteFromDocument"><code>deleteFromDocument()</code></dfn>
-  method must invoke the <code title="">deleteContents()</code> method
-  on each range in the list, if any, from first to last.</p>
-
-  <p>The <dfn
-  title="dom-selection-rangeCount"><code>rangeCount</code></dfn>
-  attribute must return the number of ranges in the list.</p>
-
-  <p>The <dfn
-  title="dom-selection-getRangeAt"><code>getRangeAt(<var title="">index</var>)</code></dfn>
-  method must return the <var title="">index</var>th range in the list. If
-  <var title="">index</var> is less than zero or greater or equal to the value
-  returned by the <code
-  title="dom-selection-rangeCount">rangeCount</code> attribute, then
-  the method must raise an <code>INDEX_SIZE_ERR</code> DOM
-  exception.</p>
-
-  <p>The <dfn
-  title="dom-selection-addRange"><code>addRange(<var title="">range</var>)</code></dfn>
-  method must add the given <var title="">range</var> Range object to the list
-  of selections, at the end (so the newly added range is the new last
-  range). Duplicates are not prevented; a range may be added more than
-  once in which case it appears in the list more than once, which (for
-  example) will cause <span
-  title="dom-selection-toString">stringification</span> to return the
-  range's text twice.</p> <!-- XXX how does this interact with
-  deleteFromDocument() which acts on all ranges? -->
-
-  <p>The <dfn
-  title="dom-selection-removeRange"><code>removeRange(<var title="">range</var>)</code></dfn>
-  method must remove the first occurrence of <var title="">range</var> in the
-  list of ranges, if it appears at all.</p>
-
-  <p>The <dfn
-  title="dom-selection-removeAllRanges"><code>removeAllRanges()</code></dfn>
-  method must remove all the ranges from the list of ranges, such that
-  the <code title="dom-selection-rangeCount">rangeCount</code>
-  attribute returns 0 after the <code
-  title="dom-selection-removeAllRanges">removeAllRanges()</code>
-  method is invoked (and until a new range is added to the list,
-  either through this interface or via user interaction).</p>
-
-  <p>Objects implementing this interface must <dfn
-  title="dom-selection-toString">stringify</dfn> to a concatenation
-  of the results of invoking the <code title="">toString()</code>
-  method of the <code>Range</code> object on each of the ranges of the
-  selection, in the order they appear in the list (first to last).</p>
-
-  <div class="example">
-   <p>In the following document fragment, the emphasised parts
-   indicate the selection.</p>
-   <pre><p>The cute girl likes <em>the </em><cite><em>Oxford English</em> Dictionary</cite>.</p></pre>
-   <p>If a script invoked <code
-   title="">window.getSelection().toString()</code>, the return value
-   would be "<code>the Oxford English</code>".</p>
-  </div>
-
-  <p class="note">The <code>Selection</code> interface has no relation
-  to the <code>DataGridSelection</code> interface.</p>
-
-
-  <h4 id="textFieldSelection">APIs for the text field selections</h4>
-
-  <p class="big-issue">When we define HTMLTextAreaElement and
-  HTMLInputElement we will have to add the IDL given below to both of
-  their IDLs.</p>
-
-  <p>The <code>input</code> and <code>textarea</code> elements define
-  four members in their DOM interfaces for handling their text
-  selection:</p>
-
-  <pre class="idl">  void <span title="dom-textarea/input-select">select</span>();
-           attribute unsigned long <span title="dom-textarea/input-selectionStart">selectionStart</span>;
-           attribute unsigned long <span title="dom-textarea/input-selectionEnd">selectionEnd</span>;
-  void <span title="dom-textarea/input-setSelectionRange">setSelectionRange</span>(in unsigned long start, in unsigned long end);</pre>
-<!-- XXX also add textLength? it seems to be widely used -->
-
-  <p>These methods and attributes expose and control the selection of
-  <code>input</code> and <code>textarea</code> text fields.</p>
-
-  <p>The <dfn
-  title="dom-textarea/input-select"><code>select()</code></dfn> method
-  must cause the contents of the text field to be fully selected.</p>
-
-  <p>The <dfn
-  title="dom-textarea/input-selectionStart"><code>selectionStart</code></dfn>
-  attribute must, on getting, return the offset (in logical order) to
-  the character that immediately follows the start of the
-  selection. If there is no selection, then it must return the offset
-  (in logical order) to the character that immediately follows the
-  text entry cursor.</p>
-
-  <p>On setting, it must act as if the <code
-  title="dom-textarea/input-setSelectionRange">setSelectionRange()</code>
-  method had been called, with the new value as the first argument,
-  and the current value of the <code
-  title="dom-textarea/input-selectionEnd">selectionEnd</code>
-  attribute as the second argument, unless the current value of the
-  <code title="dom-textarea/input-selectionEnd">selectionEnd</code> is
-  less than the new value, in which case the second argument must also
-  be the new value.</p>
-
-  <p>The <dfn
-  title="dom-textarea/input-selectionEnd"><code>selectionEnd</code></dfn>
-  attribute must, on getting, return the offset (in logical order) to
-  the character that immediately follows the end of the selection. If
-  there is no selection, then it must return the offset (in logical
-  order) to the character that immediately follows the text entry
-  cursor.</p>
-
-  <p>On setting, it must act as if the <code
-  title="dom-textarea/input-setSelectionRange">setSelectionRange()</code>
-  method had been called, with the current value of the <code
-  title="dom-textarea/input-selectionStart">selectionStart</code>
-  attribute as the first argument, and new value as the second
-  argument.</p>
-
-  <p>The <dfn
-  title="dom-textarea/input-setSelectionRange"><code>setSelectionRange(<var
-  title="">start</var>, <var title="">end</var>)</code></dfn> method
-  must set the selection of the text field to the sequence of
-  characters starting with the character at the <var
-  title="">start</var>th position (in logical order) and ending with
-  the character at the <span>(<var title="">end</var>-1)</span>th
-  position. Arguments greater than the length of the value in the text
-  field must be treated as pointing at the end of the text field. If
-  <var title="">end</var> is less than or equal to <var
-  title="">start</var> then the start of the selection and the end of
-  the selection must both be placed immediately before the character
-  with offset <var title="">end</var>. In UAs where there is no
-  concept of an empty selection, this must set the cursor to be just
-  before the character with offset <var title="">end</var>.</p>
-
-  <div class="example">
-
-   <p>To obtain the currently selected text, the following JavaScript
-   suffices:</p>
-
-   <pre>var selectionText = control.value.substring(control.selectionStart, control.selectionEnd);</pre>
-
-   <p>...where <var title="">control</var> is the <code>input</code>
-   or <code>textarea</code> element.</p>
-
-  </div>
-
-  <p>Characters with no visible rendering, such as U+200D ZERO WIDTH
-  JOINER, still count as characters. Thus, for instance, the selection
-  can include just an invisible character, and the text insertion
-  cursor can be placed to one side or another of such a character.</p>
-
-  <p>When these methods and attributes are used with
-  <code>input</code> elements that are not displaying simple text
-  fields, they must raise an <code>INVALID_STATE_ERR</code>
-  exception.</p>
-
-
-
   <h3>Command APIs</h3>
 
   <p>The <dfn id="execCommand"




More information about the Commit-Watchers mailing list