[html5] r5617 - [e] (0) Move Selection to DOM Range. Fixing http://www.w3.org/Bugs/Public/show_b [...]

whatwg at whatwg.org whatwg at whatwg.org
Tue Oct 12 14:44:28 PDT 2010


Author: ianh
Date: 2010-10-12 14:44:22 -0700 (Tue, 12 Oct 2010)
New Revision: 5617

Modified:
   complete.html
   index
   source
Log:
[e] (0) Move Selection to DOM Range.
Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=10798

Modified: complete.html
===================================================================
--- complete.html	2010-10-12 21:20:32 UTC (rev 5616)
+++ complete.html	2010-10-12 21:44:22 UTC (rev 5617)
@@ -698,95 +698,97 @@
        <li><a href="#a-form-control's-value"><span class=secno>4.10.19.3 </span>A form control's value</a></li>
        <li><a href=#autofocusing-a-form-control><span class=secno>4.10.19.4 </span>Autofocusing a form control</a></li>
        <li><a href=#limiting-user-input-length><span class=secno>4.10.19.5 </span>Limiting user input length</a></li>
-       <li><a href=#form-submission-0><span class=secno>4.10.19.6 </span>Form submission</a></ol></li>
-     <li><a href=#constraints><span class=secno>4.10.20 </span>Constraints</a>
+       <li><a href=#form-submission-0><span class=secno>4.10.19.6 </span>Form submission</a></ol></ol></li>
+   <li><a href=#textFieldSelection><span class=secno>4.11 </span>APIs for the text field selections</a>
+    <ol>
+     <li><a href=#constraints><span class=secno>4.11.1 </span>Constraints</a>
       <ol>
-       <li><a href=#definitions><span class=secno>4.10.20.1 </span>Definitions</a></li>
-       <li><a href=#constraint-validation><span class=secno>4.10.20.2 </span>Constraint validation</a></li>
-       <li><a href=#the-constraint-validation-api><span class=secno>4.10.20.3 </span>The constraint validation API</a></li>
-       <li><a href=#security-forms><span class=secno>4.10.20.4 </span>Security</a></ol></li>
-     <li><a href=#form-submission><span class=secno>4.10.21 </span>Form submission</a>
+       <li><a href=#definitions><span class=secno>4.11.1.1 </span>Definitions</a></li>
+       <li><a href=#constraint-validation><span class=secno>4.11.1.2 </span>Constraint validation</a></li>
+       <li><a href=#the-constraint-validation-api><span class=secno>4.11.1.3 </span>The constraint validation API</a></li>
+       <li><a href=#security-forms><span class=secno>4.11.1.4 </span>Security</a></ol></li>
+     <li><a href=#form-submission><span class=secno>4.11.2 </span>Form submission</a>
       <ol>
-       <li><a href=#introduction-1><span class=secno>4.10.21.1 </span>Introduction</a></li>
-       <li><a href=#implicit-submission><span class=secno>4.10.21.2 </span>Implicit submission</a></li>
-       <li><a href=#form-submission-algorithm><span class=secno>4.10.21.3 </span>Form submission algorithm</a></li>
-       <li><a href=#url-encoded-form-data><span class=secno>4.10.21.4 </span>URL-encoded form data</a></li>
-       <li><a href=#multipart-form-data><span class=secno>4.10.21.5 </span>Multipart form data</a></li>
-       <li><a href=#plain-text-form-data><span class=secno>4.10.21.6 </span>Plain text form data</a></ol></li>
-     <li><a href=#resetting-a-form><span class=secno>4.10.22 </span>Resetting a form</a></li>
-     <li><a href=#event-dispatch><span class=secno>4.10.23 </span>Event dispatch</a></ol></li>
-   <li><a href=#interactive-elements><span class=secno>4.11 </span>Interactive elements</a>
+       <li><a href=#introduction-1><span class=secno>4.11.2.1 </span>Introduction</a></li>
+       <li><a href=#implicit-submission><span class=secno>4.11.2.2 </span>Implicit submission</a></li>
+       <li><a href=#form-submission-algorithm><span class=secno>4.11.2.3 </span>Form submission algorithm</a></li>
+       <li><a href=#url-encoded-form-data><span class=secno>4.11.2.4 </span>URL-encoded form data</a></li>
+       <li><a href=#multipart-form-data><span class=secno>4.11.2.5 </span>Multipart form data</a></li>
+       <li><a href=#plain-text-form-data><span class=secno>4.11.2.6 </span>Plain text form data</a></ol></li>
+     <li><a href=#resetting-a-form><span class=secno>4.11.3 </span>Resetting a form</a></li>
+     <li><a href=#event-dispatch><span class=secno>4.11.4 </span>Event dispatch</a></ol></li>
+   <li><a href=#interactive-elements><span class=secno>4.12 </span>Interactive elements</a>
     <ol>
-     <li><a href=#the-details-element><span class=secno>4.11.1 </span>The <code>details</code> element</a></li>
-     <li><a href=#the-summary-element><span class=secno>4.11.2 </span>The <code>summary</code> element</a></li>
-     <li><a href=#the-command><span class=secno>4.11.3 </span>The <code>command</code> element</a></li>
-     <li><a href=#menus><span class=secno>4.11.4 </span>The <code>menu</code> element</a>
+     <li><a href=#the-details-element><span class=secno>4.12.1 </span>The <code>details</code> element</a></li>
+     <li><a href=#the-summary-element><span class=secno>4.12.2 </span>The <code>summary</code> element</a></li>
+     <li><a href=#the-command><span class=secno>4.12.3 </span>The <code>command</code> element</a></li>
+     <li><a href=#menus><span class=secno>4.12.4 </span>The <code>menu</code> element</a>
       <ol>
-       <li><a href=#menus-intro><span class=secno>4.11.4.1 </span>Introduction</a></li>
-       <li><a href=#building-menus-and-toolbars><span class=secno>4.11.4.2 </span>Building menus and toolbars</a></li>
-       <li><a href=#context-menus><span class=secno>4.11.4.3 </span>Context menus</a></li>
-       <li><a href=#toolbars><span class=secno>4.11.4.4 </span>Toolbars</a></ol></li>
-     <li><a href=#commands><span class=secno>4.11.5 </span>Commands</a>
+       <li><a href=#menus-intro><span class=secno>4.12.4.1 </span>Introduction</a></li>
+       <li><a href=#building-menus-and-toolbars><span class=secno>4.12.4.2 </span>Building menus and toolbars</a></li>
+       <li><a href=#context-menus><span class=secno>4.12.4.3 </span>Context menus</a></li>
+       <li><a href=#toolbars><span class=secno>4.12.4.4 </span>Toolbars</a></ol></li>
+     <li><a href=#commands><span class=secno>4.12.5 </span>Commands</a>
       <ol>
-       <li><a href=#using-the-a-element-to-define-a-command><span class=secno>4.11.5.1 </span>Using the <code>a</code> element to define a command</a></li>
-       <li><a href=#using-the-button-element-to-define-a-command><span class=secno>4.11.5.2 </span>Using the <code>button</code> element to define a command</a></li>
-       <li><a href=#using-the-input-element-to-define-a-command><span class=secno>4.11.5.3 </span>Using the <code>input</code> element to define a command</a></li>
-       <li><a href=#using-the-option-element-to-define-a-command><span class=secno>4.11.5.4 </span>Using the <code>option</code> element to define a command</a></li>
-       <li><a href=#using-the-command-element-to-define-a-command><span class=secno>4.11.5.5 </span>Using the <code>command</code> element to define
+       <li><a href=#using-the-a-element-to-define-a-command><span class=secno>4.12.5.1 </span>Using the <code>a</code> element to define a command</a></li>
+       <li><a href=#using-the-button-element-to-define-a-command><span class=secno>4.12.5.2 </span>Using the <code>button</code> element to define a command</a></li>
+       <li><a href=#using-the-input-element-to-define-a-command><span class=secno>4.12.5.3 </span>Using the <code>input</code> element to define a command</a></li>
+       <li><a href=#using-the-option-element-to-define-a-command><span class=secno>4.12.5.4 </span>Using the <code>option</code> element to define a command</a></li>
+       <li><a href=#using-the-command-element-to-define-a-command><span class=secno>4.12.5.5 </span>Using the <code>command</code> element to define
   a command</a></li>
-       <li><a href=#using-the-accesskey-attribute-on-a-label-element-to-define-a-command><span class=secno>4.11.5.6 </span>Using the <code title=attr-accesskey>accesskey</code> attribute on a <code>label</code> element to define a command</a></li>
-       <li><a href=#using-the-accesskey-attribute-on-a-legend-element-to-define-a-command><span class=secno>4.11.5.7 </span>Using the <code title=attr-accesskey>accesskey</code> attribute on a <code>legend</code> element to define a command</a></li>
-       <li><a href=#using-the-accesskey-attribute-to-define-a-command-on-other-elements><span class=secno>4.11.5.8 </span>Using the <code title=attr-accesskey>accesskey</code> attribute to define a command on other elements</a></ol></li>
-     <li><a href=#devices><span class=secno>4.11.6 </span>The <code>device</code> element</a>
+       <li><a href=#using-the-accesskey-attribute-on-a-label-element-to-define-a-command><span class=secno>4.12.5.6 </span>Using the <code title=attr-accesskey>accesskey</code> attribute on a <code>label</code> element to define a command</a></li>
+       <li><a href=#using-the-accesskey-attribute-on-a-legend-element-to-define-a-command><span class=secno>4.12.5.7 </span>Using the <code title=attr-accesskey>accesskey</code> attribute on a <code>legend</code> element to define a command</a></li>
+       <li><a href=#using-the-accesskey-attribute-to-define-a-command-on-other-elements><span class=secno>4.12.5.8 </span>Using the <code title=attr-accesskey>accesskey</code> attribute to define a command on other elements</a></ol></li>
+     <li><a href=#devices><span class=secno>4.12.6 </span>The <code>device</code> element</a>
       <ol>
-       <li><a href=#stream-api><span class=secno>4.11.6.1 </span>Stream API</a></li>
-       <li><a href=#peer-to-peer-connections><span class=secno>4.11.6.2 </span>Peer-to-peer connections</a></ol></ol></li>
-   <li><a href=#links><span class=secno>4.12 </span>Links</a>
+       <li><a href=#stream-api><span class=secno>4.12.6.1 </span>Stream API</a></li>
+       <li><a href=#peer-to-peer-connections><span class=secno>4.12.6.2 </span>Peer-to-peer connections</a></ol></ol></li>
+   <li><a href=#links><span class=secno>4.13 </span>Links</a>
     <ol>
-     <li><a href=#introduction-2><span class=secno>4.12.1 </span>Introduction</a></li>
-     <li><a href=#links-created-by-a-and-area-elements><span class=secno>4.12.2 </span>Links created by <code>a</code> and <code>area</code> elements</a></li>
-     <li><a href=#following-hyperlinks><span class=secno>4.12.3 </span>Following hyperlinks</a>
+     <li><a href=#introduction-2><span class=secno>4.13.1 </span>Introduction</a></li>
+     <li><a href=#links-created-by-a-and-area-elements><span class=secno>4.13.2 </span>Links created by <code>a</code> and <code>area</code> elements</a></li>
+     <li><a href=#following-hyperlinks><span class=secno>4.13.3 </span>Following hyperlinks</a>
       <ol>
-       <li><a href=#hyperlink-auditing><span class=secno>4.12.3.1 </span>Hyperlink auditing</a></ol></li>
-     <li><a href=#linkTypes><span class=secno>4.12.4 </span>Link types</a>
+       <li><a href=#hyperlink-auditing><span class=secno>4.13.3.1 </span>Hyperlink auditing</a></ol></li>
+     <li><a href=#linkTypes><span class=secno>4.13.4 </span>Link types</a>
       <ol>
-       <li><a href=#rel-alternate><span class=secno>4.12.4.1 </span>Link type "<code>alternate</code>"</a></li>
-       <li><a href=#rel-archives><span class=secno>4.12.4.2 </span>Link type "<code>archives</code>"</a></li>
-       <li><a href=#link-type-author><span class=secno>4.12.4.3 </span>Link type "<code>author</code>"</a></li>
-       <li><a href=#link-type-bookmark><span class=secno>4.12.4.4 </span>Link type "<code>bookmark</code>"</a></li>
-       <li><a href=#link-type-external><span class=secno>4.12.4.5 </span>Link type "<code>external</code>"</a></li>
-       <li><a href=#link-type-help><span class=secno>4.12.4.6 </span>Link type "<code>help</code>"</a></li>
-       <li><a href=#rel-icon><span class=secno>4.12.4.7 </span>Link type "<code>icon</code>"</a></li>
-       <li><a href=#link-type-license><span class=secno>4.12.4.8 </span>Link type "<code>license</code>"</a></li>
-       <li><a href=#link-type-nofollow><span class=secno>4.12.4.9 </span>Link type "<code>nofollow</code>"</a></li>
-       <li><a href=#link-type-noreferrer><span class=secno>4.12.4.10 </span>Link type "<code>noreferrer</code>"</a></li>
-       <li><a href=#link-type-pingback><span class=secno>4.12.4.11 </span>Link type "<code>pingback</code>"</a></li>
-       <li><a href=#link-type-prefetch><span class=secno>4.12.4.12 </span>Link type "<code>prefetch</code>"</a></li>
-       <li><a href=#link-type-search><span class=secno>4.12.4.13 </span>Link type "<code>search</code>"</a></li>
-       <li><a href=#link-type-stylesheet><span class=secno>4.12.4.14 </span>Link type "<code>stylesheet</code>"</a></li>
-       <li><a href=#link-type-sidebar><span class=secno>4.12.4.15 </span>Link type "<code>sidebar</code>"</a></li>
-       <li><a href=#link-type-tag><span class=secno>4.12.4.16 </span>Link type "<code>tag</code>"</a></li>
-       <li><a href=#hierarchical-link-types><span class=secno>4.12.4.17 </span>Hierarchical link types</a>
+       <li><a href=#rel-alternate><span class=secno>4.13.4.1 </span>Link type "<code>alternate</code>"</a></li>
+       <li><a href=#rel-archives><span class=secno>4.13.4.2 </span>Link type "<code>archives</code>"</a></li>
+       <li><a href=#link-type-author><span class=secno>4.13.4.3 </span>Link type "<code>author</code>"</a></li>
+       <li><a href=#link-type-bookmark><span class=secno>4.13.4.4 </span>Link type "<code>bookmark</code>"</a></li>
+       <li><a href=#link-type-external><span class=secno>4.13.4.5 </span>Link type "<code>external</code>"</a></li>
+       <li><a href=#link-type-help><span class=secno>4.13.4.6 </span>Link type "<code>help</code>"</a></li>
+       <li><a href=#rel-icon><span class=secno>4.13.4.7 </span>Link type "<code>icon</code>"</a></li>
+       <li><a href=#link-type-license><span class=secno>4.13.4.8 </span>Link type "<code>license</code>"</a></li>
+       <li><a href=#link-type-nofollow><span class=secno>4.13.4.9 </span>Link type "<code>nofollow</code>"</a></li>
+       <li><a href=#link-type-noreferrer><span class=secno>4.13.4.10 </span>Link type "<code>noreferrer</code>"</a></li>
+       <li><a href=#link-type-pingback><span class=secno>4.13.4.11 </span>Link type "<code>pingback</code>"</a></li>
+       <li><a href=#link-type-prefetch><span class=secno>4.13.4.12 </span>Link type "<code>prefetch</code>"</a></li>
+       <li><a href=#link-type-search><span class=secno>4.13.4.13 </span>Link type "<code>search</code>"</a></li>
+       <li><a href=#link-type-stylesheet><span class=secno>4.13.4.14 </span>Link type "<code>stylesheet</code>"</a></li>
+       <li><a href=#link-type-sidebar><span class=secno>4.13.4.15 </span>Link type "<code>sidebar</code>"</a></li>
+       <li><a href=#link-type-tag><span class=secno>4.13.4.16 </span>Link type "<code>tag</code>"</a></li>
+       <li><a href=#hierarchical-link-types><span class=secno>4.13.4.17 </span>Hierarchical link types</a>
         <ol>
-         <li><a href=#link-type-index><span class=secno>4.12.4.17.1 </span>Link type "<code>index</code>"</a></li>
-         <li><a href=#link-type-up><span class=secno>4.12.4.17.2 </span>Link type "<code>up</code>"</a></ol></li>
-       <li><a href=#sequential-link-types><span class=secno>4.12.4.18 </span>Sequential link types</a>
+         <li><a href=#link-type-index><span class=secno>4.13.4.17.1 </span>Link type "<code>index</code>"</a></li>
+         <li><a href=#link-type-up><span class=secno>4.13.4.17.2 </span>Link type "<code>up</code>"</a></ol></li>
+       <li><a href=#sequential-link-types><span class=secno>4.13.4.18 </span>Sequential link types</a>
         <ol>
-         <li><a href=#link-type-first><span class=secno>4.12.4.18.1 </span>Link type "<code>first</code>"</a></li>
-         <li><a href=#link-type-last><span class=secno>4.12.4.18.2 </span>Link type "<code>last</code>"</a></li>
-         <li><a href=#link-type-next><span class=secno>4.12.4.18.3 </span>Link type "<code>next</code>"</a></li>
-         <li><a href=#link-type-prev><span class=secno>4.12.4.18.4 </span>Link type "<code>prev</code>"</a></ol></li>
-       <li><a href=#other-link-types><span class=secno>4.12.4.19 </span>Other link types</a></ol></ol></li>
-   <li><a href=#common-idioms-without-dedicated-elements><span class=secno>4.13 </span>Common idioms without dedicated elements</a>
+         <li><a href=#link-type-first><span class=secno>4.13.4.18.1 </span>Link type "<code>first</code>"</a></li>
+         <li><a href=#link-type-last><span class=secno>4.13.4.18.2 </span>Link type "<code>last</code>"</a></li>
+         <li><a href=#link-type-next><span class=secno>4.13.4.18.3 </span>Link type "<code>next</code>"</a></li>
+         <li><a href=#link-type-prev><span class=secno>4.13.4.18.4 </span>Link type "<code>prev</code>"</a></ol></li>
+       <li><a href=#other-link-types><span class=secno>4.13.4.19 </span>Other link types</a></ol></ol></li>
+   <li><a href=#common-idioms-without-dedicated-elements><span class=secno>4.14 </span>Common idioms without dedicated elements</a>
     <ol>
-     <li><a href=#the-main-part-of-the-content><span class=secno>4.13.1 </span>The main part of the content</a></li>
-     <li><a href=#tag-clouds><span class=secno>4.13.2 </span>Tag clouds</a></li>
-     <li><a href=#conversations><span class=secno>4.13.3 </span>Conversations</a></li>
-     <li><a href=#footnotes><span class=secno>4.13.4 </span>Footnotes</a></ol></li>
-   <li><a href=#matching-html-elements-using-selectors><span class=secno>4.14 </span>Matching HTML elements using selectors</a>
+     <li><a href=#the-main-part-of-the-content><span class=secno>4.14.1 </span>The main part of the content</a></li>
+     <li><a href=#tag-clouds><span class=secno>4.14.2 </span>Tag clouds</a></li>
+     <li><a href=#conversations><span class=secno>4.14.3 </span>Conversations</a></li>
+     <li><a href=#footnotes><span class=secno>4.14.4 </span>Footnotes</a></ol></li>
+   <li><a href=#matching-html-elements-using-selectors><span class=secno>4.15 </span>Matching HTML elements using selectors</a>
     <ol>
-     <li><a href=#selectors><span class=secno>4.14.1 </span>Case-sensitivity</a></li>
-     <li><a href=#pseudo-classes><span class=secno>4.14.2 </span>Pseudo-classes</a></ol></ol></li>
+     <li><a href=#selectors><span class=secno>4.15.1 </span>Case-sensitivity</a></li>
+     <li><a href=#pseudo-classes><span class=secno>4.15.2 </span>Pseudo-classes</a></ol></ol></li>
  <li><a href=#microdata><span class=secno>5 </span>Microdata</a>
   <ol>
    <li><a href=#introduction-3><span class=secno>5.1 </span>Introduction</a>
@@ -950,37 +952,33 @@
      <li><a href=#introduction-6><span class=secno>8.5.1 </span>Introduction</a></li>
      <li><a href=#the-accesskey-attribute><span class=secno>8.5.2 </span>The <code>accesskey</code> attribute</a></li>
      <li><a href=#processing-model-3><span class=secno>8.5.3 </span>Processing model</a></ol></li>
-   <li><a href=#selection><span class=secno>8.6 </span>The text selection APIs</a>
+   <li><a href=#contenteditable><span class=secno>8.6 </span>The <code title=attr-contenteditable>contenteditable</code> attribute</a>
     <ol>
-     <li><a href=#documentSelection><span class=secno>8.6.1 </span>APIs for the browsing context selection</a></li>
-     <li><a href=#textFieldSelection><span class=secno>8.6.2 </span>APIs for the text field selections</a></ol></li>
-   <li><a href=#contenteditable><span class=secno>8.7 </span>The <code title=attr-contenteditable>contenteditable</code> attribute</a>
+     <li><a href=#user-editing-actions><span class=secno>8.6.1 </span>User editing actions</a></li>
+     <li><a href=#making-entire-documents-editable><span class=secno>8.6.2 </span>Making entire documents editable</a></ol></li>
+   <li><a href=#spelling-and-grammar-checking><span class=secno>8.7 </span>Spelling and grammar checking</a></li>
+   <li><a href=#dnd><span class=secno>8.8 </span>Drag and drop</a>
     <ol>
-     <li><a href=#user-editing-actions><span class=secno>8.7.1 </span>User editing actions</a></li>
-     <li><a href=#making-entire-documents-editable><span class=secno>8.7.2 </span>Making entire documents editable</a></ol></li>
-   <li><a href=#spelling-and-grammar-checking><span class=secno>8.8 </span>Spelling and grammar checking</a></li>
-   <li><a href=#dnd><span class=secno>8.9 </span>Drag and drop</a>
-    <ol>
-     <li><a href=#introduction-7><span class=secno>8.9.1 </span>Introduction</a></li>
-     <li><a href=#the-dragevent-and-datatransfer-interfaces><span class=secno>8.9.2 </span>The <code>DragEvent</code> and <code>DataTransfer</code> interfaces</a></li>
-     <li><a href=#dndevents><span class=secno>8.9.3 </span>Events fired during a drag-and-drop action</a></li>
-     <li><a href=#drag-and-drop-processing-model><span class=secno>8.9.4 </span>Drag-and-drop processing model</a>
+     <li><a href=#introduction-7><span class=secno>8.8.1 </span>Introduction</a></li>
+     <li><a href=#the-dragevent-and-datatransfer-interfaces><span class=secno>8.8.2 </span>The <code>DragEvent</code> and <code>DataTransfer</code> interfaces</a></li>
+     <li><a href=#dndevents><span class=secno>8.8.3 </span>Events fired during a drag-and-drop action</a></li>
+     <li><a href=#drag-and-drop-processing-model><span class=secno>8.8.4 </span>Drag-and-drop processing model</a>
       <ol>
-       <li><a href=#when-the-drag-and-drop-operation-starts-or-ends-in-another-document><span class=secno>8.9.4.1 </span>When the drag-and-drop operation starts or ends in another
+       <li><a href=#when-the-drag-and-drop-operation-starts-or-ends-in-another-document><span class=secno>8.8.4.1 </span>When the drag-and-drop operation starts or ends in another
   document</a></li>
-       <li><a href=#when-the-drag-and-drop-operation-starts-or-ends-in-another-application><span class=secno>8.9.4.2 </span>When the drag-and-drop operation starts or ends in another
+       <li><a href=#when-the-drag-and-drop-operation-starts-or-ends-in-another-application><span class=secno>8.8.4.2 </span>When the drag-and-drop operation starts or ends in another
   application</a></ol></li>
-     <li><a href=#the-draggable-attribute><span class=secno>8.9.5 </span>The <code>draggable</code> attribute</a></li>
-     <li><a href=#security-risks-in-the-drag-and-drop-model><span class=secno>8.9.6 </span>Security risks in the drag-and-drop model</a></ol></li>
-   <li><a href=#undo><span class=secno>8.10 </span>Undo history</a>
+     <li><a href=#the-draggable-attribute><span class=secno>8.8.5 </span>The <code>draggable</code> attribute</a></li>
+     <li><a href=#security-risks-in-the-drag-and-drop-model><span class=secno>8.8.6 </span>Security risks in the drag-and-drop model</a></ol></li>
+   <li><a href=#undo><span class=secno>8.9 </span>Undo history</a>
     <ol>
-     <li><a href=#definitions-2><span class=secno>8.10.1 </span>Definitions</a></li>
-     <li><a href=#the-undomanager-interface><span class=secno>8.10.2 </span>The <code>UndoManager</code> interface</a></li>
-     <li><a href=#undo:-moving-back-in-the-undo-transaction-history><span class=secno>8.10.3 </span>Undo: moving back in the undo transaction history</a></li>
-     <li><a href=#redo:-moving-forward-in-the-undo-transaction-history><span class=secno>8.10.4 </span>Redo: moving forward in the undo transaction history</a></li>
-     <li><a href=#the-undomanagerevent-interface-and-the-undo-and-redo-events><span class=secno>8.10.5 </span>The <code>UndoManagerEvent</code> interface and the <code title=event-undo>undo</code> and <code title=event-redo>redo</code> events</a></li>
-     <li><a href=#implementation-notes><span class=secno>8.10.6 </span>Implementation notes</a></ol></li>
-   <li><a href=#editing-apis><span class=secno>8.11 </span>Editing APIs</a></ol></li>
+     <li><a href=#definitions-2><span class=secno>8.9.1 </span>Definitions</a></li>
+     <li><a href=#the-undomanager-interface><span class=secno>8.9.2 </span>The <code>UndoManager</code> interface</a></li>
+     <li><a href=#undo:-moving-back-in-the-undo-transaction-history><span class=secno>8.9.3 </span>Undo: moving back in the undo transaction history</a></li>
+     <li><a href=#redo:-moving-forward-in-the-undo-transaction-history><span class=secno>8.9.4 </span>Redo: moving forward in the undo transaction history</a></li>
+     <li><a href=#the-undomanagerevent-interface-and-the-undo-and-redo-events><span class=secno>8.9.5 </span>The <code>UndoManagerEvent</code> interface and the <code title=event-undo>undo</code> and <code title=event-redo>redo</code> events</a></li>
+     <li><a href=#implementation-notes><span class=secno>8.9.6 </span>Implementation notes</a></ol></li>
+   <li><a href=#editing-apis><span class=secno>8.10 </span>Editing APIs</a></ol></li>
  <li><a href=#workers><span class=secno>9 </span>Web workers</a>
   <ol>
    <li><a href=#introduction-8><span class=secno>9.1 </span>Introduction</a>
@@ -8078,7 +8076,6 @@
 
   // <a href=#editing>user interaction</a>
   readonly attribute <a href=#windowproxy>WindowProxy</a> <a href=#dom-document-defaultview title=dom-document-defaultView>defaultView</a>;
-  <a href=#selection-0>Selection</a> <a href=#dom-document-getselection title=dom-document-getSelection>getSelection</a>();
   readonly attribute <a href=#element>Element</a> <a href=#dom-document-activeelement title=dom-document-activeElement>activeElement</a>;
   boolean <a href=#dom-document-hasfocus title=dom-document-hasFocus>hasFocus</a>();
            attribute DOMString <a href=#designMode title=dom-document-designMode>designMode</a>;
@@ -11510,12 +11507,13 @@
    <li><p>Replace the <code><a href=#document>Document</a></code>'s singleton objects with
    new instances of those objects. (This includes in particular the
    <code><a href=#window>Window</a></code>, <code><a href=#location>Location</a></code>, <code><a href=#history-0>History</a></code>,
-   <code><a href=#applicationcache>ApplicationCache</a></code>, <code><a href=#undomanager>UndoManager</a></code>,
-   <code><a href=#navigator>Navigator</a></code>, and <code><a href=#selection-0>Selection</a></code> objects, the
-   various <code><a href=#barprop>BarProp</a></code> objects, the two <code><a href=#storage-0>Storage</a></code>
-   objects, and the various <code><a href=#htmlcollection>HTMLCollection</a></code> objects. It
-   also includes all the Web IDL prototypes in the JavaScript binding,
-   including the <code><a href=#document>Document</a></code> object's prototype.)</li>
+   <code><a href=#applicationcache>ApplicationCache</a></code>, <code><a href=#undomanager>UndoManager</a></code>, and
+   <code><a href=#navigator>Navigator</a></code>, objects, the various <code><a href=#barprop>BarProp</a></code>
+   objects, the two <code><a href=#storage-0>Storage</a></code> objects, the various
+   <code><a href=#htmlcollection>HTMLCollection</a></code> objects, and objects defined by other
+   specifications, like <code>Selection</code>. It also includes all
+   the Web IDL prototypes in the JavaScript binding, including the
+   <code><a href=#document>Document</a></code> object's prototype.)</li>
 
    <!-- http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E...%3Ciframe%20src%3D%22document%22%3E%3C%2Fiframe%3E%0A%3Cscript%3Eonload%20%3D%20function%20()%20%7B%20f%20%3D%20document.getElementsByTagName('iframe')%5B0%5D%3B%20d%20%3D%20f.contentWindow.document%3B%20%7D%3C%2Fscript%3E%0A%3Cinput%20type%3Dbutton%20onclick%3D%22w(d.documentElement.innerHTML)%22%20value%3D%22dump%22%3E%0A%3Cinput%20type%3Dbutton%20onclick%3D%22d.open()%3B%20d.write('%3Cscript%3Evar%20x%20%3D%20new%20XMLHttpRequest()%3Bx.open(%26quot%3BGET%26quot%3B%2C%20%26quot%3BGET%26quot%3B)%3Bx.onreadystatechange%3Dfunction()%20%7B%20alert(x.readyState)%3B%20%7D%3Bx.send(null)%3B%3C%2Fscript%3E')%3Bd.close()%3B%20setTimeout(function()%20%7B%20d.open()%3B%20d.write('%3Cp%3Etest%3C%2Fp%3E')%3B%20d.close()%20%7D%2C%200)%3B%22%20value%3D%22xhr%22%3E%0A%3Cinput%20type%3Dbutton%20onclick%3D%22d.onclick%20%3D%20function()%20%7B%20w('click')%20%7D%22%20value%3D%22add%20click%20handler%22%3E%
 0A%3Cinput%20type%3Dbutton%20onclick%3D%22d.open()%3B%20d.write('%3Cp%3Etest%3C%2Fp%3E')%3B%20d.close()%22%20value%3D%22replace%22%3E%0A%3Cinput%20type%3Dbutton%20onclick%3D%22d.open()%3B%20d.write('%3Cp%3E%3Cscript%3Ei%20%3D%200%3B%20setTimeout(%26quot%3Bparent.w(i%2B%2B)%26quot%3B%2C%202000)%3C%2Fscript%3E%3C%2Fp%3E')%3B%20d.close()%22%20value%3D%22replace%20with%20timer%22%3E -->
    <!-- http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%0D%0A...%3Ciframe%3E%3C%2Fiframe%3E%0D%0A%3Cscript%3E%0D%0Aonload%20%3D%20function%20()%20%7B%0D%0A%20frames%5B0%5D.test%20%3D%201%0D%0A%20w(frames%5B0%5D.test)%3B%0D%0A%20var%20a%20%3D%20frames%5B0%5D.document.location.assign%3B%0D%0A%20w(a)%3B%0D%0A%20w(frames%5B0%5D.document.location.assign%20%3D%3D%3D%20a)%3B%0D%0A%20frames%5B0%5D.document.open()%3B%0D%0A%20frames%5B0%5D.document.write('%3Cscript%3Edocument.write(test)%3C%5C%2Fscript%3E')%3B%0D%0A%20frames%5B0%5D.document.close()%3B%0D%0A%20w(frames%5B0%5D.test)%3B%0D%0A%20w(frames%5B0%5D.document.location.assign%20%3D%3D%3D%20a)%3B%0D%0A%7D%0D%0A%3C%2Fscript%3E -->
@@ -46058,10 +46056,134 @@
 
 
 
-  <h4 id=constraints><span class=secno>4.10.20 </span>Constraints</h4>
+  <h3 id=textFieldSelection><span class=secno>4.11 </span>APIs for the text field selections</h3>
 
-  <h5 id=definitions><span class=secno>4.10.20.1 </span>Definitions</h5>
+  <!-- v2 idea: DOM Range APIs to expose the textarea/input edited
+  value (ack martijnw) -->
 
+  <p>The <code><a href=#the-input-element>input</a></code> and <code><a href=#the-textarea-element>textarea</a></code> elements define
+  the following members in their DOM interfaces for handling their
+  selection:</p>
+
+  <pre class="idl extract">  void <a href=#dom-textarea/input-select title=dom-textarea/input-select>select</a>();
+           attribute unsigned long <a href=#dom-textarea/input-selectionstart title=dom-textarea/input-selectionStart>selectionStart</a>;
+           attribute unsigned long <a href=#dom-textarea/input-selectionend title=dom-textarea/input-selectionEnd>selectionEnd</a>;
+  void <a href=#dom-textarea/input-setselectionrange title=dom-textarea/input-setSelectionRange>setSelectionRange</a>(in unsigned long start, in unsigned long end);</pre>
+  <!-- v2: also add textLength? it seems to be widely used -->
+
+  <p>These methods and attributes expose and control the selection of
+  <code><a href=#the-input-element>input</a></code> and <code><a href=#the-textarea-element>textarea</a></code> text fields.</p>
+
+  <dl class=domintro><dt><var title="">element</var> . <code title=dom-textarea/input-select><a href=#dom-textarea/input-select>select</a></code>()</dt>
+
+   <dd>
+
+    <p>Selects everything in the text field.</p>
+
+   </dd>
+
+   <dt><var title="">element</var> . <code title=dom-textarea/input-selecionStart>selectionStart</code> [ = <var title="">value</var> ]</dt>
+
+   <dd>
+
+    <p>Returns the offset to the start of the selection.</p>
+
+    <p>Can be set, to change the start of the selection.</p>
+
+   </dd>
+
+   <dt><var title="">element</var> . <code title=dom-textarea/input-selecionEnd>selectionEnd</code> [ = <var title="">value</var> ]</dt>
+
+   <dd>
+
+    <p>Returns the offset to the end of the selection.</p>
+
+    <p>Can be set, to change the end of the selection.</p>
+
+   </dd>
+
+   <dt><var title="">element</var> . <code title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-setselectionrange>setSelectionRange</a></code>(<var title="">start</var>, <var title="">end</var>)</dt>
+
+   <dd>
+
+    <p>Changes the selection to cover the given substring.</p>
+
+   </dd>
+
+  </dl><div class=impl>
+
+  <p>When these methods and attributes are used with
+  <code><a href=#the-input-element>input</a></code> elements while they don't apply, they must raise
+  an <code><a href=#invalid_state_err>INVALID_STATE_ERR</a></code> exception. Otherwise, they must
+  act as described below.</p>
+
+  <p>The <dfn id=dom-textarea/input-select 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 id=dom-textarea/input-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>
+
+  <p>On setting, it must act as if the <code title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-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=#dom-textarea/input-selectionend>selectionEnd</a></code>
+  attribute as the second argument, unless the current value of the
+  <code title=dom-textarea/input-selectionEnd><a href=#dom-textarea/input-selectionend>selectionEnd</a></code> is
+  less than the new value, in which case the second argument must also
+  be the new value.</p>
+
+  <p>The <dfn id=dom-textarea/input-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>
+
+  <p>On setting, it must act as if the <code title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-setselectionrange>setSelectionRange()</a></code>
+  method had been called, with the current value of the <code title=dom-textarea/input-selectionStart><a href=#dom-textarea/input-selectionstart>selectionStart</a></code>
+  attribute as the first argument, and new value as the second
+  argument.</p>
+
+  <p>The <dfn id=dom-textarea/input-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 title="">(<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>
+
+  <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><a href=#the-input-element>input</a></code>
+   or <code><a href=#the-textarea-element>textarea</a></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>
+
+
+
+  <h4 id=constraints><span class=secno>4.11.1 </span>Constraints</h4>
+
+  <h5 id=definitions><span class=secno>4.11.1.1 </span>Definitions</h5>
+
   <div class=impl>
 
   <p>A <a href=#category-listed title=category-listed>listed form-associated
@@ -46148,7 +46270,7 @@
 
   <div class=impl>
 
-  <h5 id=constraint-validation><span class=secno>4.10.20.2 </span>Constraint validation</h5>
+  <h5 id=constraint-validation><span class=secno>4.11.1.2 </span>Constraint validation</h5>
 
   <p>When the user agent is required to <dfn id=statically-validate-the-constraints>statically validate the
   constraints</dfn> of <code><a href=#the-form-element>form</a></code> element <var title="">form</var>, it must run the following steps, which return
@@ -46232,7 +46354,7 @@
 
 
 
-  <h5 id=the-constraint-validation-api><span class=secno>4.10.20.3 </span>The <dfn>constraint validation API</dfn></h5>
+  <h5 id=the-constraint-validation-api><span class=secno>4.11.1.3 </span>The <dfn>constraint validation API</dfn></h5>
 
   <dl class=domintro><dt><var title="">element</var> . <code title=dom-cva-willValidate><a href=#dom-cva-willvalidate>willValidate</a></code></dt>
 
@@ -46463,7 +46585,7 @@
   </div>
 
 
-  <h5 id=security-forms><span class=secno>4.10.20.4 </span>Security</h5>
+  <h5 id=security-forms><span class=secno>4.11.1.4 </span>Security</h5>
 
   <p id=security-0>Servers should not rely on client-side
   validation. Client-side validation can be intentionally bypassed by
@@ -46475,11 +46597,11 @@
 
 
 
-  <h4 id=form-submission><span class=secno>4.10.21 </span><dfn>Form submission</dfn></h4>
+  <h4 id=form-submission><span class=secno>4.11.2 </span><dfn>Form submission</dfn></h4>
 
   <div class=impl>
 
-  <h5 id=introduction-1><span class=secno>4.10.21.1 </span>Introduction</h5>
+  <h5 id=introduction-1><span class=secno>4.11.2.1 </span>Introduction</h5>
 
   </div>
 
@@ -46527,7 +46649,7 @@
 
   <div class=impl>
 
-  <h5 id=implicit-submission><span class=secno>4.10.21.2 </span>Implicit submission</h5>
+  <h5 id=implicit-submission><span class=secno>4.11.2.2 </span>Implicit submission</h5>
 
   <p>User agents may establish a <a href=#concept-button title=concept-button>button</a> in each form as being the
   form's <dfn id=default-button>default button</dfn>. This should be the first <a href=#concept-submit-button title=concept-submit-button>submit button</a> in <a href=#tree-order>tree
@@ -46556,7 +46678,7 @@
 
   <div class=impl>
 
-  <h5 id=form-submission-algorithm><span class=secno>4.10.21.3 </span>Form submission algorithm</h5>
+  <h5 id=form-submission-algorithm><span class=secno>4.11.2.3 </span>Form submission algorithm</h5>
 
   <p>When a <code><a href=#the-form-element>form</a></code> element <var title="">form</var> is <dfn id=concept-form-submit title=concept-form-submit>submitted</dfn> from an element <var title="">submitter</var> (typically a button), optionally with a
   <var title="">scripted-submit</var> flag set, the user agent must
@@ -47028,7 +47150,7 @@
 
   <div class=impl>
 
-  <h5 id=url-encoded-form-data><span class=secno>4.10.21.4 </span>URL-encoded form data</h5>
+  <h5 id=url-encoded-form-data><span class=secno>4.11.2.4 </span>URL-encoded form data</h5>
 
   <p>The <dfn id=application/x-www-form-urlencoded-encoding-algorithm><code title="">application/x-www-form-urlencoded</code> encoding
   algorithm</dfn> is as follows:</p>
@@ -47163,7 +47285,7 @@
 
   <div class=impl>
 
-  <h5 id=multipart-form-data><span class=secno>4.10.21.5 </span>Multipart form data</h5>
+  <h5 id=multipart-form-data><span class=secno>4.11.2.5 </span>Multipart form data</h5>
 
   <!-- http://hixie.ch/tests/adhoc/html/forms/submission/multipart_form-data/ -->
 
@@ -47250,7 +47372,7 @@
 
   <div class=impl>
 
-  <h5 id=plain-text-form-data><span class=secno>4.10.21.6 </span>Plain text form data</h5>
+  <h5 id=plain-text-form-data><span class=secno>4.11.2.6 </span>Plain text form data</h5>
 
   <p>The <dfn id=text/plain-encoding-algorithm><code title="">text/plain</code> encoding
   algorithm</dfn> is as follows:</p>
@@ -47308,7 +47430,7 @@
 
   <div class=impl>
 
-  <h4 id=resetting-a-form><span class=secno>4.10.22 </span>Resetting a form</h4>
+  <h4 id=resetting-a-form><span class=secno>4.11.3 </span>Resetting a form</h4>
 
   <p>When a <code><a href=#the-form-element>form</a></code> element <var title="">form</var> is <dfn id=concept-form-reset title=concept-form-reset>reset</dfn>, the user agent must
   <a href=#fire-a-simple-event>fire a simple event</a> named <code title=event-reset>reset</code>, that is cancelable, at <var title="">form</var>, and then, if that event is not canceled, must
@@ -47329,7 +47451,7 @@
 
   <div class=impl>
 
-  <h4 id=event-dispatch><span class=secno>4.10.23 </span>Event dispatch</h4>
+  <h4 id=event-dispatch><span class=secno>4.11.4 </span>Event dispatch</h4>
 
   <p>When the user agent is to <dfn id=broadcast-forminput-events>broadcast <code title=event-forminput>forminput</code> events</dfn> or
   <dfn id=broadcast-formchange-events>broadcast <code title=event-formchange>formchange</code>
@@ -47348,9 +47470,9 @@
   </ol></div>
 
 
-  <h3 id=interactive-elements><span class=secno>4.11 </span>Interactive elements</h3>
+  <h3 id=interactive-elements><span class=secno>4.12 </span>Interactive elements</h3>
 
-  <h4 id=the-details-element><span class=secno>4.11.1 </span>The <dfn><code>details</code></dfn> element</h4>
+  <h4 id=the-details-element><span class=secno>4.12.1 </span>The <dfn><code>details</code></dfn> element</h4>
 
   <dl class=element><dt>Categories</dt>
    <dd><a href=#flow-content>Flow content</a>.</dd>
@@ -47451,7 +47573,7 @@
   </div>
 
 
-  <h4 id=the-summary-element><span class=secno>4.11.2 </span>The <dfn><code>summary</code></dfn> element</h4>
+  <h4 id=the-summary-element><span class=secno>4.12.2 </span>The <dfn><code>summary</code></dfn> element</h4>
 
   <dl class=element><dt>Categories</dt>
    <dd>None.</dd>
@@ -50074,7 +50196,7 @@
 
 -->
 
-  <h4 id=the-command><span class=secno>4.11.3 </span>The <dfn><code>command</code></dfn> element</h4>
+  <h4 id=the-command><span class=secno>4.12.3 </span>The <dfn><code>command</code></dfn> element</h4>
 
   <dl class=element><dt>Categories</dt>
    <dd><a href=#metadata-content>Metadata content</a>.</dd>
@@ -50298,7 +50420,7 @@
 
 
 
-  <h4 id=menus><span class=secno>4.11.4 </span>The <dfn><code>menu</code></dfn> element</h4>
+  <h4 id=menus><span class=secno>4.12.4 </span>The <dfn><code>menu</code></dfn> element</h4>
 
   <dl class=element><dt>Categories</dt>
    <dd><a href=#flow-content>Flow content</a>.</dd>
@@ -50366,7 +50488,7 @@
 
 
 
-  <h5 id=menus-intro><span class=secno>4.11.4.1 </span>Introduction</h5>
+  <h5 id=menus-intro><span class=secno>4.12.4.1 </span>Introduction</h5>
 
   <p><i>This section is non-normative.</i></p>
 
@@ -50441,7 +50563,7 @@
 
   <div class=impl>
 
-  <h5 id=building-menus-and-toolbars><span class=secno>4.11.4.2 </span><dfn>Building menus and toolbars</dfn></h5>
+  <h5 id=building-menus-and-toolbars><span class=secno>4.12.4.2 </span><dfn>Building menus and toolbars</dfn></h5>
 
   <p>A menu (or toolbar) consists of a list of zero or more of the
   following components:</p>
@@ -50526,7 +50648,7 @@
 
 
 
-  <h5 id=context-menus><span class=secno>4.11.4.3 </span><dfn>Context menus</dfn></h5>
+  <h5 id=context-menus><span class=secno>4.12.4.3 </span><dfn>Context menus</dfn></h5>
 
   <p>The <dfn id=attr-contextmenu title=attr-contextmenu><code>contextmenu</code></dfn>
   attribute gives the element's <a href=#context-menus title="context menus">context
@@ -50633,7 +50755,7 @@
 
   <div class=impl>
 
-  <h5 id=toolbars><span class=secno>4.11.4.4 </span><dfn>Toolbars</dfn></h5>
+  <h5 id=toolbars><span class=secno>4.12.4.4 </span><dfn>Toolbars</dfn></h5>
 
   <p>When a <code><a href=#menus>menu</a></code> element has a <code title=attr-menu-type><a href=#attr-menu-type>type</a></code> attribute in the <a href=#toolbar-state title="toolbar state">toolbar</a> state, then the user agent
   must <a href=#building-menus-and-toolbars title="building menus and toolbars">build</a> the
@@ -50648,7 +50770,7 @@
 
 
 
-  <h4 id=commands><span class=secno>4.11.5 </span>Commands</h4>
+  <h4 id=commands><span class=secno>4.12.5 </span>Commands</h4>
 
   <p>A <dfn id=concept-command title=concept-command>command</dfn> is the abstraction
   behind menu items, buttons, and links.<!--v2COMMAND: Once a command
@@ -50900,7 +51022,7 @@
 
   <div class=impl>
 
-  <h5 id=using-the-a-element-to-define-a-command><span class=secno>4.11.5.1 </span><dfn title=a-command>Using the <code>a</code> element to define a command</dfn></h5>
+  <h5 id=using-the-a-element-to-define-a-command><span class=secno>4.12.5.1 </span><dfn title=a-command>Using the <code>a</code> element to define a command</dfn></h5>
 
   <p>An <code><a href=#the-a-element>a</a></code> element with an <code title=attr-hyperlink-href><a href=#attr-hyperlink-href>href</a></code> attribute <a href=#concept-command title=concept-command>defines a command</a>.</p>
 
@@ -50946,7 +51068,7 @@
   command is to <a href=#fire-a-click-event title="fire a click event">fire a <code title=event-click>click</code> event</a> at the element.</p>
 
 
-  <h5 id=using-the-button-element-to-define-a-command><span class=secno>4.11.5.2 </span><dfn title=button-command>Using the <code>button</code> element to define a command</dfn></h5>
+  <h5 id=using-the-button-element-to-define-a-command><span class=secno>4.12.5.2 </span><dfn title=button-command>Using the <code>button</code> element to define a command</dfn></h5>
 
   <p>A <code><a href=#the-button-element>button</a></code> element always <a href=#concept-command title=concept-command>defines a command</a>.</p>
 
@@ -50958,7 +51080,7 @@
   State</a> of the command mirrors the <a href=#concept-fe-disabled title=concept-fe-disabled>disabled</a> state of the button.</p>
 
 
-  <h5 id=using-the-input-element-to-define-a-command><span class=secno>4.11.5.3 </span><dfn title=input-command>Using the <code>input</code> element to define a command</dfn></h5>
+  <h5 id=using-the-input-element-to-define-a-command><span class=secno>4.12.5.3 </span><dfn title=input-command>Using the <code>input</code> element to define a command</dfn></h5>
 
   <p>An <code><a href=#the-input-element>input</a></code> element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in one of the <a href=#submit-button-state title=attr-input-type-submit>Submit Button</a>, <a href=#reset-button-state title=attr-input-type-reset>Reset Button</a>, <a href=#image-button-state title=attr-input-type-image>Image Button</a>, <a href=#button-state title=attr-input-type-button>Button</a>, <a href=#radio-button-state title=attr-input-type-radio>Radio Button</a>, or <a href=#checkbox-state title=attr-input-type-checkbox>Checkbox</a> states <a href=#concept-command title=concept-command>defines a command</a>.</p>
 
@@ -51029,7 +51151,7 @@
   element.</p>
 
 
-  <h5 id=using-the-option-element-to-define-a-command><span class=secno>4.11.5.4 </span><dfn title=option-command>Using the <code>option</code> element to define a command</dfn></h5>
+  <h5 id=using-the-option-element-to-define-a-command><span class=secno>4.12.5.4 </span><dfn title=option-command>Using the <code>option</code> element to define a command</dfn></h5>
 
   <p>An <code><a href=#the-option-element>option</a></code> element with an ancestor
   <code><a href=#the-select-element>select</a></code> element and either no <code title=attr-option-value><a href=#attr-option-value>value</a></code> attribute or a <code title=attr-option-value><a href=#attr-option-value>value</a></code> attribute that is not the
@@ -51082,7 +51204,7 @@
   element.</p>
 
 
-  <h5 id=using-the-command-element-to-define-a-command><span class=secno>4.11.5.5 </span>Using the <dfn title=command-element><code>command</code></dfn> element to define
+  <h5 id=using-the-command-element-to-define-a-command><span class=secno>4.12.5.5 </span>Using the <dfn title=command-element><code>command</code></dfn> element to define
   a command</h5>
 
   <p>A <code><a href=#the-command>command</a></code> element <a href=#concept-command title=concept-command>defines a command</a>.</p>
@@ -51139,7 +51261,7 @@
 
 
 
-  <h5 id=using-the-accesskey-attribute-on-a-label-element-to-define-a-command><span class=secno>4.11.5.6 </span><dfn title=label-command>Using the <code title=attr-accesskey>accesskey</code> attribute on a <code>label</code> element to define a command</dfn></h5>
+  <h5 id=using-the-accesskey-attribute-on-a-label-element-to-define-a-command><span class=secno>4.12.5.6 </span><dfn title=label-command>Using the <code title=attr-accesskey>accesskey</code> attribute on a <code>label</code> element to define a command</dfn></h5>
 
   <p>A <code><a href=#the-label-element>label</a></code> element that has an <a href=#assigned-access-key>assigned access
   key</a> and a <a href=#labeled-control>labeled control</a> and whose
@@ -51180,7 +51302,7 @@
 
 
 
-  <h5 id=using-the-accesskey-attribute-on-a-legend-element-to-define-a-command><span class=secno>4.11.5.7 </span><dfn title=legend-command>Using the <code title=attr-accesskey>accesskey</code> attribute on a <code>legend</code> element to define a command</dfn></h5>
+  <h5 id=using-the-accesskey-attribute-on-a-legend-element-to-define-a-command><span class=secno>4.12.5.7 </span><dfn title=legend-command>Using the <code title=attr-accesskey>accesskey</code> attribute on a <code>legend</code> element to define a command</dfn></h5>
 
   <p>A <code><a href=#the-legend-element>legend</a></code> element that has an <a href=#assigned-access-key>assigned access
   key</a> and is a child of a <code><a href=#the-fieldset-element>fieldset</a></code> element that
@@ -51224,7 +51346,7 @@
 
 
 
-  <h5 id=using-the-accesskey-attribute-to-define-a-command-on-other-elements><span class=secno>4.11.5.8 </span><dfn title=accesskey-command>Using the <code title=attr-accesskey>accesskey</code> attribute to define a command on other elements</dfn></h5>
+  <h5 id=using-the-accesskey-attribute-to-define-a-command-on-other-elements><span class=secno>4.12.5.8 </span><dfn title=accesskey-command>Using the <code title=attr-accesskey>accesskey</code> attribute to define a command on other elements</dfn></h5>
 
   <p>An element that has an <a href=#assigned-access-key>assigned access key</a> <a href=#concept-command title=concept-command>defines a command</a>.</p>
 
@@ -51291,7 +51413,7 @@
 <div data-component="other Hixie drafts (editor: Ian Hickson)">
 
 
-  <h4 id=devices><span class=secno>4.11.6 </span>The <dfn><code>device</code></dfn> element</h4>
+  <h4 id=devices><span class=secno>4.12.6 </span>The <dfn><code>device</code></dfn> element</h4>
 
   <dl class=element><dt>Categories</dt>
    <dd><a href=#flow-content>Flow content</a>.</dd>
@@ -51365,7 +51487,7 @@
   </div>
 
 
-  <h5 id=stream-api><span class=secno>4.11.6.1 </span>Stream API</h5>
+  <h5 id=stream-api><span class=secno>4.12.6.1 </span>Stream API</h5>
 
   <p>The <code><a href=#stream>Stream</a></code> interface is used to represent
   streams.</p>
@@ -51405,7 +51527,7 @@
   <p class=XXX>This again will be pinned down to a specific codec.</p>
 
 
-  <h5 id=peer-to-peer-connections><span class=secno>4.11.6.2 </span>Peer-to-peer connections</h5>
+  <h5 id=peer-to-peer-connections><span class=secno>4.12.6.2 </span>Peer-to-peer connections</h5>
 
   <p class=XXX>This section will be moved to a more appropriate
   location in due course; it is here currently to keep it near the
@@ -51511,9 +51633,9 @@
 
 
 
-  <h3 id=links><span class=secno>4.12 </span>Links</h3>
+  <h3 id=links><span class=secno>4.13 </span>Links</h3>
 
-  <h4 id=introduction-2><span class=secno>4.12.1 </span>Introduction</h4>
+  <h4 id=introduction-2><span class=secno>4.13.1 </span>Introduction</h4>
 
   <p>Links are a conceptual construct, created by <code><a href=#the-a-element>a</a></code>,
   <code><a href=#the-area-element>area</a></code>, and <code><a href=#the-link-element>link</a></code> elements, that <a href=#represents title=represents>represent</a> a connection between two
@@ -51558,7 +51680,7 @@
   the processing semantics of that hyperlink.</p>
 
 
-  <h4 id=links-created-by-a-and-area-elements><span class=secno>4.12.2 </span>Links created by <code><a href=#the-a-element>a</a></code> and <code><a href=#the-area-element>area</a></code> elements</h4>
+  <h4 id=links-created-by-a-and-area-elements><span class=secno>4.13.2 </span>Links created by <code><a href=#the-a-element>a</a></code> and <code><a href=#the-area-element>area</a></code> elements</h4>
 
   <p>The <dfn id=attr-hyperlink-href title=attr-hyperlink-href><code>href</code></dfn>
   attribute on <code><a href=#the-a-element>a</a></code> and <code><a href=#the-area-element>area</a></code> elements must have
@@ -51626,7 +51748,7 @@
 
   <div class=impl>
 
-  <h4 id=following-hyperlinks><span class=secno>4.12.3 </span><dfn>Following hyperlinks</dfn></h4>
+  <h4 id=following-hyperlinks><span class=secno>4.13.3 </span><dfn>Following hyperlinks</dfn></h4>
 
   <p>When a user <em>follows a hyperlink</em> created by an element,
   the user agent must <a href=#resolve-a-url title="resolve a url">resolve</a> the
@@ -51688,7 +51810,7 @@
 <!--PING-->
   <div class=impl>
 
-  <h5 id=hyperlink-auditing><span class=secno>4.12.3.1 </span><dfn>Hyperlink auditing</dfn></h5>
+  <h5 id=hyperlink-auditing><span class=secno>4.13.3.1 </span><dfn>Hyperlink auditing</dfn></h5>
 
   <p>If a <a href=#hyperlink>hyperlink</a> created by an <code><a href=#the-a-element>a</a></code> or
   <code><a href=#the-area-element>area</a></code> element has a <code title=attr-hyperlink-ping><a href=#ping>ping</a></code> attribute, and the user
@@ -51810,7 +51932,7 @@
 
 
 
-  <h4 id=linkTypes><span class=secno>4.12.4 </span>Link types</h4>
+  <h4 id=linkTypes><span class=secno>4.13.4 </span>Link types</h4>
 
   <p>The following table summarizes the link types that are defined by
   this specification. This table is non-normative; the actual
@@ -51958,7 +52080,7 @@
   -->
 
 
-  <h5 id=rel-alternate><span class=secno>4.12.4.1 </span>Link type "<dfn title=rel-alternate><code>alternate</code></dfn>"</h5>
+  <h5 id=rel-alternate><span class=secno>4.13.4.1 </span>Link type "<dfn title=rel-alternate><code>alternate</code></dfn>"</h5>
 
   <p>The <code title=rel-alternate><a href=#rel-alternate>alternate</a></code> keyword may be
   used with <code><a href=#the-link-element>link</a></code>, <code><a href=#the-a-element>a</a></code>, and <code><a href=#the-area-element>area</a></code>
@@ -52062,7 +52184,7 @@
 
    </dd>
 
-  </dl><h5 id=rel-archives><span class=secno>4.12.4.2 </span>Link type "<dfn title=rel-archives><code>archives</code></dfn>"</h5>
+  </dl><h5 id=rel-archives><span class=secno>4.13.4.2 </span>Link type "<dfn title=rel-archives><code>archives</code></dfn>"</h5>
 
   <p>The <code title=rel-archives><a href=#rel-archives>archives</a></code> keyword may be
   used with <code><a href=#the-link-element>link</a></code>, <code><a href=#the-a-element>a</a></code>, and <code><a href=#the-area-element>area</a></code>
@@ -52084,7 +52206,7 @@
   </div>
 
 
-  <h5 id=link-type-author><span class=secno>4.12.4.3 </span>Link type "<dfn title=rel-author><code>author</code></dfn>"</h5>
+  <h5 id=link-type-author><span class=secno>4.13.4.3 </span>Link type "<dfn title=rel-author><code>author</code></dfn>"</h5>
 
   <p>The <code title=rel-author><a href=#link-type-author>author</a></code> keyword may be
   used with <code><a href=#the-link-element>link</a></code>, <code><a href=#the-a-element>a</a></code>, and <code><a href=#the-area-element>area</a></code>
@@ -52115,7 +52237,7 @@
   </div>
 
 
-  <h5 id=link-type-bookmark><span class=secno>4.12.4.4 </span>Link type "<dfn title=rel-bookmark><code>bookmark</code></dfn>"</h5>
+  <h5 id=link-type-bookmark><span class=secno>4.13.4.4 </span>Link type "<dfn title=rel-bookmark><code>bookmark</code></dfn>"</h5>
 
   <p>The <code title=rel-bookmark><a href=#link-type-bookmark>bookmark</a></code> keyword may be
   used with <code><a href=#the-a-element>a</a></code> and <code><a href=#the-area-element>area</a></code> elements. This
@@ -52182,7 +52304,7 @@
 -->
 
 
-  <h5 id=link-type-external><span class=secno>4.12.4.5 </span>Link type "<dfn title=rel-external><code>external</code></dfn>"</h5>
+  <h5 id=link-type-external><span class=secno>4.13.4.5 </span>Link type "<dfn title=rel-external><code>external</code></dfn>"</h5>
 
   <p>The <code title=rel-external><a href=#link-type-external>external</a></code> keyword may be
   used with <code><a href=#the-a-element>a</a></code> and <code><a href=#the-area-element>area</a></code> elements. This
@@ -52193,7 +52315,7 @@
   that the current document forms a part of.</p>
 
 
-  <h5 id=link-type-help><span class=secno>4.12.4.6 </span>Link type "<dfn title=rel-help><code>help</code></dfn>"</h5>
+  <h5 id=link-type-help><span class=secno>4.13.4.6 </span>Link type "<dfn title=rel-help><code>help</code></dfn>"</h5>
 
   <p>The <code title=rel-help><a href=#link-type-help>help</a></code> keyword may be used with
   <code><a href=#the-link-element>link</a></code>, <code><a href=#the-a-element>a</a></code>, and <code><a href=#the-area-element>area</a></code>
@@ -52218,7 +52340,7 @@
   document provides help for the page as a whole.</p>
 
 
-  <h5 id=rel-icon><span class=secno>4.12.4.7 </span>Link type "<dfn title=rel-icon><code>icon</code></dfn>"</h5>
+  <h5 id=rel-icon><span class=secno>4.13.4.7 </span>Link type "<dfn title=rel-icon><code>icon</code></dfn>"</h5>
 
   <p>The <code title=rel-icon><a href=#rel-icon>icon</a></code> keyword may be used with
   <code><a href=#the-link-element>link</a></code> elements. This keyword creates an <a href=#external-resource-link title="external resource link">external resource link</a>.</p>
@@ -52347,7 +52469,7 @@
   </div>
 
 
-  <h5 id=link-type-license><span class=secno>4.12.4.8 </span>Link type "<dfn title=rel-license><code>license</code></dfn>"</h5>
+  <h5 id=link-type-license><span class=secno>4.13.4.8 </span>Link type "<dfn title=rel-license><code>license</code></dfn>"</h5>
 
   <p>The <code title=rel-license><a href=#link-type-license>license</a></code> keyword may be used
   with <code><a href=#the-link-element>link</a></code>, <code><a href=#the-a-element>a</a></code>, and <code><a href=#the-area-element>area</a></code>
@@ -52413,7 +52535,7 @@
   </div>
 
 
-  <h5 id=link-type-nofollow><span class=secno>4.12.4.9 </span>Link type "<dfn title=rel-nofollow><code>nofollow</code></dfn>"</h5>
+  <h5 id=link-type-nofollow><span class=secno>4.13.4.9 </span>Link type "<dfn title=rel-nofollow><code>nofollow</code></dfn>"</h5>
 
   <p>The <code title=rel-nofollow><a href=#link-type-nofollow>nofollow</a></code> keyword may be
   used with <code><a href=#the-a-element>a</a></code> and <code><a href=#the-area-element>area</a></code> elements. This
@@ -52428,7 +52550,7 @@
   affiliated with the two pages.</p>
 
 
-  <h5 id=link-type-noreferrer><span class=secno>4.12.4.10 </span>Link type "<dfn title=rel-noreferrer><code>noreferrer</code></dfn>"</h5>
+  <h5 id=link-type-noreferrer><span class=secno>4.13.4.10 </span>Link type "<dfn title=rel-noreferrer><code>noreferrer</code></dfn>"</h5>
 
   <p>The <code title=rel-noreferrer><a href=#link-type-noreferrer>noreferrer</a></code> keyword may be
   used with <code><a href=#the-a-element>a</a></code> and <code><a href=#the-area-element>area</a></code> elements. This
@@ -52456,7 +52578,7 @@
   e.g. letting <img> or CSS or <video> hide the referrer -->
 
 
-  <h5 id=link-type-pingback><span class=secno>4.12.4.11 </span>Link type "<dfn title=rel-pingback><code>pingback</code></dfn>"</h5>
+  <h5 id=link-type-pingback><span class=secno>4.13.4.11 </span>Link type "<dfn title=rel-pingback><code>pingback</code></dfn>"</h5>
 
   <p>The <code title=rel-pingback><a href=#link-type-pingback>pingback</a></code> keyword may be
   used with <code><a href=#the-link-element>link</a></code> elements. This keyword creates an <a href=#external-resource-link title="external resource link">external resource link</a>.</p>
@@ -52465,7 +52587,7 @@
   specification. <a href=#refsPINGBACK>[PINGBACK]</a></p>
 
 
-  <h5 id=link-type-prefetch><span class=secno>4.12.4.12 </span>Link type "<dfn title=rel-prefetch><code>prefetch</code></dfn>"</h5>
+  <h5 id=link-type-prefetch><span class=secno>4.13.4.12 </span>Link type "<dfn title=rel-prefetch><code>prefetch</code></dfn>"</h5>
 
   <p>The <code title=rel-prefetch><a href=#link-type-prefetch>prefetch</a></code> keyword may be
   used with <code><a href=#the-link-element>link</a></code>, <code><a href=#the-a-element>a</a></code>, and <code><a href=#the-area-element>area</a></code>
@@ -52480,7 +52602,7 @@
   <p>There is no default type for resources given by the <code title=rel-prefetch><a href=#link-type-prefetch>prefetch</a></code> keyword.</p>
 
 
-  <h5 id=link-type-search><span class=secno>4.12.4.13 </span>Link type "<dfn title=rel-search><code>search</code></dfn>"</h5>
+  <h5 id=link-type-search><span class=secno>4.13.4.13 </span>Link type "<dfn title=rel-search><code>search</code></dfn>"</h5>
 
   <p>The <code title=rel-search><a href=#link-type-search>search</a></code> keyword may be used
   with <code><a href=#the-link-element>link</a></code>, <code><a href=#the-a-element>a</a></code>, and <code><a href=#the-area-element>area</a></code>
@@ -52495,7 +52617,7 @@
   autodiscover search interfaces. <a href=#refsOPENSEARCH>[OPENSEARCH]</a></p>
 
 
-  <h5 id=link-type-stylesheet><span class=secno>4.12.4.14 </span>Link type "<dfn title=rel-stylesheet><code>stylesheet</code></dfn>"</h5>
+  <h5 id=link-type-stylesheet><span class=secno>4.13.4.14 </span>Link type "<dfn title=rel-stylesheet><code>stylesheet</code></dfn>"</h5>
 
   <p>The <code title=rel-stylesheet><a href=#link-type-stylesheet>stylesheet</a></code> keyword may be
   used with <code><a href=#the-link-element>link</a></code> elements. This keyword creates an <a href=#external-resource-link title="external resource link">external resource link</a> that
@@ -52534,7 +52656,7 @@
   </div>
 
 
-  <h5 id=link-type-sidebar><span class=secno>4.12.4.15 </span>Link type "<dfn title=rel-sidebar><code>sidebar</code></dfn>"</h5>
+  <h5 id=link-type-sidebar><span class=secno>4.13.4.15 </span>Link type "<dfn title=rel-sidebar><code>sidebar</code></dfn>"</h5>
 
   <p>The <code title=rel-sidebar><a href=#link-type-sidebar>sidebar</a></code> keyword may be used
   with <code><a href=#the-link-element>link</a></code>, <code><a href=#the-a-element>a</a></code>, and <code><a href=#the-area-element>area</a></code>
@@ -52548,7 +52670,7 @@
   <p>A <a href=#hyperlink>hyperlink</a> with the <code title=rel-sidebar><a href=#link-type-sidebar>sidebar</a></code> keyword specified is a <dfn id=rel-sidebar-hyperlink title=rel-sidebar-hyperlink>sidebar hyperlink</dfn>.</p>
 
 
-  <h5 id=link-type-tag><span class=secno>4.12.4.16 </span>Link type "<dfn title=rel-tag><code>tag</code></dfn>"</h5>
+  <h5 id=link-type-tag><span class=secno>4.13.4.16 </span>Link type "<dfn title=rel-tag><code>tag</code></dfn>"</h5>
 
   <p>The <code title=rel-tag><a href=#link-type-tag>tag</a></code> keyword may be used
   with <code><a href=#the-link-element>link</a></code>, <code><a href=#the-a-element>a</a></code>, and <code><a href=#the-area-element>area</a></code>
@@ -52564,7 +52686,7 @@
   the popular tag across a set of pages.</p>
 
 
-  <h5 id=hierarchical-link-types><span class=secno>4.12.4.17 </span>Hierarchical link types</h5>
+  <h5 id=hierarchical-link-types><span class=secno>4.13.4.17 </span>Hierarchical link types</h5>
 
   <p>Some documents form part of a hierarchical structure of
   documents.</p>
@@ -52577,7 +52699,7 @@
   <p>A document may be part of multiple hierarchies.</p>
 
 
-  <h6 id=link-type-index><span class=secno>4.12.4.17.1 </span>Link type "<dfn title=rel-index><code>index</code></dfn>"</h6>
+  <h6 id=link-type-index><span class=secno>4.13.4.17.1 </span>Link type "<dfn title=rel-index><code>index</code></dfn>"</h6>
 
   <p>The <code title=rel-index><a href=#link-type-index>index</a></code> keyword may be used with
   <code><a href=#the-link-element>link</a></code>, <code><a href=#the-a-element>a</a></code>, and <code><a href=#the-area-element>area</a></code>
@@ -52597,7 +52719,7 @@
   </div>
 
 
-  <h6 id=link-type-up><span class=secno>4.12.4.17.2 </span>Link type "<dfn title=rel-up><code>up</code></dfn>"</h6>
+  <h6 id=link-type-up><span class=secno>4.13.4.17.2 </span>Link type "<dfn title=rel-up><code>up</code></dfn>"</h6>
 
   <p>The <code title=rel-up><a href=#link-type-up>up</a></code> keyword may be used with
   <code><a href=#the-link-element>link</a></code>, <code><a href=#the-a-element>a</a></code>, and <code><a href=#the-area-element>area</a></code>
@@ -52667,7 +52789,7 @@
   interface hides duplicates).</p>
 
 
-  <h5 id=sequential-link-types><span class=secno>4.12.4.18 </span>Sequential link types</h5>
+  <h5 id=sequential-link-types><span class=secno>4.13.4.18 </span>Sequential link types</h5>
 
   <p>Some documents form part of a sequence of documents.</p>
 
@@ -52679,7 +52801,7 @@
   <p>A document may be part of multiple sequences.</p>
 
 
-  <h6 id=link-type-first><span class=secno>4.12.4.18.1 </span>Link type "<dfn title=rel-first><code>first</code></dfn>"</h6>
+  <h6 id=link-type-first><span class=secno>4.13.4.18.1 </span>Link type "<dfn title=rel-first><code>first</code></dfn>"</h6>
 
   <p>The <code title=rel-first><a href=#link-type-first>first</a></code> keyword may be used with
   <code><a href=#the-link-element>link</a></code>, <code><a href=#the-a-element>a</a></code>, and <code><a href=#the-area-element>area</a></code>
@@ -52698,7 +52820,7 @@
   </div>
 
 
-  <h6 id=link-type-last><span class=secno>4.12.4.18.2 </span>Link type "<dfn title=rel-last><code>last</code></dfn>"</h6>
+  <h6 id=link-type-last><span class=secno>4.13.4.18.2 </span>Link type "<dfn title=rel-last><code>last</code></dfn>"</h6>
 
   <p>The <code title=rel-last><a href=#link-type-last>last</a></code> keyword may be used with
   <code><a href=#the-link-element>link</a></code>, <code><a href=#the-a-element>a</a></code>, and <code><a href=#the-area-element>area</a></code>
@@ -52717,7 +52839,7 @@
   </div>
 
 
-  <h6 id=link-type-next><span class=secno>4.12.4.18.3 </span>Link type "<dfn title=rel-next><code>next</code></dfn>"</h6>
+  <h6 id=link-type-next><span class=secno>4.13.4.18.3 </span>Link type "<dfn title=rel-next><code>next</code></dfn>"</h6>
 
   <p>The <code title=rel-next><a href=#link-type-next>next</a></code> keyword may be used with
   <code><a href=#the-link-element>link</a></code>, <code><a href=#the-a-element>a</a></code>, and <code><a href=#the-area-element>area</a></code>
@@ -52728,7 +52850,7 @@
   document that is the next logical document in the sequence.</p>
 
 
-  <h6 id=link-type-prev><span class=secno>4.12.4.18.4 </span>Link type "<dfn title=rel-prev><code>prev</code></dfn>"</h6>
+  <h6 id=link-type-prev><span class=secno>4.13.4.18.4 </span>Link type "<dfn title=rel-prev><code>prev</code></dfn>"</h6>
 
   <p>The <code title=rel-prev><a href=#link-type-prev>prev</a></code> keyword may be used with
   <code><a href=#the-link-element>link</a></code>, <code><a href=#the-a-element>a</a></code>, and <code><a href=#the-area-element>area</a></code>
@@ -52747,7 +52869,7 @@
   </div>
 
 
-  <h5 id=other-link-types><span class=secno>4.12.4.19 </span>Other link types</h5>
+  <h5 id=other-link-types><span class=secno>4.13.4.19 </span>Other link types</h5>
 
   <p><span title=concept-rel-extensions>Extensions to the predefined
   set of link types</span> may be registered in the <a href=http://wiki.whatwg.org/wiki/RelExtensions>WHATWG Wiki
@@ -52925,9 +53047,9 @@
 
 
 
-  <h3 id=common-idioms-without-dedicated-elements><span class=secno>4.13 </span>Common idioms without dedicated elements</h3>
+  <h3 id=common-idioms-without-dedicated-elements><span class=secno>4.14 </span>Common idioms without dedicated elements</h3>
 
-  <h4 id=the-main-part-of-the-content><span class=secno>4.13.1 </span>The main part of the content</h4>
+  <h4 id=the-main-part-of-the-content><span class=secno>4.14.1 </span>The main part of the content</h4>
 
   <p>The main content of a page — not including headers and
   footers, navigation links, sidebars, advertisements, and so forth
@@ -53092,7 +53214,7 @@
   </div>
 
 
-  <h4 id=tag-clouds><span class=secno>4.13.2 </span>Tag clouds</h4>
+  <h4 id=tag-clouds><span class=secno>4.14.2 </span>Tag clouds</h4>
 
   <p id=tag-cloud>This specification does not define any markup
   specifically for marking up lists of keywords that apply to a group
@@ -53144,7 +53266,7 @@
   </div>
 
 
-  <h4 id=conversations><span class=secno>4.13.3 </span>Conversations</h4>
+  <h4 id=conversations><span class=secno>4.14.3 </span>Conversations</h4>
 
   <!-- http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-September/022576.html -->
 
@@ -53190,7 +53312,7 @@
   </div>
 
 
-  <h4 id=footnotes><span class=secno>4.13.4 </span>Footnotes</h4>
+  <h4 id=footnotes><span class=secno>4.14.4 </span>Footnotes</h4>
 
   <p>HTML does not have a dedicated mechanism for marking up
   footnotes. Here are the recommended alternatives.</p>
@@ -53303,9 +53425,9 @@
 
   <div class=impl>
 
-  <h3 id=matching-html-elements-using-selectors><span class=secno>4.14 </span>Matching HTML elements using selectors</h3>
+  <h3 id=matching-html-elements-using-selectors><span class=secno>4.15 </span>Matching HTML elements using selectors</h3>
 
-  <h4 id=selectors><span class=secno>4.14.1 </span>Case-sensitivity</h4>
+  <h4 id=selectors><span class=secno>4.15.1 </span>Case-sensitivity</h4>
 
   <p>Attribute and element <em>names</em> of <a href=#html-elements>HTML
   elements</a> in <a href=#html-documents>HTML documents</a> must be treated as
@@ -53377,7 +53499,7 @@
   elements, which must be treated as <a href=#case-sensitive>case-sensitive</a>.</p>
 
 
-  <h4 id=pseudo-classes><span class=secno>4.14.2 </span>Pseudo-classes</h4>
+  <h4 id=pseudo-classes><span class=secno>4.15.2 </span>Pseudo-classes</h4>
 
   <p>There are a number of dynamic selectors that can be used with
   HTML. This section defines when these selectors match HTML
@@ -58944,7 +59066,6 @@
   [PutForwards=<a href=#dom-location-href title=dom-location-href>href</a>] readonly attribute <a href=#location>Location</a> <a href=#dom-location title=dom-location>location</a>;
   readonly attribute <a href=#history-0>History</a> <a href=#dom-history title=dom-history>history</a>;
   readonly attribute <a href=#undomanager>UndoManager</a> <a href=#dom-undomanager title=dom-undoManager>undoManager</a>;
-  <a href=#selection-0>Selection</a> <a href=#dom-getselection title=dom-getSelection>getSelection</a>();
   [Replaceable] readonly attribute <a href=#barprop>BarProp</a> <a href=#dom-window-locationbar title=dom-window-locationbar>locationbar</a>;
   [Replaceable] readonly attribute <a href=#barprop>BarProp</a> <a href=#dom-window-menubar title=dom-window-menubar>menubar</a>;
   [Replaceable] readonly attribute <a href=#barprop>BarProp</a> <a href=#dom-window-personalbar title=dom-window-personalbar>personalbar</a>;
@@ -67540,525 +67661,9 @@
   </div>
 
 
-  <h3 id=selection><span class=secno>8.6 </span>The text selection APIs</h3>
 
-  <p>Every <a href=#browsing-context>browsing context</a> has <dfn id=the-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 agent should allow the user 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>
+  <h3 id=contenteditable><span class=secno>8.6 </span>The <code title=attr-contenteditable><a href=#attr-contenteditable>contenteditable</a></code> attribute</h3>
 
-  <p>This one selection must be shared by all the content of the
-  browsing context (though not by nested <a href=#browsing-context 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>
-
-  <div class=impl>
-
-  <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>
-
-  </div>
-
-  <p>Mostly for historical reasons, in addition to the <a href=#browsing-context>browsing
-  context</a>'s <a href=#the-selection title="the selection">selection</a>, each
-  <code><a href=#the-textarea-element>textarea</a></code> and <code><a href=#the-input-element>input</a></code> element has an
-  independent selection. These are the <dfn id=text-field-selection title="text field
-  selection">text field selections</dfn>.</p>
-
-  <div class=impl>
-
-  <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>
-
-  </div>
-
-  <!-- v2DATAGRID v2DGS:
-  <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>The <code><a href=#the-select-element>select</a></code> element also has a selection, indicating
-  which items have been picked by the user. This is 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 title="selector-selection">::selection</code>
-  pseudo-element. <a href="#refsSELECTORS">[SELECTORS]</a> <a
-  href="#refsCSS">[CSS]</a> --></p>
-
-
-
-  <h4 id=documentSelection><span class=secno>8.6.1 </span>APIs for the browsing context selection</h4>
-
-  <dl class=domintro><dt><var title="">window</var> . <code title=dom-getSelection><a href=#dom-getselection>getSelection</a></code>()</dt>
-   <dt><var title="">document</var> . <code title=dom-document-getSelection><a href=#dom-document-getselection>getSelection</a></code>()</dt>
-
-   <dd>
-
-    <p>Returns the <code><a href=#selection-0>Selection</a></code> object for the window, which
-    stringifies to the text of the current selection.</p>
-
-   </dd>
-
-  </dl><div class=impl>
-
-  <p>The <dfn id=dom-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=#selection-0>Selection</a></code> object representing <a href=#the-selection>the
-  selection</a> of that <code><a href=#window>Window</a></code> object's
-  <a href=#browsing-context>browsing context</a>.
-
-  <p>For historical reasons, the <dfn id=dom-document-getselection 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=#selection-0>Selection</a></code> object.</p>
-
-  </div>
-
-  <pre class=idl>interface <dfn id=selection-0>Selection</dfn> {
-  readonly attribute Node <a href=#dom-selection-anchornode title=dom-selection-anchorNode>anchorNode</a>;
-  readonly attribute long <a href=#dom-selection-anchoroffset title=dom-selection-anchorOffset>anchorOffset</a>;
-  readonly attribute Node <a href=#dom-selection-focusnode title=dom-selection-focusNode>focusNode</a>;
-  readonly attribute long <a href=#dom-selection-focusoffset title=dom-selection-focusOffset>focusOffset</a>;
-  readonly attribute boolean <a href=#dom-selection-iscollapsed title=dom-selection-isCollapsed>isCollapsed</a>;
-  void <a href=#dom-selection-collapse title=dom-selection-collapse>collapse</a>(in Node parentNode, in long offset);
-  void <a href=#dom-selection-collapsetostart title=dom-selection-collapseToStart>collapseToStart</a>();
-  void <a href=#dom-selection-collapsetoend title=dom-selection-collapseToEnd>collapseToEnd</a>();
-  void <a href=#dom-selection-selectallchildren title=dom-selection-selectAllChildren>selectAllChildren</a>(in Node parentNode);
-  void <a href=#dom-selection-deletefromdocument title=dom-selection-deleteFromDocument>deleteFromDocument</a>();
-  readonly attribute long <a href=#dom-selection-rangecount title=dom-selection-rangeCount>rangeCount</a>;
-  Range <a href=#dom-selection-getrangeat title=dom-selection-getRangeAt>getRangeAt</a>(in long index);
-  void <a href=#dom-selection-addrange title=dom-selection-addRange>addRange</a>(in Range range);
-  void <a href=#dom-selection-removerange title=dom-selection-removeRange>removeRange</a>(in Range range);
-  void <a href=#dom-selection-removeallranges title=dom-selection-removeAllRanges>removeAllRanges</a>();
-  <a href=#dom-selection-tostring title=dom-selection-toString>stringifier</a> DOMString ();
-};</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=#selection-0>Selection</a></code> interface represents a list of
-  <code><a href=#range>Range</a></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=#refsDOMRANGE>[DOMRANGE]</a></p>
-
-  <p>All of the members of the <code><a href=#selection-0>Selection</a></code> interface are
-  defined in terms of operations on the <code><a href=#range>Range</a></code> objects
-  represented by this object. These operations can raise exceptions,
-  as defined for the <code><a href=#range>Range</a></code> interface; this can therefore
-  result in the members of the <code><a href=#selection-0>Selection</a></code> interface
-  raising exceptions as well, in addition to any explicitly called out
-  below.</p>
-
-  <dl class=domintro><dt><var title="">selection</var> . <code title=dom-selection-anchorNode><a href=#dom-selection-anchornode>anchorNode</a></code></dt>
-
-   <dd>
-
-    <p>Returns the element that contains the start of the selection.</p>
-
-    <p>Returns null if there's no selection.</p>
-
-   </dd>
-
-   <dt><var title="">selection</var> . <code title=dom-selection-anchorOffset><a href=#dom-selection-anchoroffset>anchorOffset</a></code></dt>
-
-   <dd>
-
-    <p>Returns the offset of the start of the selection relative to the element that contains the start of the selection.</p>
-
-    <p>Returns 0 if there's no selection.</p>
-
-   </dd>
-
-   <dt><var title="">selection</var> . <code title=dom-selection-focusNode><a href=#dom-selection-focusnode>focusNode</a></code></dt>
-
-   <dd>
-
-    <p>Returns the element that contains the end of the selection.</p>
-
-    <p>Returns null if there's no selection.</p>
-
-   </dd>
-
-   <dt><var title="">selection</var> . <code title=dom-selection-focusOffset><a href=#dom-selection-focusoffset>focusOffset</a></code></dt>
-
-   <dd>
-
-    <p>Returns the offset of the end of the selection relative to the element that contains the end of the selection.</p>
-
-    <p>Returns 0 if there's no selection.</p>
-
-   </dd>
-
-   <dt><var title="">collapsed</var> = <var title="">selection</var> . <code title=dom-selection-isCollapsed><a href=#dom-selection-iscollapsed>isCollapsed</a></code>()</dt>
-
-   <dd>
-
-    <p>Returns true if there's no selection or if the selection is empty. Otherwise, returns false.</p>
-
-   </dd>
-
-   <dt><var title="">selection</var> . <code title=dom-selection-collapse><a href=#dom-selection-collapse>collapse</a></code>(<var title="">parentNode</var>, <var title="">offset</var>)</dt>
-
-   <dd>
-
-    <p>Replaces the selection with an empty one at the given position.</p>
-
-    <p>Throws a <code><a href=#wrong_document_err>WRONG_DOCUMENT_ERR</a></code> exception if the given node is in a different document.</p>
-
-   </dd>
-
-   <dt><var title="">selection</var> . <code title=dom-selection-collapseToStart><a href=#dom-selection-collapsetostart>collapseToStart</a></code>()</dt>
-
-   <dd>
-
-    <p>Replaces the selection with an empty one at the position of the start of the current selection.</p>
-
-    <p>Throws an <code><a href=#invalid_state_err>INVALID_STATE_ERR</a></code> exception if there is no selection.</p>
-
-   </dd>
-
-   <dt><var title="">selection</var> . <code title=dom-selection-collapseToEnd><a href=#dom-selection-collapsetoend>collapseToEnd</a></code>()</dt>
-
-   <dd>
-
-    <p>Replaces the selection with an empty one at the position of the end of the current selection.</p>
-
-    <p>Throws an <code><a href=#invalid_state_err>INVALID_STATE_ERR</a></code> exception if there is no selection.</p>
-
-   </dd>
-
-   <dt><var title="">selection</var> . <code title=dom-selection-selectAllChildren><a href=#dom-selection-selectallchildren>selectAllChildren</a></code>(<var title="">parentNode</var>)</dt>
-
-   <dd>
-
-    <p>Replaces the selection with one that contains all the contents of the given element.</p>
-
-    <p>Throws a <code><a href=#wrong_document_err>WRONG_DOCUMENT_ERR</a></code> exception if the given node is in a different document.</p>
-
-   </dd>
-
-   <dt><var title="">selection</var> . <code title=dom-selection-deleteFromDocument><a href=#dom-selection-deletefromdocument>deleteFromDocument</a></code>()</dt>
-
-   <dd>
-
-    <p>Deletes the selection.</p>
-
-   </dd>
-
-   <dt><var title="">selection</var> . <code title=dom-selection-rangeCount><a href=#dom-selection-rangecount>rangeCount</a></code></dt>
-
-   <dd>
-
-    <p>Returns the number of ranges in the selection.</p>
-
-   </dd>
-
-   <dt><var title="">selection</var> . <code title=dom-selection-getRangeAt><a href=#dom-selection-getrangeat>getRangeAt</a></code>(<var title="">index</var>)</dt>
-
-   <dd>
-
-    <p>Returns the given range.</p>
-
-    <p>Throws an <code><a href=#index_size_err>INDEX_SIZE_ERR</a></code> exception if the value is out of range.</p>
-
-   </dd>
-
-   <dt><var title="">selection</var> . <code title=dom-selection-addRange><a href=#dom-selection-addrange>addRange</a></code>(<var title="">range</var>)</dt>
-
-   <dd>
-
-    <p>Adds the given range to the selection.</p>
-
-   </dd>
-
-   <dt><var title="">selection</var> . <code title=dom-selection-removeRange><a href=#dom-selection-removerange>removeRange</a></code>(<var title="">range</var>)</dt>
-
-   <dd>
-
-    <p>Removes the given range from the selection, if the range was one of the ones in the selection.</p>
-
-   </dd>
-
-   <dt><var title="">selection</var> . <code title=dom-selection-removeAllRanges><a href=#dom-selection-removeallranges>removeAllRanges</a></code>()</dt>
-
-   <dd>
-
-    <p>Removes all the ranges in the selection.</p>
-
-   </dd>
-
-  </dl><div class=impl>
-
-  <p>The <dfn id=dom-selection-anchornode title=dom-selection-anchorNode><code>anchorNode</code></dfn>
-  attribute must return the value returned by the <code title=dom-Range-startContainer><a href=#dom-range-startcontainer>startContainer</a></code> attribute of the last
-  <code><a href=#range>Range</a></code> object in the list, or null if the list is
-  empty.</p>
-
-  <p>The <dfn id=dom-selection-anchoroffset title=dom-selection-anchorOffset><code>anchorOffset</code></dfn>
-  attribute must return the value returned by the <code title=dom-Range-startOffset><a href=#dom-range-startoffset>startOffset</a></code> attribute of the last <code><a href=#range>Range</a></code>
-  object in the list, or 0 if the list is empty.</p>
-
-  <p>The <dfn id=dom-selection-focusnode title=dom-selection-focusNode><code>focusNode</code></dfn>
-  attribute must return the value returned by the <code title=dom-Range-endContainer><a href=#dom-range-endcontainer>endContainer</a></code> attribute of the last
-  <code><a href=#range>Range</a></code> object in the list, or null if the list is
-  empty.</p>
-
-  <p>The <dfn id=dom-selection-focusoffset title=dom-selection-focusOffset><code>focusOffset</code></dfn>
-  attribute must return the value returned by the <code title=dom-Range-endOffset><a href=#dom-range-endoffset>endOffset</a></code> attribute of the last <code><a href=#range>Range</a></code>
-  object in the list, or 0 if the list is empty.</p>
-
-  <p>The <dfn id=dom-selection-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=dom-Range-collapsed><a href=#dom-range-collapsed>collapsed</a></code> attribute
-  is itself true. Otherwise it must return false.</p>
-
-  <p>The <dfn id=dom-selection-collapse title=dom-selection-collapse><code>collapse(<var title="">parentNode</var>, <var title="">offset</var>)</code></dfn>
-  method must raise a <code><a href=#wrong_document_err>WRONG_DOCUMENT_ERR</a></code> DOM exception if
-  <var title="">parentNode</var>'s <code><a href=#document>Document</a></code> is not the
-  <code><a href=#htmldocument>HTMLDocument</a></code> object with which the
-  <code><a href=#selection-0>Selection</a></code> object is associated. Otherwise it is, and
-  the method must remove all the ranges in the <code><a href=#selection-0>Selection</a></code>
-  list, then create a new <code><a href=#range>Range</a></code> object, add it to the
-  list, and invoke its <code title=dom-Range-setStart()>setStart()</code> and <code title=dom-Range-setEnd()>setEnd()</code> methods with the <var title="">parentNode</var> and <var title="">offset</var> values as
-  their arguments.</p>
-
-  <p>The <dfn id=dom-selection-collapsetostart title=dom-selection-collapseToStart><code>collapseToStart()</code></dfn>
-  method must raise an <code><a href=#invalid_state_err>INVALID_STATE_ERR</a></code> DOM exception if
-  there are no ranges in the list. Otherwise, it must invoke the <code title=dom-selection-collapse><a href=#dom-selection-collapse>collapse()</a></code> method with the
-  <code title=dom-Range-startContainer><a href=#dom-range-startcontainer>startContainer</a></code> and <code title=dom-Range-startOffset><a href=#dom-range-startoffset>startOffset</a></code> values of the first <code><a href=#range>Range</a></code>
-  object in the list as the arguments.</p>
-
-  <p>The <dfn id=dom-selection-collapsetoend title=dom-selection-collapseToEnd><code>collapseToEnd()</code></dfn>
-  method must raise an <code><a href=#invalid_state_err>INVALID_STATE_ERR</a></code> DOM exception if
-  there are no ranges in the list. Otherwise, it must invoke the <code title=dom-selection-collapse><a href=#dom-selection-collapse>collapse()</a></code> method with the
-  <code title=dom-Range-endContainer><a href=#dom-range-endcontainer>endContainer</a></code> and <code title=dom-Range-endOffset><a href=#dom-range-endoffset>endOffset</a></code> values of the last <code><a href=#range>Range</a></code>
-  object in the list as the arguments.</p>
-
-  <p>The <dfn id=dom-selection-selectallchildren title=dom-selection-selectAllChildren><code>selectAllChildren(<var title="">parentNode</var>)</code></dfn>
-  method must invoke the <code title=dom-selection-collapse><a href=#dom-selection-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=dom-Range-selectNodeContents()>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 id=dom-selection-deletefromdocument title=dom-selection-deleteFromDocument><code>deleteFromDocument()</code></dfn>
-  method must invoke the <code title=dom-Range-deleteContents()>deleteContents()</code> method
-  on each range in the list, if any, from first to last.</p>
-
-  <p>The <dfn id=dom-selection-rangecount title=dom-selection-rangeCount><code>rangeCount</code></dfn>
-  attribute must return the number of ranges in the list.</p>
-
-  <p>The <dfn id=dom-selection-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=#dom-selection-rangecount>rangeCount</a></code> attribute, then
-  the method must raise an <code><a href=#index_size_err>INDEX_SIZE_ERR</a></code> DOM
-  exception.</p>
-
-  <p>The <dfn id=dom-selection-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=#dom-selection-tostring title=dom-selection-toString>stringification</a> to return the
-  range's text twice.</p>
-
-  <p>The <dfn id=dom-selection-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>
-
-  <p>The <dfn id=dom-selection-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=#dom-selection-rangecount>rangeCount</a></code>
-  attribute returns 0 after the <code title=dom-selection-removeAllRanges><a href=#dom-selection-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>
-
-  <p>Objects implementing this interface must <dfn id=dom-selection-tostring title=dom-selection-toString>stringify</dfn> to a concatenation
-  of the results of invoking the <code title="">toString()</code>
-  method of the <code><a href=#range>Range</a></code> object on each of the ranges of the
-  selection, in the order they appear in the list (first to last).</p>
-
-  </div>
-
-  <div class=example>
-   <p>In the following document fragment, the emphasized 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>
-
-  <!-- v2DATAGRID v2DGS:
-  <p class="note">The <code>Selection</code> interface has no relation
-  to the <code>DataGridSelection</code> interface.</p>
-  -->
-
-
-  <h4 id=textFieldSelection><span class=secno>8.6.2 </span>APIs for the text field selections</h4>
-
-  <!-- v2 idea: DOM Range APIs to expose the textarea/input edited
-  value (ack martijnw) -->
-
-  <p>The <code><a href=#the-input-element>input</a></code> and <code><a href=#the-textarea-element>textarea</a></code> elements define
-  the following members in their DOM interfaces for handling their
-  text selection:</p>
-
-  <pre class="idl extract">  void <a href=#dom-textarea/input-select title=dom-textarea/input-select>select</a>();
-           attribute unsigned long <a href=#dom-textarea/input-selectionstart title=dom-textarea/input-selectionStart>selectionStart</a>;
-           attribute unsigned long <a href=#dom-textarea/input-selectionend title=dom-textarea/input-selectionEnd>selectionEnd</a>;
-  void <a href=#dom-textarea/input-setselectionrange title=dom-textarea/input-setSelectionRange>setSelectionRange</a>(in unsigned long start, in unsigned long end);</pre>
-  <!-- v2: also add textLength? it seems to be widely used -->
-
-  <p>These methods and attributes expose and control the selection of
-  <code><a href=#the-input-element>input</a></code> and <code><a href=#the-textarea-element>textarea</a></code> text fields.</p>
-
-  <dl class=domintro><dt><var title="">element</var> . <code title=dom-textarea/input-select><a href=#dom-textarea/input-select>select</a></code>()</dt>
-
-   <dd>
-
-    <p>Selects everything in the text field.</p>
-
-   </dd>
-
-   <dt><var title="">element</var> . <code title=dom-textarea/input-selecionStart>selectionStart</code> [ = <var title="">value</var> ]</dt>
-
-   <dd>
-
-    <p>Returns the offset to the start of the selection.</p>
-
-    <p>Can be set, to change the start of the selection.</p>
-
-   </dd>
-
-   <dt><var title="">element</var> . <code title=dom-textarea/input-selecionEnd>selectionEnd</code> [ = <var title="">value</var> ]</dt>
-
-   <dd>
-
-    <p>Returns the offset to the end of the selection.</p>
-
-    <p>Can be set, to change the end of the selection.</p>
-
-   </dd>
-
-   <dt><var title="">element</var> . <code title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-setselectionrange>setSelectionRange</a></code>(<var title="">start</var>, <var title="">end</var>)</dt>
-
-   <dd>
-
-    <p>Changes the selection to cover the given substring.</p>
-
-   </dd>
-
-  </dl><div class=impl>
-
-  <p>When these methods and attributes are used with
-  <code><a href=#the-input-element>input</a></code> elements while they don't apply, they must raise
-  an <code><a href=#invalid_state_err>INVALID_STATE_ERR</a></code> exception. Otherwise, they must
-  act as described below.</p>
-
-  <p>The <dfn id=dom-textarea/input-select 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 id=dom-textarea/input-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>
-
-  <p>On setting, it must act as if the <code title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-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=#dom-textarea/input-selectionend>selectionEnd</a></code>
-  attribute as the second argument, unless the current value of the
-  <code title=dom-textarea/input-selectionEnd><a href=#dom-textarea/input-selectionend>selectionEnd</a></code> is
-  less than the new value, in which case the second argument must also
-  be the new value.</p>
-
-  <p>The <dfn id=dom-textarea/input-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>
-
-  <p>On setting, it must act as if the <code title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-setselectionrange>setSelectionRange()</a></code>
-  method had been called, with the current value of the <code title=dom-textarea/input-selectionStart><a href=#dom-textarea/input-selectionstart>selectionStart</a></code>
-  attribute as the first argument, and new value as the second
-  argument.</p>
-
-  <p>The <dfn id=dom-textarea/input-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 title="">(<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>
-
-  <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><a href=#the-input-element>input</a></code>
-   or <code><a href=#the-textarea-element>textarea</a></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>
-
-
-
-  <h3 id=contenteditable><span class=secno>8.7 </span>The <code title=attr-contenteditable><a href=#attr-contenteditable>contenteditable</a></code> attribute</h3>
-
   <p>The <dfn id=attr-contenteditable title=attr-contenteditable><code>contenteditable</code></dfn>
   attribute is an <a href=#enumerated-attribute>enumerated attribute</a> whose keywords are
   the empty string, <code title="">true</code>, and <code title="">false</code>. The empty string and the <code title="">true</code> keyword map to the <i>true</i> state. The <code title="">false</code> keyword maps to the <i>false</i> state. In
@@ -68148,9 +67753,8 @@
   editing hosts.</p>
 
   <p>When an editing host has focus, it must have a <dfn id=caret-position>caret
-  position</dfn> that specifies where the current editing position
-  is. It may also have a <a href=#the-selection title="the
-  selection">selection</a>.</p>
+  position</dfn> that specifies where the current editing position is.
+  It may also have a selection.</p>
 
   <p class=note>How the caret and selection are represented depends
   entirely on the UA.</p>
@@ -68163,7 +67767,7 @@
 
   <div class=impl>
 
-  <h4 id=user-editing-actions><span class=secno>8.7.1 </span>User editing actions</h4>
+  <h4 id=user-editing-actions><span class=secno>8.6.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
@@ -68181,14 +67785,14 @@
 
    <dt>Change the selection</dt>
 
-   <dd><p>User agents must allow users to change <a href=#the-selection>the
-   selection</a> within an editing host, even into nested editable
-   elements. User agents may prevent selections from being made in
-   ways that cross from editable elements into non-editable elements
-   (e.g. by making each non-editable descendant atomically selectable,
-   but not allowing text selection within them). This could be
-   triggered as the default action of <code title=event-keydown>keydown</code> events with various key
-   identifiers and as the default action of <code title=event-mousedown>mousedown</code> events.</dd>
+   <dd><p>User agents must allow users to change the selection within
+   an editing host, even into nested editable elements. User agents
+   may prevent selections from being made in ways that cross from
+   editable elements into non-editable elements (e.g. by making each
+   non-editable descendant atomically selectable, but not allowing
+   text selection within them). This could be triggered as the default
+   action of <code title=event-keydown>keydown</code> events with
+   various key identifiers and as the default action of <code title=event-mousedown>mousedown</code> events.</dd>
 
 
    <dt id=contenteditable-insertText>Insert text</dt>
@@ -68267,8 +67871,8 @@
    element, backspacing when the caret is immediately after an
    element, forward-deleting at the end of an element,
    forward-deleting when the caret is immediately before an element,
-   and deleting a <a href=#the-selection title="the selection">selection</a> whose
-   start and end points do not share a common parent node.</p>
+   and deleting a selection whose start and end points do not share a
+   common parent node.</p>
 
    <p>In any case, the exact behavior is UA-dependent, but user
    agents must not, in response to a request to delete text or an
@@ -68336,8 +67940,8 @@
   </dl><p>User agents may perform several commands per user request; for
   example if the user selects a block of text and hits
   <kbd><kbd>Enter</kbd></kbd>, the UA might interpret that as a
-  request to delete the content of <a href=#the-selection>the selection</a> followed
-  by a request to break the paragraph at that position.</p>
+  request to delete the content of the selection followed by a request
+  to break the paragraph at that position.</p>
 
   <p>User agents may add <a href=#dom-changes>DOM changes</a> entries to the
   <a href=#undo-transaction-history>undo transaction history</a> of the <a href=#editing-host>editing
@@ -68352,7 +67956,7 @@
 
 
 
-  <h4 id=making-entire-documents-editable><span class=secno>8.7.2 </span>Making entire documents editable</h4>
+  <h4 id=making-entire-documents-editable><span class=secno>8.6.2 </span>Making entire documents editable</h4>
 
   <div class=impl>
 
@@ -68394,7 +67998,7 @@
 
 
 
-  <h3 id=spelling-and-grammar-checking><span class=secno>8.8 </span>Spelling and grammar checking</h3>
+  <h3 id=spelling-and-grammar-checking><span class=secno>8.7 </span>Spelling and grammar checking</h3>
 
   <div class=impl>
 
@@ -68586,7 +68190,7 @@
   the checking is enabled, or could use other interfaces.</p>
 
 
-  <h3 id=dnd><span class=secno>8.9 </span><dfn>Drag and drop</dfn></h3>
+  <h3 id=dnd><span class=secno>8.8 </span><dfn>Drag and drop</dfn></h3>
 
 <!-- v2 ideas for drag and drop:
 
@@ -68676,21 +68280,20 @@
 
   <p>However it is implemented, drag-and-drop operations must have a
   starting point (e.g. where the mouse was clicked, or the start of
-  <a href=#the-selection>the selection</a> or element that was selected for the
-  drag), may have any number of intermediate steps (elements that the
-  mouse moves over during a drag, or elements that the user picks as
-  possible drop points as he cycles through possibilities), and must
-  either have an end point (the element above which the mouse button
-  was released, or the element that was finally selected), or be
-  canceled. The end point must be the last element selected as a
-  possible drop point before the drop occurs (so if the operation is
-  not canceled, there must be at least one element in the middle
-  step).</p>
+  the selection or element that was selected for the drag), may have
+  any number of intermediate steps (elements that the mouse moves over
+  during a drag, or elements that the user picks as possible drop
+  points as he cycles through possibilities), and must either have an
+  end point (the element above which the mouse button was released, or
+  the element that was finally selected), or be canceled. The end
+  point must be the last element selected as a possible drop point
+  before the drop occurs (so if the operation is not canceled, there
+  must be at least one element in the middle step).</p>
 
   </div>
 
 
-  <h4 id=introduction-7><span class=secno>8.9.1 </span>Introduction</h4>
+  <h4 id=introduction-7><span class=secno>8.8.1 </span>Introduction</h4>
 
   <p><i>This section is non-normative.</i></p>
 
@@ -68800,7 +68403,7 @@
 
 
 
-  <h4 id=the-dragevent-and-datatransfer-interfaces><span class=secno>8.9.2 </span>The <code><a href=#dragevent>DragEvent</a></code> and <code><a href=#datatransfer>DataTransfer</a></code> interfaces</h4>
+  <h4 id=the-dragevent-and-datatransfer-interfaces><span class=secno>8.8.2 </span>The <code><a href=#dragevent>DragEvent</a></code> and <code><a href=#datatransfer>DataTransfer</a></code> interfaces</h4>
 
   <p>The drag-and-drop processing model involves several events. They
   all use the <code><a href=#dragevent>DragEvent</a></code> interface.</p>
@@ -69052,7 +68655,7 @@
   </div>
 
 
-  <h4 id=dndevents><span class=secno>8.9.3 </span>Events fired during a drag-and-drop action</h4>
+  <h4 id=dndevents><span class=secno>8.8.3 </span>Events fired during a drag-and-drop action</h4>
 
   <p>The following events are involved in the drag-and-drop
   model.</p>
@@ -69191,7 +68794,7 @@
 
   <div class=impl>
 
-  <h4 id=drag-and-drop-processing-model><span class=secno>8.9.4 </span>Drag-and-drop processing model</h4>
+  <h4 id=drag-and-drop-processing-model><span class=secno>8.8.4 </span>Drag-and-drop processing model</h4>
 
   <p>When the user attempts to begin a drag operation, the user agent
   must first determine what is being dragged. If the drag operation
@@ -69709,7 +69312,7 @@
 
   <div class=impl>
 
-  <h5 id=when-the-drag-and-drop-operation-starts-or-ends-in-another-document><span class=secno>8.9.4.1 </span>When the drag-and-drop operation starts or ends in another
+  <h5 id=when-the-drag-and-drop-operation-starts-or-ends-in-another-document><span class=secno>8.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
@@ -69724,7 +69327,7 @@
 
   <div class=impl>
 
-  <h5 id=when-the-drag-and-drop-operation-starts-or-ends-in-another-application><span class=secno>8.9.4.2 </span>When the drag-and-drop operation starts or ends in another
+  <h5 id=when-the-drag-and-drop-operation-starts-or-ends-in-another-application><span class=secno>8.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 href=#source-node>source
@@ -69754,7 +69357,7 @@
   </div>
 
 
-  <h4 id=the-draggable-attribute><span class=secno>8.9.5 </span>The <dfn title=attr-draggable><code>draggable</code></dfn> attribute</h4>
+  <h4 id=the-draggable-attribute><span class=secno>8.8.5 </span>The <dfn title=attr-draggable><code>draggable</code></dfn> attribute</h4>
 
   <p>All <a href=#html-elements>HTML elements</a> may have the <code title=attr-draggable><a href=#the-draggable-attribute>draggable</a></code> content attribute set. The
   <code title=attr-draggable><a href=#the-draggable-attribute>draggable</a></code> attribute is an
@@ -69896,7 +69499,7 @@
 
   <div class=impl>
 
-  <h4 id=security-risks-in-the-drag-and-drop-model><span class=secno>8.9.6 </span>Security risks in the drag-and-drop model</h4>
+  <h4 id=security-risks-in-the-drag-and-drop-model><span class=secno>8.8.6 </span>Security risks in the drag-and-drop model</h4>
 
   <p>User agents must not make the data added to the
   <code><a href=#datatransfer>DataTransfer</a></code> object during the <code title=event-dragstart><a href=#event-dragstart>dragstart</a></code> event available to scripts
@@ -69922,11 +69525,11 @@
   </div>
 
 
-  <h3 id=undo><span class=secno>8.10 </span><dfn>Undo history</dfn></h3>
+  <h3 id=undo><span class=secno>8.9 </span><dfn>Undo history</dfn></h3>
 
   <div class=impl>
 
-  <h4 id=definitions-2><span class=secno>8.10.1 </span>Definitions</h4>
+  <h4 id=definitions-2><span class=secno>8.9.1 </span>Definitions</h4>
 
   <p>The user agent must associate an <dfn id=undo-transaction-history>undo transaction
   history</dfn> with each <code><a href=#htmldocument>HTMLDocument</a></code> object.</p>
@@ -69964,7 +69567,7 @@
   </div>
 
 
-  <h4 id=the-undomanager-interface><span class=secno>8.10.2 </span>The <code><a href=#undomanager>UndoManager</a></code> interface</h4>
+  <h4 id=the-undomanager-interface><span class=secno>8.9.2 </span>The <code><a href=#undomanager>UndoManager</a></code> interface</h4>
 
   <p>To manage <a href=#undo-object>undo object</a> entries in the <a href=#undo-transaction-history>undo
   transaction history</a>, the <code><a href=#undomanager>UndoManager</a></code>
@@ -70131,7 +69734,7 @@
 
   <div class=impl>
 
-  <h4 id=undo:-moving-back-in-the-undo-transaction-history><span class=secno>8.10.3 </span><dfn title=do-undo>Undo: moving back in the undo transaction history</dfn></h4>
+  <h4 id=undo:-moving-back-in-the-undo-transaction-history><span class=secno>8.9.3 </span><dfn 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 title=dom-document-execCommand><a href=#execCommand>execCommand()</a></code> method is
   called with the <code title=command-undo><a href=#command-undo>undo</a></code> command, the
@@ -70168,7 +69771,7 @@
   command to undo his undo.</p>
 
 
-  <h4 id=redo:-moving-forward-in-the-undo-transaction-history><span class=secno>8.10.4 </span><dfn title=do-redo>Redo: moving forward in the undo transaction history</dfn></h4>
+  <h4 id=redo:-moving-forward-in-the-undo-transaction-history><span class=secno>8.9.4 </span><dfn 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 title=dom-document-execCommand><a href=#execCommand>execCommand()</a></code> method is
   called with the <code title=command-redo><a href=#command-redo>redo</a></code> command, the
@@ -70205,7 +69808,7 @@
   </div>
 
 
-  <h4 id=the-undomanagerevent-interface-and-the-undo-and-redo-events><span class=secno>8.10.5 </span>The <code><a href=#undomanagerevent>UndoManagerEvent</a></code> interface and the <code title=event-undo><a href=#event-undo>undo</a></code> and <code title=event-redo><a href=#event-redo>redo</a></code> events</h4>
+  <h4 id=the-undomanagerevent-interface-and-the-undo-and-redo-events><span class=secno>8.9.5 </span>The <code><a href=#undomanagerevent>UndoManagerEvent</a></code> interface and the <code title=event-undo><a href=#event-undo>undo</a></code> and <code title=event-redo><a href=#event-redo>redo</a></code> events</h4>
 
   <pre class=idl>interface <dfn id=undomanagerevent>UndoManagerEvent</dfn> : <a href=#event>Event</a> {
   readonly attribute any <a href=#dom-undomanagerevent-data title=dom-UndoManagerEvent-data>data</a>;
@@ -70240,7 +69843,7 @@
 
   <div class=impl>
 
-  <h4 id=implementation-notes><span class=secno>8.10.6 </span>Implementation notes</h4>
+  <h4 id=implementation-notes><span class=secno>8.9.6 </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
@@ -70263,7 +69866,7 @@
 
 
 
-  <h3 id=editing-apis><span class=secno>8.11 </span>Editing APIs</h3>
+  <h3 id=editing-apis><span class=secno>8.10 </span>Editing APIs</h3>
 
   <dl class=domintro><dt><var title="">document</var> . <code title=dom-document-execCommand><a href=#execCommand>execCommand</a></code>(<var title="">commandId</var> [, <var title="">showUI</var> [, <var title="">value</var> ] ] )</dt>
 
@@ -70319,10 +69922,9 @@
 
   <p>The <dfn id=execCommand title=dom-document-execCommand><code>execCommand(<var title="">commandId</var>, <var title="">showUI</var>, <var title="">value</var>)</code></dfn> method on the
   <code><a href=#htmldocument>HTMLDocument</a></code> interface allows scripts to perform
-  actions on the <a href=#the-selection title="the selection">current selection</a>
-  or at the current caret position. Generally, these commands would be
-  used to implement editor UI, for example having a "delete" button on
-  a toolbar.</p>
+  actions on the current selection or at the current caret position.
+  Generally, these commands would be used to implement editor UI, for
+  example having a "delete" button on a toolbar.</p>
 
   <p>There are three variants to this method, with one, two, and three
   arguments respectively. The <var title="">showUI</var> and <var title="">value</var> parameters, even if specified, are ignored

Modified: index
===================================================================
--- index	2010-10-12 21:20:32 UTC (rev 5616)
+++ index	2010-10-12 21:44:22 UTC (rev 5617)
@@ -705,95 +705,97 @@
        <li><a href="#a-form-control's-value"><span class=secno>4.10.19.3 </span>A form control's value</a></li>
        <li><a href=#autofocusing-a-form-control><span class=secno>4.10.19.4 </span>Autofocusing a form control</a></li>
        <li><a href=#limiting-user-input-length><span class=secno>4.10.19.5 </span>Limiting user input length</a></li>
-       <li><a href=#form-submission-0><span class=secno>4.10.19.6 </span>Form submission</a></ol></li>
-     <li><a href=#constraints><span class=secno>4.10.20 </span>Constraints</a>
+       <li><a href=#form-submission-0><span class=secno>4.10.19.6 </span>Form submission</a></ol></ol></li>
+   <li><a href=#textFieldSelection><span class=secno>4.11 </span>APIs for the text field selections</a>
+    <ol>
+     <li><a href=#constraints><span class=secno>4.11.1 </span>Constraints</a>
       <ol>
-       <li><a href=#definitions><span class=secno>4.10.20.1 </span>Definitions</a></li>
-       <li><a href=#constraint-validation><span class=secno>4.10.20.2 </span>Constraint validation</a></li>
-       <li><a href=#the-constraint-validation-api><span class=secno>4.10.20.3 </span>The constraint validation API</a></li>
-       <li><a href=#security-forms><span class=secno>4.10.20.4 </span>Security</a></ol></li>
-     <li><a href=#form-submission><span class=secno>4.10.21 </span>Form submission</a>
+       <li><a href=#definitions><span class=secno>4.11.1.1 </span>Definitions</a></li>
+       <li><a href=#constraint-validation><span class=secno>4.11.1.2 </span>Constraint validation</a></li>
+       <li><a href=#the-constraint-validation-api><span class=secno>4.11.1.3 </span>The constraint validation API</a></li>
+       <li><a href=#security-forms><span class=secno>4.11.1.4 </span>Security</a></ol></li>
+     <li><a href=#form-submission><span class=secno>4.11.2 </span>Form submission</a>
       <ol>
-       <li><a href=#introduction-1><span class=secno>4.10.21.1 </span>Introduction</a></li>
-       <li><a href=#implicit-submission><span class=secno>4.10.21.2 </span>Implicit submission</a></li>
-       <li><a href=#form-submission-algorithm><span class=secno>4.10.21.3 </span>Form submission algorithm</a></li>
-       <li><a href=#url-encoded-form-data><span class=secno>4.10.21.4 </span>URL-encoded form data</a></li>
-       <li><a href=#multipart-form-data><span class=secno>4.10.21.5 </span>Multipart form data</a></li>
-       <li><a href=#plain-text-form-data><span class=secno>4.10.21.6 </span>Plain text form data</a></ol></li>
-     <li><a href=#resetting-a-form><span class=secno>4.10.22 </span>Resetting a form</a></li>
-     <li><a href=#event-dispatch><span class=secno>4.10.23 </span>Event dispatch</a></ol></li>
-   <li><a href=#interactive-elements><span class=secno>4.11 </span>Interactive elements</a>
+       <li><a href=#introduction-1><span class=secno>4.11.2.1 </span>Introduction</a></li>
+       <li><a href=#implicit-submission><span class=secno>4.11.2.2 </span>Implicit submission</a></li>
+       <li><a href=#form-submission-algorithm><span class=secno>4.11.2.3 </span>Form submission algorithm</a></li>
+       <li><a href=#url-encoded-form-data><span class=secno>4.11.2.4 </span>URL-encoded form data</a></li>
+       <li><a href=#multipart-form-data><span class=secno>4.11.2.5 </span>Multipart form data</a></li>
+       <li><a href=#plain-text-form-data><span class=secno>4.11.2.6 </span>Plain text form data</a></ol></li>
+     <li><a href=#resetting-a-form><span class=secno>4.11.3 </span>Resetting a form</a></li>
+     <li><a href=#event-dispatch><span class=secno>4.11.4 </span>Event dispatch</a></ol></li>
+   <li><a href=#interactive-elements><span class=secno>4.12 </span>Interactive elements</a>
     <ol>
-     <li><a href=#the-details-element><span class=secno>4.11.1 </span>The <code>details</code> element</a></li>
-     <li><a href=#the-summary-element><span class=secno>4.11.2 </span>The <code>summary</code> element</a></li>
-     <li><a href=#the-command><span class=secno>4.11.3 </span>The <code>command</code> element</a></li>
-     <li><a href=#menus><span class=secno>4.11.4 </span>The <code>menu</code> element</a>
+     <li><a href=#the-details-element><span class=secno>4.12.1 </span>The <code>details</code> element</a></li>
+     <li><a href=#the-summary-element><span class=secno>4.12.2 </span>The <code>summary</code> element</a></li>
+     <li><a href=#the-command><span class=secno>4.12.3 </span>The <code>command</code> element</a></li>
+     <li><a href=#menus><span class=secno>4.12.4 </span>The <code>menu</code> element</a>
       <ol>
-       <li><a href=#menus-intro><span class=secno>4.11.4.1 </span>Introduction</a></li>
-       <li><a href=#building-menus-and-toolbars><span class=secno>4.11.4.2 </span>Building menus and toolbars</a></li>
-       <li><a href=#context-menus><span class=secno>4.11.4.3 </span>Context menus</a></li>
-       <li><a href=#toolbars><span class=secno>4.11.4.4 </span>Toolbars</a></ol></li>
-     <li><a href=#commands><span class=secno>4.11.5 </span>Commands</a>
+       <li><a href=#menus-intro><span class=secno>4.12.4.1 </span>Introduction</a></li>
+       <li><a href=#building-menus-and-toolbars><span class=secno>4.12.4.2 </span>Building menus and toolbars</a></li>
+       <li><a href=#context-menus><span class=secno>4.12.4.3 </span>Context menus</a></li>
+       <li><a href=#toolbars><span class=secno>4.12.4.4 </span>Toolbars</a></ol></li>
+     <li><a href=#commands><span class=secno>4.12.5 </span>Commands</a>
       <ol>
-       <li><a href=#using-the-a-element-to-define-a-command><span class=secno>4.11.5.1 </span>Using the <code>a</code> element to define a command</a></li>
-       <li><a href=#using-the-button-element-to-define-a-command><span class=secno>4.11.5.2 </span>Using the <code>button</code> element to define a command</a></li>
-       <li><a href=#using-the-input-element-to-define-a-command><span class=secno>4.11.5.3 </span>Using the <code>input</code> element to define a command</a></li>
-       <li><a href=#using-the-option-element-to-define-a-command><span class=secno>4.11.5.4 </span>Using the <code>option</code> element to define a command</a></li>
-       <li><a href=#using-the-command-element-to-define-a-command><span class=secno>4.11.5.5 </span>Using the <code>command</code> element to define
+       <li><a href=#using-the-a-element-to-define-a-command><span class=secno>4.12.5.1 </span>Using the <code>a</code> element to define a command</a></li>
+       <li><a href=#using-the-button-element-to-define-a-command><span class=secno>4.12.5.2 </span>Using the <code>button</code> element to define a command</a></li>
+       <li><a href=#using-the-input-element-to-define-a-command><span class=secno>4.12.5.3 </span>Using the <code>input</code> element to define a command</a></li>
+       <li><a href=#using-the-option-element-to-define-a-command><span class=secno>4.12.5.4 </span>Using the <code>option</code> element to define a command</a></li>
+       <li><a href=#using-the-command-element-to-define-a-command><span class=secno>4.12.5.5 </span>Using the <code>command</code> element to define
   a command</a></li>
-       <li><a href=#using-the-accesskey-attribute-on-a-label-element-to-define-a-command><span class=secno>4.11.5.6 </span>Using the <code title=attr-accesskey>accesskey</code> attribute on a <code>label</code> element to define a command</a></li>
-       <li><a href=#using-the-accesskey-attribute-on-a-legend-element-to-define-a-command><span class=secno>4.11.5.7 </span>Using the <code title=attr-accesskey>accesskey</code> attribute on a <code>legend</code> element to define a command</a></li>
-       <li><a href=#using-the-accesskey-attribute-to-define-a-command-on-other-elements><span class=secno>4.11.5.8 </span>Using the <code title=attr-accesskey>accesskey</code> attribute to define a command on other elements</a></ol></li>
-     <li><a href=#devices><span class=secno>4.11.6 </span>The <code>device</code> element</a>
+       <li><a href=#using-the-accesskey-attribute-on-a-label-element-to-define-a-command><span class=secno>4.12.5.6 </span>Using the <code title=attr-accesskey>accesskey</code> attribute on a <code>label</code> element to define a command</a></li>
+       <li><a href=#using-the-accesskey-attribute-on-a-legend-element-to-define-a-command><span class=secno>4.12.5.7 </span>Using the <code title=attr-accesskey>accesskey</code> attribute on a <code>legend</code> element to define a command</a></li>
+       <li><a href=#using-the-accesskey-attribute-to-define-a-command-on-other-elements><span class=secno>4.12.5.8 </span>Using the <code title=attr-accesskey>accesskey</code> attribute to define a command on other elements</a></ol></li>
+     <li><a href=#devices><span class=secno>4.12.6 </span>The <code>device</code> element</a>
       <ol>
-       <li><a href=#stream-api><span class=secno>4.11.6.1 </span>Stream API</a></li>
-       <li><a href=#peer-to-peer-connections><span class=secno>4.11.6.2 </span>Peer-to-peer connections</a></ol></ol></li>
-   <li><a href=#links><span class=secno>4.12 </span>Links</a>
+       <li><a href=#stream-api><span class=secno>4.12.6.1 </span>Stream API</a></li>
+       <li><a href=#peer-to-peer-connections><span class=secno>4.12.6.2 </span>Peer-to-peer connections</a></ol></ol></li>
+   <li><a href=#links><span class=secno>4.13 </span>Links</a>
     <ol>
-     <li><a href=#introduction-2><span class=secno>4.12.1 </span>Introduction</a></li>
-     <li><a href=#links-created-by-a-and-area-elements><span class=secno>4.12.2 </span>Links created by <code>a</code> and <code>area</code> elements</a></li>
-     <li><a href=#following-hyperlinks><span class=secno>4.12.3 </span>Following hyperlinks</a>
+     <li><a href=#introduction-2><span class=secno>4.13.1 </span>Introduction</a></li>
+     <li><a href=#links-created-by-a-and-area-elements><span class=secno>4.13.2 </span>Links created by <code>a</code> and <code>area</code> elements</a></li>
+     <li><a href=#following-hyperlinks><span class=secno>4.13.3 </span>Following hyperlinks</a>
       <ol>
-       <li><a href=#hyperlink-auditing><span class=secno>4.12.3.1 </span>Hyperlink auditing</a></ol></li>
-     <li><a href=#linkTypes><span class=secno>4.12.4 </span>Link types</a>
+       <li><a href=#hyperlink-auditing><span class=secno>4.13.3.1 </span>Hyperlink auditing</a></ol></li>
+     <li><a href=#linkTypes><span class=secno>4.13.4 </span>Link types</a>
       <ol>
-       <li><a href=#rel-alternate><span class=secno>4.12.4.1 </span>Link type "<code>alternate</code>"</a></li>
-       <li><a href=#rel-archives><span class=secno>4.12.4.2 </span>Link type "<code>archives</code>"</a></li>
-       <li><a href=#link-type-author><span class=secno>4.12.4.3 </span>Link type "<code>author</code>"</a></li>
-       <li><a href=#link-type-bookmark><span class=secno>4.12.4.4 </span>Link type "<code>bookmark</code>"</a></li>
-       <li><a href=#link-type-external><span class=secno>4.12.4.5 </span>Link type "<code>external</code>"</a></li>
-       <li><a href=#link-type-help><span class=secno>4.12.4.6 </span>Link type "<code>help</code>"</a></li>
-       <li><a href=#rel-icon><span class=secno>4.12.4.7 </span>Link type "<code>icon</code>"</a></li>
-       <li><a href=#link-type-license><span class=secno>4.12.4.8 </span>Link type "<code>license</code>"</a></li>
-       <li><a href=#link-type-nofollow><span class=secno>4.12.4.9 </span>Link type "<code>nofollow</code>"</a></li>
-       <li><a href=#link-type-noreferrer><span class=secno>4.12.4.10 </span>Link type "<code>noreferrer</code>"</a></li>
-       <li><a href=#link-type-pingback><span class=secno>4.12.4.11 </span>Link type "<code>pingback</code>"</a></li>
-       <li><a href=#link-type-prefetch><span class=secno>4.12.4.12 </span>Link type "<code>prefetch</code>"</a></li>
-       <li><a href=#link-type-search><span class=secno>4.12.4.13 </span>Link type "<code>search</code>"</a></li>
-       <li><a href=#link-type-stylesheet><span class=secno>4.12.4.14 </span>Link type "<code>stylesheet</code>"</a></li>
-       <li><a href=#link-type-sidebar><span class=secno>4.12.4.15 </span>Link type "<code>sidebar</code>"</a></li>
-       <li><a href=#link-type-tag><span class=secno>4.12.4.16 </span>Link type "<code>tag</code>"</a></li>
-       <li><a href=#hierarchical-link-types><span class=secno>4.12.4.17 </span>Hierarchical link types</a>
+       <li><a href=#rel-alternate><span class=secno>4.13.4.1 </span>Link type "<code>alternate</code>"</a></li>
+       <li><a href=#rel-archives><span class=secno>4.13.4.2 </span>Link type "<code>archives</code>"</a></li>
+       <li><a href=#link-type-author><span class=secno>4.13.4.3 </span>Link type "<code>author</code>"</a></li>
+       <li><a href=#link-type-bookmark><span class=secno>4.13.4.4 </span>Link type "<code>bookmark</code>"</a></li>
+       <li><a href=#link-type-external><span class=secno>4.13.4.5 </span>Link type "<code>external</code>"</a></li>
+       <li><a href=#link-type-help><span class=secno>4.13.4.6 </span>Link type "<code>help</code>"</a></li>
+       <li><a href=#rel-icon><span class=secno>4.13.4.7 </span>Link type "<code>icon</code>"</a></li>
+       <li><a href=#link-type-license><span class=secno>4.13.4.8 </span>Link type "<code>license</code>"</a></li>
+       <li><a href=#link-type-nofollow><span class=secno>4.13.4.9 </span>Link type "<code>nofollow</code>"</a></li>
+       <li><a href=#link-type-noreferrer><span class=secno>4.13.4.10 </span>Link type "<code>noreferrer</code>"</a></li>
+       <li><a href=#link-type-pingback><span class=secno>4.13.4.11 </span>Link type "<code>pingback</code>"</a></li>
+       <li><a href=#link-type-prefetch><span class=secno>4.13.4.12 </span>Link type "<code>prefetch</code>"</a></li>
+       <li><a href=#link-type-search><span class=secno>4.13.4.13 </span>Link type "<code>search</code>"</a></li>
+       <li><a href=#link-type-stylesheet><span class=secno>4.13.4.14 </span>Link type "<code>stylesheet</code>"</a></li>
+       <li><a href=#link-type-sidebar><span class=secno>4.13.4.15 </span>Link type "<code>sidebar</code>"</a></li>
+       <li><a href=#link-type-tag><span class=secno>4.13.4.16 </span>Link type "<code>tag</code>"</a></li>
+       <li><a href=#hierarchical-link-types><span class=secno>4.13.4.17 </span>Hierarchical link types</a>
         <ol>
-         <li><a href=#link-type-index><span class=secno>4.12.4.17.1 </span>Link type "<code>index</code>"</a></li>
-         <li><a href=#link-type-up><span class=secno>4.12.4.17.2 </span>Link type "<code>up</code>"</a></ol></li>
-       <li><a href=#sequential-link-types><span class=secno>4.12.4.18 </span>Sequential link types</a>
+         <li><a href=#link-type-index><span class=secno>4.13.4.17.1 </span>Link type "<code>index</code>"</a></li>
+         <li><a href=#link-type-up><span class=secno>4.13.4.17.2 </span>Link type "<code>up</code>"</a></ol></li>
+       <li><a href=#sequential-link-types><span class=secno>4.13.4.18 </span>Sequential link types</a>
         <ol>
-         <li><a href=#link-type-first><span class=secno>4.12.4.18.1 </span>Link type "<code>first</code>"</a></li>
-         <li><a href=#link-type-last><span class=secno>4.12.4.18.2 </span>Link type "<code>last</code>"</a></li>
-         <li><a href=#link-type-next><span class=secno>4.12.4.18.3 </span>Link type "<code>next</code>"</a></li>
-         <li><a href=#link-type-prev><span class=secno>4.12.4.18.4 </span>Link type "<code>prev</code>"</a></ol></li>
-       <li><a href=#other-link-types><span class=secno>4.12.4.19 </span>Other link types</a></ol></ol></li>
-   <li><a href=#common-idioms-without-dedicated-elements><span class=secno>4.13 </span>Common idioms without dedicated elements</a>
+         <li><a href=#link-type-first><span class=secno>4.13.4.18.1 </span>Link type "<code>first</code>"</a></li>
+         <li><a href=#link-type-last><span class=secno>4.13.4.18.2 </span>Link type "<code>last</code>"</a></li>
+         <li><a href=#link-type-next><span class=secno>4.13.4.18.3 </span>Link type "<code>next</code>"</a></li>
+         <li><a href=#link-type-prev><span class=secno>4.13.4.18.4 </span>Link type "<code>prev</code>"</a></ol></li>
+       <li><a href=#other-link-types><span class=secno>4.13.4.19 </span>Other link types</a></ol></ol></li>
+   <li><a href=#common-idioms-without-dedicated-elements><span class=secno>4.14 </span>Common idioms without dedicated elements</a>
     <ol>
-     <li><a href=#the-main-part-of-the-content><span class=secno>4.13.1 </span>The main part of the content</a></li>
-     <li><a href=#tag-clouds><span class=secno>4.13.2 </span>Tag clouds</a></li>
-     <li><a href=#conversations><span class=secno>4.13.3 </span>Conversations</a></li>
-     <li><a href=#footnotes><span class=secno>4.13.4 </span>Footnotes</a></ol></li>
-   <li><a href=#matching-html-elements-using-selectors><span class=secno>4.14 </span>Matching HTML elements using selectors</a>
+     <li><a href=#the-main-part-of-the-content><span class=secno>4.14.1 </span>The main part of the content</a></li>
+     <li><a href=#tag-clouds><span class=secno>4.14.2 </span>Tag clouds</a></li>
+     <li><a href=#conversations><span class=secno>4.14.3 </span>Conversations</a></li>
+     <li><a href=#footnotes><span class=secno>4.14.4 </span>Footnotes</a></ol></li>
+   <li><a href=#matching-html-elements-using-selectors><span class=secno>4.15 </span>Matching HTML elements using selectors</a>
     <ol>
-     <li><a href=#selectors><span class=secno>4.14.1 </span>Case-sensitivity</a></li>
-     <li><a href=#pseudo-classes><span class=secno>4.14.2 </span>Pseudo-classes</a></ol></ol></li>
+     <li><a href=#selectors><span class=secno>4.15.1 </span>Case-sensitivity</a></li>
+     <li><a href=#pseudo-classes><span class=secno>4.15.2 </span>Pseudo-classes</a></ol></ol></li>
  <li><a href=#microdata><span class=secno>5 </span>Microdata</a>
   <ol>
    <li><a href=#introduction-3><span class=secno>5.1 </span>Introduction</a>
@@ -957,37 +959,33 @@
      <li><a href=#introduction-6><span class=secno>8.5.1 </span>Introduction</a></li>
      <li><a href=#the-accesskey-attribute><span class=secno>8.5.2 </span>The <code>accesskey</code> attribute</a></li>
      <li><a href=#processing-model-3><span class=secno>8.5.3 </span>Processing model</a></ol></li>
-   <li><a href=#selection><span class=secno>8.6 </span>The text selection APIs</a>
+   <li><a href=#contenteditable><span class=secno>8.6 </span>The <code title=attr-contenteditable>contenteditable</code> attribute</a>
     <ol>
-     <li><a href=#documentSelection><span class=secno>8.6.1 </span>APIs for the browsing context selection</a></li>
-     <li><a href=#textFieldSelection><span class=secno>8.6.2 </span>APIs for the text field selections</a></ol></li>
-   <li><a href=#contenteditable><span class=secno>8.7 </span>The <code title=attr-contenteditable>contenteditable</code> attribute</a>
+     <li><a href=#user-editing-actions><span class=secno>8.6.1 </span>User editing actions</a></li>
+     <li><a href=#making-entire-documents-editable><span class=secno>8.6.2 </span>Making entire documents editable</a></ol></li>
+   <li><a href=#spelling-and-grammar-checking><span class=secno>8.7 </span>Spelling and grammar checking</a></li>
+   <li><a href=#dnd><span class=secno>8.8 </span>Drag and drop</a>
     <ol>
-     <li><a href=#user-editing-actions><span class=secno>8.7.1 </span>User editing actions</a></li>
-     <li><a href=#making-entire-documents-editable><span class=secno>8.7.2 </span>Making entire documents editable</a></ol></li>
-   <li><a href=#spelling-and-grammar-checking><span class=secno>8.8 </span>Spelling and grammar checking</a></li>
-   <li><a href=#dnd><span class=secno>8.9 </span>Drag and drop</a>
-    <ol>
-     <li><a href=#introduction-7><span class=secno>8.9.1 </span>Introduction</a></li>
-     <li><a href=#the-dragevent-and-datatransfer-interfaces><span class=secno>8.9.2 </span>The <code>DragEvent</code> and <code>DataTransfer</code> interfaces</a></li>
-     <li><a href=#dndevents><span class=secno>8.9.3 </span>Events fired during a drag-and-drop action</a></li>
-     <li><a href=#drag-and-drop-processing-model><span class=secno>8.9.4 </span>Drag-and-drop processing model</a>
+     <li><a href=#introduction-7><span class=secno>8.8.1 </span>Introduction</a></li>
+     <li><a href=#the-dragevent-and-datatransfer-interfaces><span class=secno>8.8.2 </span>The <code>DragEvent</code> and <code>DataTransfer</code> interfaces</a></li>
+     <li><a href=#dndevents><span class=secno>8.8.3 </span>Events fired during a drag-and-drop action</a></li>
+     <li><a href=#drag-and-drop-processing-model><span class=secno>8.8.4 </span>Drag-and-drop processing model</a>
       <ol>
-       <li><a href=#when-the-drag-and-drop-operation-starts-or-ends-in-another-document><span class=secno>8.9.4.1 </span>When the drag-and-drop operation starts or ends in another
+       <li><a href=#when-the-drag-and-drop-operation-starts-or-ends-in-another-document><span class=secno>8.8.4.1 </span>When the drag-and-drop operation starts or ends in another
   document</a></li>
-       <li><a href=#when-the-drag-and-drop-operation-starts-or-ends-in-another-application><span class=secno>8.9.4.2 </span>When the drag-and-drop operation starts or ends in another
+       <li><a href=#when-the-drag-and-drop-operation-starts-or-ends-in-another-application><span class=secno>8.8.4.2 </span>When the drag-and-drop operation starts or ends in another
   application</a></ol></li>
-     <li><a href=#the-draggable-attribute><span class=secno>8.9.5 </span>The <code>draggable</code> attribute</a></li>
-     <li><a href=#security-risks-in-the-drag-and-drop-model><span class=secno>8.9.6 </span>Security risks in the drag-and-drop model</a></ol></li>
-   <li><a href=#undo><span class=secno>8.10 </span>Undo history</a>
+     <li><a href=#the-draggable-attribute><span class=secno>8.8.5 </span>The <code>draggable</code> attribute</a></li>
+     <li><a href=#security-risks-in-the-drag-and-drop-model><span class=secno>8.8.6 </span>Security risks in the drag-and-drop model</a></ol></li>
+   <li><a href=#undo><span class=secno>8.9 </span>Undo history</a>
     <ol>
-     <li><a href=#definitions-2><span class=secno>8.10.1 </span>Definitions</a></li>
-     <li><a href=#the-undomanager-interface><span class=secno>8.10.2 </span>The <code>UndoManager</code> interface</a></li>
-     <li><a href=#undo:-moving-back-in-the-undo-transaction-history><span class=secno>8.10.3 </span>Undo: moving back in the undo transaction history</a></li>
-     <li><a href=#redo:-moving-forward-in-the-undo-transaction-history><span class=secno>8.10.4 </span>Redo: moving forward in the undo transaction history</a></li>
-     <li><a href=#the-undomanagerevent-interface-and-the-undo-and-redo-events><span class=secno>8.10.5 </span>The <code>UndoManagerEvent</code> interface and the <code title=event-undo>undo</code> and <code title=event-redo>redo</code> events</a></li>
-     <li><a href=#implementation-notes><span class=secno>8.10.6 </span>Implementation notes</a></ol></li>
-   <li><a href=#editing-apis><span class=secno>8.11 </span>Editing APIs</a></ol></li>
+     <li><a href=#definitions-2><span class=secno>8.9.1 </span>Definitions</a></li>
+     <li><a href=#the-undomanager-interface><span class=secno>8.9.2 </span>The <code>UndoManager</code> interface</a></li>
+     <li><a href=#undo:-moving-back-in-the-undo-transaction-history><span class=secno>8.9.3 </span>Undo: moving back in the undo transaction history</a></li>
+     <li><a href=#redo:-moving-forward-in-the-undo-transaction-history><span class=secno>8.9.4 </span>Redo: moving forward in the undo transaction history</a></li>
+     <li><a href=#the-undomanagerevent-interface-and-the-undo-and-redo-events><span class=secno>8.9.5 </span>The <code>UndoManagerEvent</code> interface and the <code title=event-undo>undo</code> and <code title=event-redo>redo</code> events</a></li>
+     <li><a href=#implementation-notes><span class=secno>8.9.6 </span>Implementation notes</a></ol></li>
+   <li><a href=#editing-apis><span class=secno>8.10 </span>Editing APIs</a></ol></li>
  <li><a href=#comms><span class=secno>9 </span>Communication</a>
   <ol>
    <li><a href=#event-definitions-0><span class=secno>9.1 </span>Event definitions</a></li>
@@ -8055,7 +8053,6 @@
 
   // <a href=#editing>user interaction</a>
   readonly attribute <a href=#windowproxy>WindowProxy</a> <a href=#dom-document-defaultview title=dom-document-defaultView>defaultView</a>;
-  <a href=#selection-0>Selection</a> <a href=#dom-document-getselection title=dom-document-getSelection>getSelection</a>();
   readonly attribute <a href=#element>Element</a> <a href=#dom-document-activeelement title=dom-document-activeElement>activeElement</a>;
   boolean <a href=#dom-document-hasfocus title=dom-document-hasFocus>hasFocus</a>();
            attribute DOMString <a href=#designMode title=dom-document-designMode>designMode</a>;
@@ -11487,12 +11484,13 @@
    <li><p>Replace the <code><a href=#document>Document</a></code>'s singleton objects with
    new instances of those objects. (This includes in particular the
    <code><a href=#window>Window</a></code>, <code><a href=#location>Location</a></code>, <code><a href=#history-0>History</a></code>,
-   <code><a href=#applicationcache>ApplicationCache</a></code>, <code><a href=#undomanager>UndoManager</a></code>,
-   <code><a href=#navigator>Navigator</a></code>, and <code><a href=#selection-0>Selection</a></code> objects, the
-   various <code><a href=#barprop>BarProp</a></code> objects, the two <code>Storage</code>
-   objects, and the various <code><a href=#htmlcollection>HTMLCollection</a></code> objects. It
-   also includes all the Web IDL prototypes in the JavaScript binding,
-   including the <code><a href=#document>Document</a></code> object's prototype.)</li>
+   <code><a href=#applicationcache>ApplicationCache</a></code>, <code><a href=#undomanager>UndoManager</a></code>, and
+   <code><a href=#navigator>Navigator</a></code>, objects, the various <code><a href=#barprop>BarProp</a></code>
+   objects, the two <code>Storage</code> objects, the various
+   <code><a href=#htmlcollection>HTMLCollection</a></code> objects, and objects defined by other
+   specifications, like <code>Selection</code>. It also includes all
+   the Web IDL prototypes in the JavaScript binding, including the
+   <code><a href=#document>Document</a></code> object's prototype.)</li>
 
    <!-- http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E...%3Ciframe%20src%3D%22document%22%3E%3C%2Fiframe%3E%0A%3Cscript%3Eonload%20%3D%20function%20()%20%7B%20f%20%3D%20document.getElementsByTagName('iframe')%5B0%5D%3B%20d%20%3D%20f.contentWindow.document%3B%20%7D%3C%2Fscript%3E%0A%3Cinput%20type%3Dbutton%20onclick%3D%22w(d.documentElement.innerHTML)%22%20value%3D%22dump%22%3E%0A%3Cinput%20type%3Dbutton%20onclick%3D%22d.open()%3B%20d.write('%3Cscript%3Evar%20x%20%3D%20new%20XMLHttpRequest()%3Bx.open(%26quot%3BGET%26quot%3B%2C%20%26quot%3BGET%26quot%3B)%3Bx.onreadystatechange%3Dfunction()%20%7B%20alert(x.readyState)%3B%20%7D%3Bx.send(null)%3B%3C%2Fscript%3E')%3Bd.close()%3B%20setTimeout(function()%20%7B%20d.open()%3B%20d.write('%3Cp%3Etest%3C%2Fp%3E')%3B%20d.close()%20%7D%2C%200)%3B%22%20value%3D%22xhr%22%3E%0A%3Cinput%20type%3Dbutton%20onclick%3D%22d.onclick%20%3D%20function()%20%7B%20w('click')%20%7D%22%20value%3D%22add%20click%20handler%22%3E%
 0A%3Cinput%20type%3Dbutton%20onclick%3D%22d.open()%3B%20d.write('%3Cp%3Etest%3C%2Fp%3E')%3B%20d.close()%22%20value%3D%22replace%22%3E%0A%3Cinput%20type%3Dbutton%20onclick%3D%22d.open()%3B%20d.write('%3Cp%3E%3Cscript%3Ei%20%3D%200%3B%20setTimeout(%26quot%3Bparent.w(i%2B%2B)%26quot%3B%2C%202000)%3C%2Fscript%3E%3C%2Fp%3E')%3B%20d.close()%22%20value%3D%22replace%20with%20timer%22%3E -->
    <!-- http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%0D%0A...%3Ciframe%3E%3C%2Fiframe%3E%0D%0A%3Cscript%3E%0D%0Aonload%20%3D%20function%20()%20%7B%0D%0A%20frames%5B0%5D.test%20%3D%201%0D%0A%20w(frames%5B0%5D.test)%3B%0D%0A%20var%20a%20%3D%20frames%5B0%5D.document.location.assign%3B%0D%0A%20w(a)%3B%0D%0A%20w(frames%5B0%5D.document.location.assign%20%3D%3D%3D%20a)%3B%0D%0A%20frames%5B0%5D.document.open()%3B%0D%0A%20frames%5B0%5D.document.write('%3Cscript%3Edocument.write(test)%3C%5C%2Fscript%3E')%3B%0D%0A%20frames%5B0%5D.document.close()%3B%0D%0A%20w(frames%5B0%5D.test)%3B%0D%0A%20w(frames%5B0%5D.document.location.assign%20%3D%3D%3D%20a)%3B%0D%0A%7D%0D%0A%3C%2Fscript%3E -->
@@ -46038,10 +46036,134 @@
 
 
 
-  <h4 id=constraints><span class=secno>4.10.20 </span>Constraints</h4>
+  <h3 id=textFieldSelection><span class=secno>4.11 </span>APIs for the text field selections</h3>
 
-  <h5 id=definitions><span class=secno>4.10.20.1 </span>Definitions</h5>
+  <!-- v2 idea: DOM Range APIs to expose the textarea/input edited
+  value (ack martijnw) -->
 
+  <p>The <code><a href=#the-input-element>input</a></code> and <code><a href=#the-textarea-element>textarea</a></code> elements define
+  the following members in their DOM interfaces for handling their
+  selection:</p>
+
+  <pre class="idl extract">  void <a href=#dom-textarea/input-select title=dom-textarea/input-select>select</a>();
+           attribute unsigned long <a href=#dom-textarea/input-selectionstart title=dom-textarea/input-selectionStart>selectionStart</a>;
+           attribute unsigned long <a href=#dom-textarea/input-selectionend title=dom-textarea/input-selectionEnd>selectionEnd</a>;
+  void <a href=#dom-textarea/input-setselectionrange title=dom-textarea/input-setSelectionRange>setSelectionRange</a>(in unsigned long start, in unsigned long end);</pre>
+  <!-- v2: also add textLength? it seems to be widely used -->
+
+  <p>These methods and attributes expose and control the selection of
+  <code><a href=#the-input-element>input</a></code> and <code><a href=#the-textarea-element>textarea</a></code> text fields.</p>
+
+  <dl class=domintro><dt><var title="">element</var> . <code title=dom-textarea/input-select><a href=#dom-textarea/input-select>select</a></code>()</dt>
+
+   <dd>
+
+    <p>Selects everything in the text field.</p>
+
+   </dd>
+
+   <dt><var title="">element</var> . <code title=dom-textarea/input-selecionStart>selectionStart</code> [ = <var title="">value</var> ]</dt>
+
+   <dd>
+
+    <p>Returns the offset to the start of the selection.</p>
+
+    <p>Can be set, to change the start of the selection.</p>
+
+   </dd>
+
+   <dt><var title="">element</var> . <code title=dom-textarea/input-selecionEnd>selectionEnd</code> [ = <var title="">value</var> ]</dt>
+
+   <dd>
+
+    <p>Returns the offset to the end of the selection.</p>
+
+    <p>Can be set, to change the end of the selection.</p>
+
+   </dd>
+
+   <dt><var title="">element</var> . <code title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-setselectionrange>setSelectionRange</a></code>(<var title="">start</var>, <var title="">end</var>)</dt>
+
+   <dd>
+
+    <p>Changes the selection to cover the given substring.</p>
+
+   </dd>
+
+  </dl><div class=impl>
+
+  <p>When these methods and attributes are used with
+  <code><a href=#the-input-element>input</a></code> elements while they don't apply, they must raise
+  an <code><a href=#invalid_state_err>INVALID_STATE_ERR</a></code> exception. Otherwise, they must
+  act as described below.</p>
+
+  <p>The <dfn id=dom-textarea/input-select 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 id=dom-textarea/input-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>
+
+  <p>On setting, it must act as if the <code title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-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=#dom-textarea/input-selectionend>selectionEnd</a></code>
+  attribute as the second argument, unless the current value of the
+  <code title=dom-textarea/input-selectionEnd><a href=#dom-textarea/input-selectionend>selectionEnd</a></code> is
+  less than the new value, in which case the second argument must also
+  be the new value.</p>
+
+  <p>The <dfn id=dom-textarea/input-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>
+
+  <p>On setting, it must act as if the <code title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-setselectionrange>setSelectionRange()</a></code>
+  method had been called, with the current value of the <code title=dom-textarea/input-selectionStart><a href=#dom-textarea/input-selectionstart>selectionStart</a></code>
+  attribute as the first argument, and new value as the second
+  argument.</p>
+
+  <p>The <dfn id=dom-textarea/input-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 title="">(<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>
+
+  <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><a href=#the-input-element>input</a></code>
+   or <code><a href=#the-textarea-element>textarea</a></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>
+
+
+
+  <h4 id=constraints><span class=secno>4.11.1 </span>Constraints</h4>
+
+  <h5 id=definitions><span class=secno>4.11.1.1 </span>Definitions</h5>
+
   <div class=impl>
 
   <p>A <a href=#category-listed title=category-listed>listed form-associated
@@ -46128,7 +46250,7 @@
 
   <div class=impl>
 
-  <h5 id=constraint-validation><span class=secno>4.10.20.2 </span>Constraint validation</h5>
+  <h5 id=constraint-validation><span class=secno>4.11.1.2 </span>Constraint validation</h5>
 
   <p>When the user agent is required to <dfn id=statically-validate-the-constraints>statically validate the
   constraints</dfn> of <code><a href=#the-form-element>form</a></code> element <var title="">form</var>, it must run the following steps, which return
@@ -46212,7 +46334,7 @@
 
 
 
-  <h5 id=the-constraint-validation-api><span class=secno>4.10.20.3 </span>The <dfn>constraint validation API</dfn></h5>
+  <h5 id=the-constraint-validation-api><span class=secno>4.11.1.3 </span>The <dfn>constraint validation API</dfn></h5>
 
   <dl class=domintro><dt><var title="">element</var> . <code title=dom-cva-willValidate><a href=#dom-cva-willvalidate>willValidate</a></code></dt>
 
@@ -46443,7 +46565,7 @@
   </div>
 
 
-  <h5 id=security-forms><span class=secno>4.10.20.4 </span>Security</h5>
+  <h5 id=security-forms><span class=secno>4.11.1.4 </span>Security</h5>
 
   <p id=security-0>Servers should not rely on client-side
   validation. Client-side validation can be intentionally bypassed by
@@ -46455,11 +46577,11 @@
 
 
 
-  <h4 id=form-submission><span class=secno>4.10.21 </span><dfn>Form submission</dfn></h4>
+  <h4 id=form-submission><span class=secno>4.11.2 </span><dfn>Form submission</dfn></h4>
 
   <div class=impl>
 
-  <h5 id=introduction-1><span class=secno>4.10.21.1 </span>Introduction</h5>
+  <h5 id=introduction-1><span class=secno>4.11.2.1 </span>Introduction</h5>
 
   </div>
 
@@ -46507,7 +46629,7 @@
 
   <div class=impl>
 
-  <h5 id=implicit-submission><span class=secno>4.10.21.2 </span>Implicit submission</h5>
+  <h5 id=implicit-submission><span class=secno>4.11.2.2 </span>Implicit submission</h5>
 
   <p>User agents may establish a <a href=#concept-button title=concept-button>button</a> in each form as being the
   form's <dfn id=default-button>default button</dfn>. This should be the first <a href=#concept-submit-button title=concept-submit-button>submit button</a> in <a href=#tree-order>tree
@@ -46536,7 +46658,7 @@
 
   <div class=impl>
 
-  <h5 id=form-submission-algorithm><span class=secno>4.10.21.3 </span>Form submission algorithm</h5>
+  <h5 id=form-submission-algorithm><span class=secno>4.11.2.3 </span>Form submission algorithm</h5>
 
   <p>When a <code><a href=#the-form-element>form</a></code> element <var title="">form</var> is <dfn id=concept-form-submit title=concept-form-submit>submitted</dfn> from an element <var title="">submitter</var> (typically a button), optionally with a
   <var title="">scripted-submit</var> flag set, the user agent must
@@ -47008,7 +47130,7 @@
 
   <div class=impl>
 
-  <h5 id=url-encoded-form-data><span class=secno>4.10.21.4 </span>URL-encoded form data</h5>
+  <h5 id=url-encoded-form-data><span class=secno>4.11.2.4 </span>URL-encoded form data</h5>
 
   <p>The <dfn id=application/x-www-form-urlencoded-encoding-algorithm><code title="">application/x-www-form-urlencoded</code> encoding
   algorithm</dfn> is as follows:</p>
@@ -47143,7 +47265,7 @@
 
   <div class=impl>
 
-  <h5 id=multipart-form-data><span class=secno>4.10.21.5 </span>Multipart form data</h5>
+  <h5 id=multipart-form-data><span class=secno>4.11.2.5 </span>Multipart form data</h5>
 
   <!-- http://hixie.ch/tests/adhoc/html/forms/submission/multipart_form-data/ -->
 
@@ -47230,7 +47352,7 @@
 
   <div class=impl>
 
-  <h5 id=plain-text-form-data><span class=secno>4.10.21.6 </span>Plain text form data</h5>
+  <h5 id=plain-text-form-data><span class=secno>4.11.2.6 </span>Plain text form data</h5>
 
   <p>The <dfn id=text/plain-encoding-algorithm><code title="">text/plain</code> encoding
   algorithm</dfn> is as follows:</p>
@@ -47288,7 +47410,7 @@
 
   <div class=impl>
 
-  <h4 id=resetting-a-form><span class=secno>4.10.22 </span>Resetting a form</h4>
+  <h4 id=resetting-a-form><span class=secno>4.11.3 </span>Resetting a form</h4>
 
   <p>When a <code><a href=#the-form-element>form</a></code> element <var title="">form</var> is <dfn id=concept-form-reset title=concept-form-reset>reset</dfn>, the user agent must
   <a href=#fire-a-simple-event>fire a simple event</a> named <code title=event-reset>reset</code>, that is cancelable, at <var title="">form</var>, and then, if that event is not canceled, must
@@ -47309,7 +47431,7 @@
 
   <div class=impl>
 
-  <h4 id=event-dispatch><span class=secno>4.10.23 </span>Event dispatch</h4>
+  <h4 id=event-dispatch><span class=secno>4.11.4 </span>Event dispatch</h4>
 
   <p>When the user agent is to <dfn id=broadcast-forminput-events>broadcast <code title=event-forminput>forminput</code> events</dfn> or
   <dfn id=broadcast-formchange-events>broadcast <code title=event-formchange>formchange</code>
@@ -47328,9 +47450,9 @@
   </ol></div>
 
 
-  <h3 id=interactive-elements><span class=secno>4.11 </span>Interactive elements</h3>
+  <h3 id=interactive-elements><span class=secno>4.12 </span>Interactive elements</h3>
 
-  <h4 id=the-details-element><span class=secno>4.11.1 </span>The <dfn><code>details</code></dfn> element</h4>
+  <h4 id=the-details-element><span class=secno>4.12.1 </span>The <dfn><code>details</code></dfn> element</h4>
 
   <dl class=element><dt>Categories</dt>
    <dd><a href=#flow-content>Flow content</a>.</dd>
@@ -47431,7 +47553,7 @@
   </div>
 
 
-  <h4 id=the-summary-element><span class=secno>4.11.2 </span>The <dfn><code>summary</code></dfn> element</h4>
+  <h4 id=the-summary-element><span class=secno>4.12.2 </span>The <dfn><code>summary</code></dfn> element</h4>
 
   <dl class=element><dt>Categories</dt>
    <dd>None.</dd>
@@ -50054,7 +50176,7 @@
 
 -->
 
-  <h4 id=the-command><span class=secno>4.11.3 </span>The <dfn><code>command</code></dfn> element</h4>
+  <h4 id=the-command><span class=secno>4.12.3 </span>The <dfn><code>command</code></dfn> element</h4>
 
   <dl class=element><dt>Categories</dt>
    <dd><a href=#metadata-content>Metadata content</a>.</dd>
@@ -50278,7 +50400,7 @@
 
 
 
-  <h4 id=menus><span class=secno>4.11.4 </span>The <dfn><code>menu</code></dfn> element</h4>
+  <h4 id=menus><span class=secno>4.12.4 </span>The <dfn><code>menu</code></dfn> element</h4>
 
   <dl class=element><dt>Categories</dt>
    <dd><a href=#flow-content>Flow content</a>.</dd>
@@ -50346,7 +50468,7 @@
 
 
 
-  <h5 id=menus-intro><span class=secno>4.11.4.1 </span>Introduction</h5>
+  <h5 id=menus-intro><span class=secno>4.12.4.1 </span>Introduction</h5>
 
   <p><i>This section is non-normative.</i></p>
 
@@ -50421,7 +50543,7 @@
 
   <div class=impl>
 
-  <h5 id=building-menus-and-toolbars><span class=secno>4.11.4.2 </span><dfn>Building menus and toolbars</dfn></h5>
+  <h5 id=building-menus-and-toolbars><span class=secno>4.12.4.2 </span><dfn>Building menus and toolbars</dfn></h5>
 
   <p>A menu (or toolbar) consists of a list of zero or more of the
   following components:</p>
@@ -50506,7 +50628,7 @@
 
 
 
-  <h5 id=context-menus><span class=secno>4.11.4.3 </span><dfn>Context menus</dfn></h5>
+  <h5 id=context-menus><span class=secno>4.12.4.3 </span><dfn>Context menus</dfn></h5>
 
   <p>The <dfn id=attr-contextmenu title=attr-contextmenu><code>contextmenu</code></dfn>
   attribute gives the element's <a href=#context-menus title="context menus">context
@@ -50613,7 +50735,7 @@
 
   <div class=impl>
 
-  <h5 id=toolbars><span class=secno>4.11.4.4 </span><dfn>Toolbars</dfn></h5>
+  <h5 id=toolbars><span class=secno>4.12.4.4 </span><dfn>Toolbars</dfn></h5>
 
   <p>When a <code><a href=#menus>menu</a></code> element has a <code title=attr-menu-type><a href=#attr-menu-type>type</a></code> attribute in the <a href=#toolbar-state title="toolbar state">toolbar</a> state, then the user agent
   must <a href=#building-menus-and-toolbars title="building menus and toolbars">build</a> the
@@ -50628,7 +50750,7 @@
 
 
 
-  <h4 id=commands><span class=secno>4.11.5 </span>Commands</h4>
+  <h4 id=commands><span class=secno>4.12.5 </span>Commands</h4>
 
   <p>A <dfn id=concept-command title=concept-command>command</dfn> is the abstraction
   behind menu items, buttons, and links.<!--v2COMMAND: Once a command
@@ -50880,7 +51002,7 @@
 
   <div class=impl>
 
-  <h5 id=using-the-a-element-to-define-a-command><span class=secno>4.11.5.1 </span><dfn title=a-command>Using the <code>a</code> element to define a command</dfn></h5>
+  <h5 id=using-the-a-element-to-define-a-command><span class=secno>4.12.5.1 </span><dfn title=a-command>Using the <code>a</code> element to define a command</dfn></h5>
 
   <p>An <code><a href=#the-a-element>a</a></code> element with an <code title=attr-hyperlink-href><a href=#attr-hyperlink-href>href</a></code> attribute <a href=#concept-command title=concept-command>defines a command</a>.</p>
 
@@ -50926,7 +51048,7 @@
   command is to <a href=#fire-a-click-event title="fire a click event">fire a <code title=event-click>click</code> event</a> at the element.</p>
 
 
-  <h5 id=using-the-button-element-to-define-a-command><span class=secno>4.11.5.2 </span><dfn title=button-command>Using the <code>button</code> element to define a command</dfn></h5>
+  <h5 id=using-the-button-element-to-define-a-command><span class=secno>4.12.5.2 </span><dfn title=button-command>Using the <code>button</code> element to define a command</dfn></h5>
 
   <p>A <code><a href=#the-button-element>button</a></code> element always <a href=#concept-command title=concept-command>defines a command</a>.</p>
 
@@ -50938,7 +51060,7 @@
   State</a> of the command mirrors the <a href=#concept-fe-disabled title=concept-fe-disabled>disabled</a> state of the button.</p>
 
 
-  <h5 id=using-the-input-element-to-define-a-command><span class=secno>4.11.5.3 </span><dfn title=input-command>Using the <code>input</code> element to define a command</dfn></h5>
+  <h5 id=using-the-input-element-to-define-a-command><span class=secno>4.12.5.3 </span><dfn title=input-command>Using the <code>input</code> element to define a command</dfn></h5>
 
   <p>An <code><a href=#the-input-element>input</a></code> element whose <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute is in one of the <a href=#submit-button-state title=attr-input-type-submit>Submit Button</a>, <a href=#reset-button-state title=attr-input-type-reset>Reset Button</a>, <a href=#image-button-state title=attr-input-type-image>Image Button</a>, <a href=#button-state title=attr-input-type-button>Button</a>, <a href=#radio-button-state title=attr-input-type-radio>Radio Button</a>, or <a href=#checkbox-state title=attr-input-type-checkbox>Checkbox</a> states <a href=#concept-command title=concept-command>defines a command</a>.</p>
 
@@ -51009,7 +51131,7 @@
   element.</p>
 
 
-  <h5 id=using-the-option-element-to-define-a-command><span class=secno>4.11.5.4 </span><dfn title=option-command>Using the <code>option</code> element to define a command</dfn></h5>
+  <h5 id=using-the-option-element-to-define-a-command><span class=secno>4.12.5.4 </span><dfn title=option-command>Using the <code>option</code> element to define a command</dfn></h5>
 
   <p>An <code><a href=#the-option-element>option</a></code> element with an ancestor
   <code><a href=#the-select-element>select</a></code> element and either no <code title=attr-option-value><a href=#attr-option-value>value</a></code> attribute or a <code title=attr-option-value><a href=#attr-option-value>value</a></code> attribute that is not the
@@ -51062,7 +51184,7 @@
   element.</p>
 
 
-  <h5 id=using-the-command-element-to-define-a-command><span class=secno>4.11.5.5 </span>Using the <dfn title=command-element><code>command</code></dfn> element to define
+  <h5 id=using-the-command-element-to-define-a-command><span class=secno>4.12.5.5 </span>Using the <dfn title=command-element><code>command</code></dfn> element to define
   a command</h5>
 
   <p>A <code><a href=#the-command>command</a></code> element <a href=#concept-command title=concept-command>defines a command</a>.</p>
@@ -51119,7 +51241,7 @@
 
 
 
-  <h5 id=using-the-accesskey-attribute-on-a-label-element-to-define-a-command><span class=secno>4.11.5.6 </span><dfn title=label-command>Using the <code title=attr-accesskey>accesskey</code> attribute on a <code>label</code> element to define a command</dfn></h5>
+  <h5 id=using-the-accesskey-attribute-on-a-label-element-to-define-a-command><span class=secno>4.12.5.6 </span><dfn title=label-command>Using the <code title=attr-accesskey>accesskey</code> attribute on a <code>label</code> element to define a command</dfn></h5>
 
   <p>A <code><a href=#the-label-element>label</a></code> element that has an <a href=#assigned-access-key>assigned access
   key</a> and a <a href=#labeled-control>labeled control</a> and whose
@@ -51160,7 +51282,7 @@
 
 
 
-  <h5 id=using-the-accesskey-attribute-on-a-legend-element-to-define-a-command><span class=secno>4.11.5.7 </span><dfn title=legend-command>Using the <code title=attr-accesskey>accesskey</code> attribute on a <code>legend</code> element to define a command</dfn></h5>
+  <h5 id=using-the-accesskey-attribute-on-a-legend-element-to-define-a-command><span class=secno>4.12.5.7 </span><dfn title=legend-command>Using the <code title=attr-accesskey>accesskey</code> attribute on a <code>legend</code> element to define a command</dfn></h5>
 
   <p>A <code><a href=#the-legend-element>legend</a></code> element that has an <a href=#assigned-access-key>assigned access
   key</a> and is a child of a <code><a href=#the-fieldset-element>fieldset</a></code> element that
@@ -51204,7 +51326,7 @@
 
 
 
-  <h5 id=using-the-accesskey-attribute-to-define-a-command-on-other-elements><span class=secno>4.11.5.8 </span><dfn title=accesskey-command>Using the <code title=attr-accesskey>accesskey</code> attribute to define a command on other elements</dfn></h5>
+  <h5 id=using-the-accesskey-attribute-to-define-a-command-on-other-elements><span class=secno>4.12.5.8 </span><dfn title=accesskey-command>Using the <code title=attr-accesskey>accesskey</code> attribute to define a command on other elements</dfn></h5>
 
   <p>An element that has an <a href=#assigned-access-key>assigned access key</a> <a href=#concept-command title=concept-command>defines a command</a>.</p>
 
@@ -51271,7 +51393,7 @@
 <div data-component="other Hixie drafts (editor: Ian Hickson)">
 
 
-  <h4 id=devices><span class=secno>4.11.6 </span>The <dfn><code>device</code></dfn> element</h4>
+  <h4 id=devices><span class=secno>4.12.6 </span>The <dfn><code>device</code></dfn> element</h4>
 
   <dl class=element><dt>Categories</dt>
    <dd><a href=#flow-content>Flow content</a>.</dd>
@@ -51345,7 +51467,7 @@
   </div>
 
 
-  <h5 id=stream-api><span class=secno>4.11.6.1 </span>Stream API</h5>
+  <h5 id=stream-api><span class=secno>4.12.6.1 </span>Stream API</h5>
 
   <p>The <code><a href=#stream>Stream</a></code> interface is used to represent
   streams.</p>
@@ -51385,7 +51507,7 @@
   <p class=XXX>This again will be pinned down to a specific codec.</p>
 
 
-  <h5 id=peer-to-peer-connections><span class=secno>4.11.6.2 </span>Peer-to-peer connections</h5>
+  <h5 id=peer-to-peer-connections><span class=secno>4.12.6.2 </span>Peer-to-peer connections</h5>
 
   <p class=XXX>This section will be moved to a more appropriate
   location in due course; it is here currently to keep it near the
@@ -51491,9 +51613,9 @@
 
 
 
-  <h3 id=links><span class=secno>4.12 </span>Links</h3>
+  <h3 id=links><span class=secno>4.13 </span>Links</h3>
 
-  <h4 id=introduction-2><span class=secno>4.12.1 </span>Introduction</h4>
+  <h4 id=introduction-2><span class=secno>4.13.1 </span>Introduction</h4>
 
   <p>Links are a conceptual construct, created by <code><a href=#the-a-element>a</a></code>,
   <code><a href=#the-area-element>area</a></code>, and <code><a href=#the-link-element>link</a></code> elements, that <a href=#represents title=represents>represent</a> a connection between two
@@ -51538,7 +51660,7 @@
   the processing semantics of that hyperlink.</p>
 
 
-  <h4 id=links-created-by-a-and-area-elements><span class=secno>4.12.2 </span>Links created by <code><a href=#the-a-element>a</a></code> and <code><a href=#the-area-element>area</a></code> elements</h4>
+  <h4 id=links-created-by-a-and-area-elements><span class=secno>4.13.2 </span>Links created by <code><a href=#the-a-element>a</a></code> and <code><a href=#the-area-element>area</a></code> elements</h4>
 
   <p>The <dfn id=attr-hyperlink-href title=attr-hyperlink-href><code>href</code></dfn>
   attribute on <code><a href=#the-a-element>a</a></code> and <code><a href=#the-area-element>area</a></code> elements must have
@@ -51606,7 +51728,7 @@
 
   <div class=impl>
 
-  <h4 id=following-hyperlinks><span class=secno>4.12.3 </span><dfn>Following hyperlinks</dfn></h4>
+  <h4 id=following-hyperlinks><span class=secno>4.13.3 </span><dfn>Following hyperlinks</dfn></h4>
 
   <p>When a user <em>follows a hyperlink</em> created by an element,
   the user agent must <a href=#resolve-a-url title="resolve a url">resolve</a> the
@@ -51668,7 +51790,7 @@
 <!--PING-->
   <div class=impl>
 
-  <h5 id=hyperlink-auditing><span class=secno>4.12.3.1 </span><dfn>Hyperlink auditing</dfn></h5>
+  <h5 id=hyperlink-auditing><span class=secno>4.13.3.1 </span><dfn>Hyperlink auditing</dfn></h5>
 
   <p>If a <a href=#hyperlink>hyperlink</a> created by an <code><a href=#the-a-element>a</a></code> or
   <code><a href=#the-area-element>area</a></code> element has a <code title=attr-hyperlink-ping><a href=#ping>ping</a></code> attribute, and the user
@@ -51790,7 +51912,7 @@
 
 
 
-  <h4 id=linkTypes><span class=secno>4.12.4 </span>Link types</h4>
+  <h4 id=linkTypes><span class=secno>4.13.4 </span>Link types</h4>
 
   <p>The following table summarizes the link types that are defined by
   this specification. This table is non-normative; the actual
@@ -51938,7 +52060,7 @@
   -->
 
 
-  <h5 id=rel-alternate><span class=secno>4.12.4.1 </span>Link type "<dfn title=rel-alternate><code>alternate</code></dfn>"</h5>
+  <h5 id=rel-alternate><span class=secno>4.13.4.1 </span>Link type "<dfn title=rel-alternate><code>alternate</code></dfn>"</h5>
 
   <p>The <code title=rel-alternate><a href=#rel-alternate>alternate</a></code> keyword may be
   used with <code><a href=#the-link-element>link</a></code>, <code><a href=#the-a-element>a</a></code>, and <code><a href=#the-area-element>area</a></code>
@@ -52042,7 +52164,7 @@
 
    </dd>
 
-  </dl><h5 id=rel-archives><span class=secno>4.12.4.2 </span>Link type "<dfn title=rel-archives><code>archives</code></dfn>"</h5>
+  </dl><h5 id=rel-archives><span class=secno>4.13.4.2 </span>Link type "<dfn title=rel-archives><code>archives</code></dfn>"</h5>
 
   <p>The <code title=rel-archives><a href=#rel-archives>archives</a></code> keyword may be
   used with <code><a href=#the-link-element>link</a></code>, <code><a href=#the-a-element>a</a></code>, and <code><a href=#the-area-element>area</a></code>
@@ -52064,7 +52186,7 @@
   </div>
 
 
-  <h5 id=link-type-author><span class=secno>4.12.4.3 </span>Link type "<dfn title=rel-author><code>author</code></dfn>"</h5>
+  <h5 id=link-type-author><span class=secno>4.13.4.3 </span>Link type "<dfn title=rel-author><code>author</code></dfn>"</h5>
 
   <p>The <code title=rel-author><a href=#link-type-author>author</a></code> keyword may be
   used with <code><a href=#the-link-element>link</a></code>, <code><a href=#the-a-element>a</a></code>, and <code><a href=#the-area-element>area</a></code>
@@ -52095,7 +52217,7 @@
   </div>
 
 
-  <h5 id=link-type-bookmark><span class=secno>4.12.4.4 </span>Link type "<dfn title=rel-bookmark><code>bookmark</code></dfn>"</h5>
+  <h5 id=link-type-bookmark><span class=secno>4.13.4.4 </span>Link type "<dfn title=rel-bookmark><code>bookmark</code></dfn>"</h5>
 
   <p>The <code title=rel-bookmark><a href=#link-type-bookmark>bookmark</a></code> keyword may be
   used with <code><a href=#the-a-element>a</a></code> and <code><a href=#the-area-element>area</a></code> elements. This
@@ -52162,7 +52284,7 @@
 -->
 
 
-  <h5 id=link-type-external><span class=secno>4.12.4.5 </span>Link type "<dfn title=rel-external><code>external</code></dfn>"</h5>
+  <h5 id=link-type-external><span class=secno>4.13.4.5 </span>Link type "<dfn title=rel-external><code>external</code></dfn>"</h5>
 
   <p>The <code title=rel-external><a href=#link-type-external>external</a></code> keyword may be
   used with <code><a href=#the-a-element>a</a></code> and <code><a href=#the-area-element>area</a></code> elements. This
@@ -52173,7 +52295,7 @@
   that the current document forms a part of.</p>
 
 
-  <h5 id=link-type-help><span class=secno>4.12.4.6 </span>Link type "<dfn title=rel-help><code>help</code></dfn>"</h5>
+  <h5 id=link-type-help><span class=secno>4.13.4.6 </span>Link type "<dfn title=rel-help><code>help</code></dfn>"</h5>
 
   <p>The <code title=rel-help><a href=#link-type-help>help</a></code> keyword may be used with
   <code><a href=#the-link-element>link</a></code>, <code><a href=#the-a-element>a</a></code>, and <code><a href=#the-area-element>area</a></code>
@@ -52198,7 +52320,7 @@
   document provides help for the page as a whole.</p>
 
 
-  <h5 id=rel-icon><span class=secno>4.12.4.7 </span>Link type "<dfn title=rel-icon><code>icon</code></dfn>"</h5>
+  <h5 id=rel-icon><span class=secno>4.13.4.7 </span>Link type "<dfn title=rel-icon><code>icon</code></dfn>"</h5>
 
   <p>The <code title=rel-icon><a href=#rel-icon>icon</a></code> keyword may be used with
   <code><a href=#the-link-element>link</a></code> elements. This keyword creates an <a href=#external-resource-link title="external resource link">external resource link</a>.</p>
@@ -52327,7 +52449,7 @@
   </div>
 
 
-  <h5 id=link-type-license><span class=secno>4.12.4.8 </span>Link type "<dfn title=rel-license><code>license</code></dfn>"</h5>
+  <h5 id=link-type-license><span class=secno>4.13.4.8 </span>Link type "<dfn title=rel-license><code>license</code></dfn>"</h5>
 
   <p>The <code title=rel-license><a href=#link-type-license>license</a></code> keyword may be used
   with <code><a href=#the-link-element>link</a></code>, <code><a href=#the-a-element>a</a></code>, and <code><a href=#the-area-element>area</a></code>
@@ -52393,7 +52515,7 @@
   </div>
 
 
-  <h5 id=link-type-nofollow><span class=secno>4.12.4.9 </span>Link type "<dfn title=rel-nofollow><code>nofollow</code></dfn>"</h5>
+  <h5 id=link-type-nofollow><span class=secno>4.13.4.9 </span>Link type "<dfn title=rel-nofollow><code>nofollow</code></dfn>"</h5>
 
   <p>The <code title=rel-nofollow><a href=#link-type-nofollow>nofollow</a></code> keyword may be
   used with <code><a href=#the-a-element>a</a></code> and <code><a href=#the-area-element>area</a></code> elements. This
@@ -52408,7 +52530,7 @@
   affiliated with the two pages.</p>
 
 
-  <h5 id=link-type-noreferrer><span class=secno>4.12.4.10 </span>Link type "<dfn title=rel-noreferrer><code>noreferrer</code></dfn>"</h5>
+  <h5 id=link-type-noreferrer><span class=secno>4.13.4.10 </span>Link type "<dfn title=rel-noreferrer><code>noreferrer</code></dfn>"</h5>
 
   <p>The <code title=rel-noreferrer><a href=#link-type-noreferrer>noreferrer</a></code> keyword may be
   used with <code><a href=#the-a-element>a</a></code> and <code><a href=#the-area-element>area</a></code> elements. This
@@ -52436,7 +52558,7 @@
   e.g. letting <img> or CSS or <video> hide the referrer -->
 
 
-  <h5 id=link-type-pingback><span class=secno>4.12.4.11 </span>Link type "<dfn title=rel-pingback><code>pingback</code></dfn>"</h5>
+  <h5 id=link-type-pingback><span class=secno>4.13.4.11 </span>Link type "<dfn title=rel-pingback><code>pingback</code></dfn>"</h5>
 
   <p>The <code title=rel-pingback><a href=#link-type-pingback>pingback</a></code> keyword may be
   used with <code><a href=#the-link-element>link</a></code> elements. This keyword creates an <a href=#external-resource-link title="external resource link">external resource link</a>.</p>
@@ -52445,7 +52567,7 @@
   specification. <a href=#refsPINGBACK>[PINGBACK]</a></p>
 
 
-  <h5 id=link-type-prefetch><span class=secno>4.12.4.12 </span>Link type "<dfn title=rel-prefetch><code>prefetch</code></dfn>"</h5>
+  <h5 id=link-type-prefetch><span class=secno>4.13.4.12 </span>Link type "<dfn title=rel-prefetch><code>prefetch</code></dfn>"</h5>
 
   <p>The <code title=rel-prefetch><a href=#link-type-prefetch>prefetch</a></code> keyword may be
   used with <code><a href=#the-link-element>link</a></code>, <code><a href=#the-a-element>a</a></code>, and <code><a href=#the-area-element>area</a></code>
@@ -52460,7 +52582,7 @@
   <p>There is no default type for resources given by the <code title=rel-prefetch><a href=#link-type-prefetch>prefetch</a></code> keyword.</p>
 
 
-  <h5 id=link-type-search><span class=secno>4.12.4.13 </span>Link type "<dfn title=rel-search><code>search</code></dfn>"</h5>
+  <h5 id=link-type-search><span class=secno>4.13.4.13 </span>Link type "<dfn title=rel-search><code>search</code></dfn>"</h5>
 
   <p>The <code title=rel-search><a href=#link-type-search>search</a></code> keyword may be used
   with <code><a href=#the-link-element>link</a></code>, <code><a href=#the-a-element>a</a></code>, and <code><a href=#the-area-element>area</a></code>
@@ -52475,7 +52597,7 @@
   autodiscover search interfaces. <a href=#refsOPENSEARCH>[OPENSEARCH]</a></p>
 
 
-  <h5 id=link-type-stylesheet><span class=secno>4.12.4.14 </span>Link type "<dfn title=rel-stylesheet><code>stylesheet</code></dfn>"</h5>
+  <h5 id=link-type-stylesheet><span class=secno>4.13.4.14 </span>Link type "<dfn title=rel-stylesheet><code>stylesheet</code></dfn>"</h5>
 
   <p>The <code title=rel-stylesheet><a href=#link-type-stylesheet>stylesheet</a></code> keyword may be
   used with <code><a href=#the-link-element>link</a></code> elements. This keyword creates an <a href=#external-resource-link title="external resource link">external resource link</a> that
@@ -52514,7 +52636,7 @@
   </div>
 
 
-  <h5 id=link-type-sidebar><span class=secno>4.12.4.15 </span>Link type "<dfn title=rel-sidebar><code>sidebar</code></dfn>"</h5>
+  <h5 id=link-type-sidebar><span class=secno>4.13.4.15 </span>Link type "<dfn title=rel-sidebar><code>sidebar</code></dfn>"</h5>
 
   <p>The <code title=rel-sidebar><a href=#link-type-sidebar>sidebar</a></code> keyword may be used
   with <code><a href=#the-link-element>link</a></code>, <code><a href=#the-a-element>a</a></code>, and <code><a href=#the-area-element>area</a></code>
@@ -52528,7 +52650,7 @@
   <p>A <a href=#hyperlink>hyperlink</a> with the <code title=rel-sidebar><a href=#link-type-sidebar>sidebar</a></code> keyword specified is a <dfn id=rel-sidebar-hyperlink title=rel-sidebar-hyperlink>sidebar hyperlink</dfn>.</p>
 
 
-  <h5 id=link-type-tag><span class=secno>4.12.4.16 </span>Link type "<dfn title=rel-tag><code>tag</code></dfn>"</h5>
+  <h5 id=link-type-tag><span class=secno>4.13.4.16 </span>Link type "<dfn title=rel-tag><code>tag</code></dfn>"</h5>
 
   <p>The <code title=rel-tag><a href=#link-type-tag>tag</a></code> keyword may be used
   with <code><a href=#the-link-element>link</a></code>, <code><a href=#the-a-element>a</a></code>, and <code><a href=#the-area-element>area</a></code>
@@ -52544,7 +52666,7 @@
   the popular tag across a set of pages.</p>
 
 
-  <h5 id=hierarchical-link-types><span class=secno>4.12.4.17 </span>Hierarchical link types</h5>
+  <h5 id=hierarchical-link-types><span class=secno>4.13.4.17 </span>Hierarchical link types</h5>
 
   <p>Some documents form part of a hierarchical structure of
   documents.</p>
@@ -52557,7 +52679,7 @@
   <p>A document may be part of multiple hierarchies.</p>
 
 
-  <h6 id=link-type-index><span class=secno>4.12.4.17.1 </span>Link type "<dfn title=rel-index><code>index</code></dfn>"</h6>
+  <h6 id=link-type-index><span class=secno>4.13.4.17.1 </span>Link type "<dfn title=rel-index><code>index</code></dfn>"</h6>
 
   <p>The <code title=rel-index><a href=#link-type-index>index</a></code> keyword may be used with
   <code><a href=#the-link-element>link</a></code>, <code><a href=#the-a-element>a</a></code>, and <code><a href=#the-area-element>area</a></code>
@@ -52577,7 +52699,7 @@
   </div>
 
 
-  <h6 id=link-type-up><span class=secno>4.12.4.17.2 </span>Link type "<dfn title=rel-up><code>up</code></dfn>"</h6>
+  <h6 id=link-type-up><span class=secno>4.13.4.17.2 </span>Link type "<dfn title=rel-up><code>up</code></dfn>"</h6>
 
   <p>The <code title=rel-up><a href=#link-type-up>up</a></code> keyword may be used with
   <code><a href=#the-link-element>link</a></code>, <code><a href=#the-a-element>a</a></code>, and <code><a href=#the-area-element>area</a></code>
@@ -52647,7 +52769,7 @@
   interface hides duplicates).</p>
 
 
-  <h5 id=sequential-link-types><span class=secno>4.12.4.18 </span>Sequential link types</h5>
+  <h5 id=sequential-link-types><span class=secno>4.13.4.18 </span>Sequential link types</h5>
 
   <p>Some documents form part of a sequence of documents.</p>
 
@@ -52659,7 +52781,7 @@
   <p>A document may be part of multiple sequences.</p>
 
 
-  <h6 id=link-type-first><span class=secno>4.12.4.18.1 </span>Link type "<dfn title=rel-first><code>first</code></dfn>"</h6>
+  <h6 id=link-type-first><span class=secno>4.13.4.18.1 </span>Link type "<dfn title=rel-first><code>first</code></dfn>"</h6>
 
   <p>The <code title=rel-first><a href=#link-type-first>first</a></code> keyword may be used with
   <code><a href=#the-link-element>link</a></code>, <code><a href=#the-a-element>a</a></code>, and <code><a href=#the-area-element>area</a></code>
@@ -52678,7 +52800,7 @@
   </div>
 
 
-  <h6 id=link-type-last><span class=secno>4.12.4.18.2 </span>Link type "<dfn title=rel-last><code>last</code></dfn>"</h6>
+  <h6 id=link-type-last><span class=secno>4.13.4.18.2 </span>Link type "<dfn title=rel-last><code>last</code></dfn>"</h6>
 
   <p>The <code title=rel-last><a href=#link-type-last>last</a></code> keyword may be used with
   <code><a href=#the-link-element>link</a></code>, <code><a href=#the-a-element>a</a></code>, and <code><a href=#the-area-element>area</a></code>
@@ -52697,7 +52819,7 @@
   </div>
 
 
-  <h6 id=link-type-next><span class=secno>4.12.4.18.3 </span>Link type "<dfn title=rel-next><code>next</code></dfn>"</h6>
+  <h6 id=link-type-next><span class=secno>4.13.4.18.3 </span>Link type "<dfn title=rel-next><code>next</code></dfn>"</h6>
 
   <p>The <code title=rel-next><a href=#link-type-next>next</a></code> keyword may be used with
   <code><a href=#the-link-element>link</a></code>, <code><a href=#the-a-element>a</a></code>, and <code><a href=#the-area-element>area</a></code>
@@ -52708,7 +52830,7 @@
   document that is the next logical document in the sequence.</p>
 
 
-  <h6 id=link-type-prev><span class=secno>4.12.4.18.4 </span>Link type "<dfn title=rel-prev><code>prev</code></dfn>"</h6>
+  <h6 id=link-type-prev><span class=secno>4.13.4.18.4 </span>Link type "<dfn title=rel-prev><code>prev</code></dfn>"</h6>
 
   <p>The <code title=rel-prev><a href=#link-type-prev>prev</a></code> keyword may be used with
   <code><a href=#the-link-element>link</a></code>, <code><a href=#the-a-element>a</a></code>, and <code><a href=#the-area-element>area</a></code>
@@ -52727,7 +52849,7 @@
   </div>
 
 
-  <h5 id=other-link-types><span class=secno>4.12.4.19 </span>Other link types</h5>
+  <h5 id=other-link-types><span class=secno>4.13.4.19 </span>Other link types</h5>
 
   <p><span title=concept-rel-extensions>Extensions to the predefined
   set of link types</span> may be registered in the <a href=http://wiki.whatwg.org/wiki/RelExtensions>WHATWG Wiki
@@ -52905,9 +53027,9 @@
 
 
 
-  <h3 id=common-idioms-without-dedicated-elements><span class=secno>4.13 </span>Common idioms without dedicated elements</h3>
+  <h3 id=common-idioms-without-dedicated-elements><span class=secno>4.14 </span>Common idioms without dedicated elements</h3>
 
-  <h4 id=the-main-part-of-the-content><span class=secno>4.13.1 </span>The main part of the content</h4>
+  <h4 id=the-main-part-of-the-content><span class=secno>4.14.1 </span>The main part of the content</h4>
 
   <p>The main content of a page — not including headers and
   footers, navigation links, sidebars, advertisements, and so forth
@@ -53072,7 +53194,7 @@
   </div>
 
 
-  <h4 id=tag-clouds><span class=secno>4.13.2 </span>Tag clouds</h4>
+  <h4 id=tag-clouds><span class=secno>4.14.2 </span>Tag clouds</h4>
 
   <p id=tag-cloud>This specification does not define any markup
   specifically for marking up lists of keywords that apply to a group
@@ -53124,7 +53246,7 @@
   </div>
 
 
-  <h4 id=conversations><span class=secno>4.13.3 </span>Conversations</h4>
+  <h4 id=conversations><span class=secno>4.14.3 </span>Conversations</h4>
 
   <!-- http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-September/022576.html -->
 
@@ -53170,7 +53292,7 @@
   </div>
 
 
-  <h4 id=footnotes><span class=secno>4.13.4 </span>Footnotes</h4>
+  <h4 id=footnotes><span class=secno>4.14.4 </span>Footnotes</h4>
 
   <p>HTML does not have a dedicated mechanism for marking up
   footnotes. Here are the recommended alternatives.</p>
@@ -53283,9 +53405,9 @@
 
   <div class=impl>
 
-  <h3 id=matching-html-elements-using-selectors><span class=secno>4.14 </span>Matching HTML elements using selectors</h3>
+  <h3 id=matching-html-elements-using-selectors><span class=secno>4.15 </span>Matching HTML elements using selectors</h3>
 
-  <h4 id=selectors><span class=secno>4.14.1 </span>Case-sensitivity</h4>
+  <h4 id=selectors><span class=secno>4.15.1 </span>Case-sensitivity</h4>
 
   <p>Attribute and element <em>names</em> of <a href=#html-elements>HTML
   elements</a> in <a href=#html-documents>HTML documents</a> must be treated as
@@ -53357,7 +53479,7 @@
   elements, which must be treated as <a href=#case-sensitive>case-sensitive</a>.</p>
 
 
-  <h4 id=pseudo-classes><span class=secno>4.14.2 </span>Pseudo-classes</h4>
+  <h4 id=pseudo-classes><span class=secno>4.15.2 </span>Pseudo-classes</h4>
 
   <p>There are a number of dynamic selectors that can be used with
   HTML. This section defines when these selectors match HTML
@@ -58924,7 +59046,6 @@
   [PutForwards=<a href=#dom-location-href title=dom-location-href>href</a>] readonly attribute <a href=#location>Location</a> <a href=#dom-location title=dom-location>location</a>;
   readonly attribute <a href=#history-0>History</a> <a href=#dom-history title=dom-history>history</a>;
   readonly attribute <a href=#undomanager>UndoManager</a> <a href=#dom-undomanager title=dom-undoManager>undoManager</a>;
-  <a href=#selection-0>Selection</a> <a href=#dom-getselection title=dom-getSelection>getSelection</a>();
   [Replaceable] readonly attribute <a href=#barprop>BarProp</a> <a href=#dom-window-locationbar title=dom-window-locationbar>locationbar</a>;
   [Replaceable] readonly attribute <a href=#barprop>BarProp</a> <a href=#dom-window-menubar title=dom-window-menubar>menubar</a>;
   [Replaceable] readonly attribute <a href=#barprop>BarProp</a> <a href=#dom-window-personalbar title=dom-window-personalbar>personalbar</a>;
@@ -67546,525 +67667,9 @@
   </div>
 
 
-  <h3 id=selection><span class=secno>8.6 </span>The text selection APIs</h3>
 
-  <p>Every <a href=#browsing-context>browsing context</a> has <dfn id=the-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 agent should allow the user 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>
+  <h3 id=contenteditable><span class=secno>8.6 </span>The <code title=attr-contenteditable><a href=#attr-contenteditable>contenteditable</a></code> attribute</h3>
 
-  <p>This one selection must be shared by all the content of the
-  browsing context (though not by nested <a href=#browsing-context 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>
-
-  <div class=impl>
-
-  <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>
-
-  </div>
-
-  <p>Mostly for historical reasons, in addition to the <a href=#browsing-context>browsing
-  context</a>'s <a href=#the-selection title="the selection">selection</a>, each
-  <code><a href=#the-textarea-element>textarea</a></code> and <code><a href=#the-input-element>input</a></code> element has an
-  independent selection. These are the <dfn id=text-field-selection title="text field
-  selection">text field selections</dfn>.</p>
-
-  <div class=impl>
-
-  <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>
-
-  </div>
-
-  <!-- v2DATAGRID v2DGS:
-  <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>The <code><a href=#the-select-element>select</a></code> element also has a selection, indicating
-  which items have been picked by the user. This is 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 title="selector-selection">::selection</code>
-  pseudo-element. <a href="#refsSELECTORS">[SELECTORS]</a> <a
-  href="#refsCSS">[CSS]</a> --></p>
-
-
-
-  <h4 id=documentSelection><span class=secno>8.6.1 </span>APIs for the browsing context selection</h4>
-
-  <dl class=domintro><dt><var title="">window</var> . <code title=dom-getSelection><a href=#dom-getselection>getSelection</a></code>()</dt>
-   <dt><var title="">document</var> . <code title=dom-document-getSelection><a href=#dom-document-getselection>getSelection</a></code>()</dt>
-
-   <dd>
-
-    <p>Returns the <code><a href=#selection-0>Selection</a></code> object for the window, which
-    stringifies to the text of the current selection.</p>
-
-   </dd>
-
-  </dl><div class=impl>
-
-  <p>The <dfn id=dom-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=#selection-0>Selection</a></code> object representing <a href=#the-selection>the
-  selection</a> of that <code><a href=#window>Window</a></code> object's
-  <a href=#browsing-context>browsing context</a>.
-
-  <p>For historical reasons, the <dfn id=dom-document-getselection 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=#selection-0>Selection</a></code> object.</p>
-
-  </div>
-
-  <pre class=idl>interface <dfn id=selection-0>Selection</dfn> {
-  readonly attribute Node <a href=#dom-selection-anchornode title=dom-selection-anchorNode>anchorNode</a>;
-  readonly attribute long <a href=#dom-selection-anchoroffset title=dom-selection-anchorOffset>anchorOffset</a>;
-  readonly attribute Node <a href=#dom-selection-focusnode title=dom-selection-focusNode>focusNode</a>;
-  readonly attribute long <a href=#dom-selection-focusoffset title=dom-selection-focusOffset>focusOffset</a>;
-  readonly attribute boolean <a href=#dom-selection-iscollapsed title=dom-selection-isCollapsed>isCollapsed</a>;
-  void <a href=#dom-selection-collapse title=dom-selection-collapse>collapse</a>(in Node parentNode, in long offset);
-  void <a href=#dom-selection-collapsetostart title=dom-selection-collapseToStart>collapseToStart</a>();
-  void <a href=#dom-selection-collapsetoend title=dom-selection-collapseToEnd>collapseToEnd</a>();
-  void <a href=#dom-selection-selectallchildren title=dom-selection-selectAllChildren>selectAllChildren</a>(in Node parentNode);
-  void <a href=#dom-selection-deletefromdocument title=dom-selection-deleteFromDocument>deleteFromDocument</a>();
-  readonly attribute long <a href=#dom-selection-rangecount title=dom-selection-rangeCount>rangeCount</a>;
-  Range <a href=#dom-selection-getrangeat title=dom-selection-getRangeAt>getRangeAt</a>(in long index);
-  void <a href=#dom-selection-addrange title=dom-selection-addRange>addRange</a>(in Range range);
-  void <a href=#dom-selection-removerange title=dom-selection-removeRange>removeRange</a>(in Range range);
-  void <a href=#dom-selection-removeallranges title=dom-selection-removeAllRanges>removeAllRanges</a>();
-  <a href=#dom-selection-tostring title=dom-selection-toString>stringifier</a> DOMString ();
-};</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=#selection-0>Selection</a></code> interface represents a list of
-  <code><a href=#range>Range</a></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=#refsDOMRANGE>[DOMRANGE]</a></p>
-
-  <p>All of the members of the <code><a href=#selection-0>Selection</a></code> interface are
-  defined in terms of operations on the <code><a href=#range>Range</a></code> objects
-  represented by this object. These operations can raise exceptions,
-  as defined for the <code><a href=#range>Range</a></code> interface; this can therefore
-  result in the members of the <code><a href=#selection-0>Selection</a></code> interface
-  raising exceptions as well, in addition to any explicitly called out
-  below.</p>
-
-  <dl class=domintro><dt><var title="">selection</var> . <code title=dom-selection-anchorNode><a href=#dom-selection-anchornode>anchorNode</a></code></dt>
-
-   <dd>
-
-    <p>Returns the element that contains the start of the selection.</p>
-
-    <p>Returns null if there's no selection.</p>
-
-   </dd>
-
-   <dt><var title="">selection</var> . <code title=dom-selection-anchorOffset><a href=#dom-selection-anchoroffset>anchorOffset</a></code></dt>
-
-   <dd>
-
-    <p>Returns the offset of the start of the selection relative to the element that contains the start of the selection.</p>
-
-    <p>Returns 0 if there's no selection.</p>
-
-   </dd>
-
-   <dt><var title="">selection</var> . <code title=dom-selection-focusNode><a href=#dom-selection-focusnode>focusNode</a></code></dt>
-
-   <dd>
-
-    <p>Returns the element that contains the end of the selection.</p>
-
-    <p>Returns null if there's no selection.</p>
-
-   </dd>
-
-   <dt><var title="">selection</var> . <code title=dom-selection-focusOffset><a href=#dom-selection-focusoffset>focusOffset</a></code></dt>
-
-   <dd>
-
-    <p>Returns the offset of the end of the selection relative to the element that contains the end of the selection.</p>
-
-    <p>Returns 0 if there's no selection.</p>
-
-   </dd>
-
-   <dt><var title="">collapsed</var> = <var title="">selection</var> . <code title=dom-selection-isCollapsed><a href=#dom-selection-iscollapsed>isCollapsed</a></code>()</dt>
-
-   <dd>
-
-    <p>Returns true if there's no selection or if the selection is empty. Otherwise, returns false.</p>
-
-   </dd>
-
-   <dt><var title="">selection</var> . <code title=dom-selection-collapse><a href=#dom-selection-collapse>collapse</a></code>(<var title="">parentNode</var>, <var title="">offset</var>)</dt>
-
-   <dd>
-
-    <p>Replaces the selection with an empty one at the given position.</p>
-
-    <p>Throws a <code><a href=#wrong_document_err>WRONG_DOCUMENT_ERR</a></code> exception if the given node is in a different document.</p>
-
-   </dd>
-
-   <dt><var title="">selection</var> . <code title=dom-selection-collapseToStart><a href=#dom-selection-collapsetostart>collapseToStart</a></code>()</dt>
-
-   <dd>
-
-    <p>Replaces the selection with an empty one at the position of the start of the current selection.</p>
-
-    <p>Throws an <code><a href=#invalid_state_err>INVALID_STATE_ERR</a></code> exception if there is no selection.</p>
-
-   </dd>
-
-   <dt><var title="">selection</var> . <code title=dom-selection-collapseToEnd><a href=#dom-selection-collapsetoend>collapseToEnd</a></code>()</dt>
-
-   <dd>
-
-    <p>Replaces the selection with an empty one at the position of the end of the current selection.</p>
-
-    <p>Throws an <code><a href=#invalid_state_err>INVALID_STATE_ERR</a></code> exception if there is no selection.</p>
-
-   </dd>
-
-   <dt><var title="">selection</var> . <code title=dom-selection-selectAllChildren><a href=#dom-selection-selectallchildren>selectAllChildren</a></code>(<var title="">parentNode</var>)</dt>
-
-   <dd>
-
-    <p>Replaces the selection with one that contains all the contents of the given element.</p>
-
-    <p>Throws a <code><a href=#wrong_document_err>WRONG_DOCUMENT_ERR</a></code> exception if the given node is in a different document.</p>
-
-   </dd>
-
-   <dt><var title="">selection</var> . <code title=dom-selection-deleteFromDocument><a href=#dom-selection-deletefromdocument>deleteFromDocument</a></code>()</dt>
-
-   <dd>
-
-    <p>Deletes the selection.</p>
-
-   </dd>
-
-   <dt><var title="">selection</var> . <code title=dom-selection-rangeCount><a href=#dom-selection-rangecount>rangeCount</a></code></dt>
-
-   <dd>
-
-    <p>Returns the number of ranges in the selection.</p>
-
-   </dd>
-
-   <dt><var title="">selection</var> . <code title=dom-selection-getRangeAt><a href=#dom-selection-getrangeat>getRangeAt</a></code>(<var title="">index</var>)</dt>
-
-   <dd>
-
-    <p>Returns the given range.</p>
-
-    <p>Throws an <code><a href=#index_size_err>INDEX_SIZE_ERR</a></code> exception if the value is out of range.</p>
-
-   </dd>
-
-   <dt><var title="">selection</var> . <code title=dom-selection-addRange><a href=#dom-selection-addrange>addRange</a></code>(<var title="">range</var>)</dt>
-
-   <dd>
-
-    <p>Adds the given range to the selection.</p>
-
-   </dd>
-
-   <dt><var title="">selection</var> . <code title=dom-selection-removeRange><a href=#dom-selection-removerange>removeRange</a></code>(<var title="">range</var>)</dt>
-
-   <dd>
-
-    <p>Removes the given range from the selection, if the range was one of the ones in the selection.</p>
-
-   </dd>
-
-   <dt><var title="">selection</var> . <code title=dom-selection-removeAllRanges><a href=#dom-selection-removeallranges>removeAllRanges</a></code>()</dt>
-
-   <dd>
-
-    <p>Removes all the ranges in the selection.</p>
-
-   </dd>
-
-  </dl><div class=impl>
-
-  <p>The <dfn id=dom-selection-anchornode title=dom-selection-anchorNode><code>anchorNode</code></dfn>
-  attribute must return the value returned by the <code title=dom-Range-startContainer><a href=#dom-range-startcontainer>startContainer</a></code> attribute of the last
-  <code><a href=#range>Range</a></code> object in the list, or null if the list is
-  empty.</p>
-
-  <p>The <dfn id=dom-selection-anchoroffset title=dom-selection-anchorOffset><code>anchorOffset</code></dfn>
-  attribute must return the value returned by the <code title=dom-Range-startOffset><a href=#dom-range-startoffset>startOffset</a></code> attribute of the last <code><a href=#range>Range</a></code>
-  object in the list, or 0 if the list is empty.</p>
-
-  <p>The <dfn id=dom-selection-focusnode title=dom-selection-focusNode><code>focusNode</code></dfn>
-  attribute must return the value returned by the <code title=dom-Range-endContainer><a href=#dom-range-endcontainer>endContainer</a></code> attribute of the last
-  <code><a href=#range>Range</a></code> object in the list, or null if the list is
-  empty.</p>
-
-  <p>The <dfn id=dom-selection-focusoffset title=dom-selection-focusOffset><code>focusOffset</code></dfn>
-  attribute must return the value returned by the <code title=dom-Range-endOffset><a href=#dom-range-endoffset>endOffset</a></code> attribute of the last <code><a href=#range>Range</a></code>
-  object in the list, or 0 if the list is empty.</p>
-
-  <p>The <dfn id=dom-selection-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=dom-Range-collapsed><a href=#dom-range-collapsed>collapsed</a></code> attribute
-  is itself true. Otherwise it must return false.</p>
-
-  <p>The <dfn id=dom-selection-collapse title=dom-selection-collapse><code>collapse(<var title="">parentNode</var>, <var title="">offset</var>)</code></dfn>
-  method must raise a <code><a href=#wrong_document_err>WRONG_DOCUMENT_ERR</a></code> DOM exception if
-  <var title="">parentNode</var>'s <code><a href=#document>Document</a></code> is not the
-  <code><a href=#htmldocument>HTMLDocument</a></code> object with which the
-  <code><a href=#selection-0>Selection</a></code> object is associated. Otherwise it is, and
-  the method must remove all the ranges in the <code><a href=#selection-0>Selection</a></code>
-  list, then create a new <code><a href=#range>Range</a></code> object, add it to the
-  list, and invoke its <code title=dom-Range-setStart()>setStart()</code> and <code title=dom-Range-setEnd()>setEnd()</code> methods with the <var title="">parentNode</var> and <var title="">offset</var> values as
-  their arguments.</p>
-
-  <p>The <dfn id=dom-selection-collapsetostart title=dom-selection-collapseToStart><code>collapseToStart()</code></dfn>
-  method must raise an <code><a href=#invalid_state_err>INVALID_STATE_ERR</a></code> DOM exception if
-  there are no ranges in the list. Otherwise, it must invoke the <code title=dom-selection-collapse><a href=#dom-selection-collapse>collapse()</a></code> method with the
-  <code title=dom-Range-startContainer><a href=#dom-range-startcontainer>startContainer</a></code> and <code title=dom-Range-startOffset><a href=#dom-range-startoffset>startOffset</a></code> values of the first <code><a href=#range>Range</a></code>
-  object in the list as the arguments.</p>
-
-  <p>The <dfn id=dom-selection-collapsetoend title=dom-selection-collapseToEnd><code>collapseToEnd()</code></dfn>
-  method must raise an <code><a href=#invalid_state_err>INVALID_STATE_ERR</a></code> DOM exception if
-  there are no ranges in the list. Otherwise, it must invoke the <code title=dom-selection-collapse><a href=#dom-selection-collapse>collapse()</a></code> method with the
-  <code title=dom-Range-endContainer><a href=#dom-range-endcontainer>endContainer</a></code> and <code title=dom-Range-endOffset><a href=#dom-range-endoffset>endOffset</a></code> values of the last <code><a href=#range>Range</a></code>
-  object in the list as the arguments.</p>
-
-  <p>The <dfn id=dom-selection-selectallchildren title=dom-selection-selectAllChildren><code>selectAllChildren(<var title="">parentNode</var>)</code></dfn>
-  method must invoke the <code title=dom-selection-collapse><a href=#dom-selection-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=dom-Range-selectNodeContents()>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 id=dom-selection-deletefromdocument title=dom-selection-deleteFromDocument><code>deleteFromDocument()</code></dfn>
-  method must invoke the <code title=dom-Range-deleteContents()>deleteContents()</code> method
-  on each range in the list, if any, from first to last.</p>
-
-  <p>The <dfn id=dom-selection-rangecount title=dom-selection-rangeCount><code>rangeCount</code></dfn>
-  attribute must return the number of ranges in the list.</p>
-
-  <p>The <dfn id=dom-selection-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=#dom-selection-rangecount>rangeCount</a></code> attribute, then
-  the method must raise an <code><a href=#index_size_err>INDEX_SIZE_ERR</a></code> DOM
-  exception.</p>
-
-  <p>The <dfn id=dom-selection-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=#dom-selection-tostring title=dom-selection-toString>stringification</a> to return the
-  range's text twice.</p>
-
-  <p>The <dfn id=dom-selection-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>
-
-  <p>The <dfn id=dom-selection-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=#dom-selection-rangecount>rangeCount</a></code>
-  attribute returns 0 after the <code title=dom-selection-removeAllRanges><a href=#dom-selection-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>
-
-  <p>Objects implementing this interface must <dfn id=dom-selection-tostring title=dom-selection-toString>stringify</dfn> to a concatenation
-  of the results of invoking the <code title="">toString()</code>
-  method of the <code><a href=#range>Range</a></code> object on each of the ranges of the
-  selection, in the order they appear in the list (first to last).</p>
-
-  </div>
-
-  <div class=example>
-   <p>In the following document fragment, the emphasized 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>
-
-  <!-- v2DATAGRID v2DGS:
-  <p class="note">The <code>Selection</code> interface has no relation
-  to the <code>DataGridSelection</code> interface.</p>
-  -->
-
-
-  <h4 id=textFieldSelection><span class=secno>8.6.2 </span>APIs for the text field selections</h4>
-
-  <!-- v2 idea: DOM Range APIs to expose the textarea/input edited
-  value (ack martijnw) -->
-
-  <p>The <code><a href=#the-input-element>input</a></code> and <code><a href=#the-textarea-element>textarea</a></code> elements define
-  the following members in their DOM interfaces for handling their
-  text selection:</p>
-
-  <pre class="idl extract">  void <a href=#dom-textarea/input-select title=dom-textarea/input-select>select</a>();
-           attribute unsigned long <a href=#dom-textarea/input-selectionstart title=dom-textarea/input-selectionStart>selectionStart</a>;
-           attribute unsigned long <a href=#dom-textarea/input-selectionend title=dom-textarea/input-selectionEnd>selectionEnd</a>;
-  void <a href=#dom-textarea/input-setselectionrange title=dom-textarea/input-setSelectionRange>setSelectionRange</a>(in unsigned long start, in unsigned long end);</pre>
-  <!-- v2: also add textLength? it seems to be widely used -->
-
-  <p>These methods and attributes expose and control the selection of
-  <code><a href=#the-input-element>input</a></code> and <code><a href=#the-textarea-element>textarea</a></code> text fields.</p>
-
-  <dl class=domintro><dt><var title="">element</var> . <code title=dom-textarea/input-select><a href=#dom-textarea/input-select>select</a></code>()</dt>
-
-   <dd>
-
-    <p>Selects everything in the text field.</p>
-
-   </dd>
-
-   <dt><var title="">element</var> . <code title=dom-textarea/input-selecionStart>selectionStart</code> [ = <var title="">value</var> ]</dt>
-
-   <dd>
-
-    <p>Returns the offset to the start of the selection.</p>
-
-    <p>Can be set, to change the start of the selection.</p>
-
-   </dd>
-
-   <dt><var title="">element</var> . <code title=dom-textarea/input-selecionEnd>selectionEnd</code> [ = <var title="">value</var> ]</dt>
-
-   <dd>
-
-    <p>Returns the offset to the end of the selection.</p>
-
-    <p>Can be set, to change the end of the selection.</p>
-
-   </dd>
-
-   <dt><var title="">element</var> . <code title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-setselectionrange>setSelectionRange</a></code>(<var title="">start</var>, <var title="">end</var>)</dt>
-
-   <dd>
-
-    <p>Changes the selection to cover the given substring.</p>
-
-   </dd>
-
-  </dl><div class=impl>
-
-  <p>When these methods and attributes are used with
-  <code><a href=#the-input-element>input</a></code> elements while they don't apply, they must raise
-  an <code><a href=#invalid_state_err>INVALID_STATE_ERR</a></code> exception. Otherwise, they must
-  act as described below.</p>
-
-  <p>The <dfn id=dom-textarea/input-select 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 id=dom-textarea/input-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>
-
-  <p>On setting, it must act as if the <code title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-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=#dom-textarea/input-selectionend>selectionEnd</a></code>
-  attribute as the second argument, unless the current value of the
-  <code title=dom-textarea/input-selectionEnd><a href=#dom-textarea/input-selectionend>selectionEnd</a></code> is
-  less than the new value, in which case the second argument must also
-  be the new value.</p>
-
-  <p>The <dfn id=dom-textarea/input-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>
-
-  <p>On setting, it must act as if the <code title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-setselectionrange>setSelectionRange()</a></code>
-  method had been called, with the current value of the <code title=dom-textarea/input-selectionStart><a href=#dom-textarea/input-selectionstart>selectionStart</a></code>
-  attribute as the first argument, and new value as the second
-  argument.</p>
-
-  <p>The <dfn id=dom-textarea/input-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 title="">(<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>
-
-  <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><a href=#the-input-element>input</a></code>
-   or <code><a href=#the-textarea-element>textarea</a></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>
-
-
-
-  <h3 id=contenteditable><span class=secno>8.7 </span>The <code title=attr-contenteditable><a href=#attr-contenteditable>contenteditable</a></code> attribute</h3>
-
   <p>The <dfn id=attr-contenteditable title=attr-contenteditable><code>contenteditable</code></dfn>
   attribute is an <a href=#enumerated-attribute>enumerated attribute</a> whose keywords are
   the empty string, <code title="">true</code>, and <code title="">false</code>. The empty string and the <code title="">true</code> keyword map to the <i>true</i> state. The <code title="">false</code> keyword maps to the <i>false</i> state. In
@@ -68154,9 +67759,8 @@
   editing hosts.</p>
 
   <p>When an editing host has focus, it must have a <dfn id=caret-position>caret
-  position</dfn> that specifies where the current editing position
-  is. It may also have a <a href=#the-selection title="the
-  selection">selection</a>.</p>
+  position</dfn> that specifies where the current editing position is.
+  It may also have a selection.</p>
 
   <p class=note>How the caret and selection are represented depends
   entirely on the UA.</p>
@@ -68169,7 +67773,7 @@
 
   <div class=impl>
 
-  <h4 id=user-editing-actions><span class=secno>8.7.1 </span>User editing actions</h4>
+  <h4 id=user-editing-actions><span class=secno>8.6.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
@@ -68187,14 +67791,14 @@
 
    <dt>Change the selection</dt>
 
-   <dd><p>User agents must allow users to change <a href=#the-selection>the
-   selection</a> within an editing host, even into nested editable
-   elements. User agents may prevent selections from being made in
-   ways that cross from editable elements into non-editable elements
-   (e.g. by making each non-editable descendant atomically selectable,
-   but not allowing text selection within them). This could be
-   triggered as the default action of <code title=event-keydown>keydown</code> events with various key
-   identifiers and as the default action of <code title=event-mousedown>mousedown</code> events.</dd>
+   <dd><p>User agents must allow users to change the selection within
+   an editing host, even into nested editable elements. User agents
+   may prevent selections from being made in ways that cross from
+   editable elements into non-editable elements (e.g. by making each
+   non-editable descendant atomically selectable, but not allowing
+   text selection within them). This could be triggered as the default
+   action of <code title=event-keydown>keydown</code> events with
+   various key identifiers and as the default action of <code title=event-mousedown>mousedown</code> events.</dd>
 
 
    <dt id=contenteditable-insertText>Insert text</dt>
@@ -68273,8 +67877,8 @@
    element, backspacing when the caret is immediately after an
    element, forward-deleting at the end of an element,
    forward-deleting when the caret is immediately before an element,
-   and deleting a <a href=#the-selection title="the selection">selection</a> whose
-   start and end points do not share a common parent node.</p>
+   and deleting a selection whose start and end points do not share a
+   common parent node.</p>
 
    <p>In any case, the exact behavior is UA-dependent, but user
    agents must not, in response to a request to delete text or an
@@ -68342,8 +67946,8 @@
   </dl><p>User agents may perform several commands per user request; for
   example if the user selects a block of text and hits
   <kbd><kbd>Enter</kbd></kbd>, the UA might interpret that as a
-  request to delete the content of <a href=#the-selection>the selection</a> followed
-  by a request to break the paragraph at that position.</p>
+  request to delete the content of the selection followed by a request
+  to break the paragraph at that position.</p>
 
   <p>User agents may add <a href=#dom-changes>DOM changes</a> entries to the
   <a href=#undo-transaction-history>undo transaction history</a> of the <a href=#editing-host>editing
@@ -68358,7 +67962,7 @@
 
 
 
-  <h4 id=making-entire-documents-editable><span class=secno>8.7.2 </span>Making entire documents editable</h4>
+  <h4 id=making-entire-documents-editable><span class=secno>8.6.2 </span>Making entire documents editable</h4>
 
   <div class=impl>
 
@@ -68400,7 +68004,7 @@
 
 
 
-  <h3 id=spelling-and-grammar-checking><span class=secno>8.8 </span>Spelling and grammar checking</h3>
+  <h3 id=spelling-and-grammar-checking><span class=secno>8.7 </span>Spelling and grammar checking</h3>
 
   <div class=impl>
 
@@ -68592,7 +68196,7 @@
   the checking is enabled, or could use other interfaces.</p>
 
 
-  <h3 id=dnd><span class=secno>8.9 </span><dfn>Drag and drop</dfn></h3>
+  <h3 id=dnd><span class=secno>8.8 </span><dfn>Drag and drop</dfn></h3>
 
 <!-- v2 ideas for drag and drop:
 
@@ -68682,21 +68286,20 @@
 
   <p>However it is implemented, drag-and-drop operations must have a
   starting point (e.g. where the mouse was clicked, or the start of
-  <a href=#the-selection>the selection</a> or element that was selected for the
-  drag), may have any number of intermediate steps (elements that the
-  mouse moves over during a drag, or elements that the user picks as
-  possible drop points as he cycles through possibilities), and must
-  either have an end point (the element above which the mouse button
-  was released, or the element that was finally selected), or be
-  canceled. The end point must be the last element selected as a
-  possible drop point before the drop occurs (so if the operation is
-  not canceled, there must be at least one element in the middle
-  step).</p>
+  the selection or element that was selected for the drag), may have
+  any number of intermediate steps (elements that the mouse moves over
+  during a drag, or elements that the user picks as possible drop
+  points as he cycles through possibilities), and must either have an
+  end point (the element above which the mouse button was released, or
+  the element that was finally selected), or be canceled. The end
+  point must be the last element selected as a possible drop point
+  before the drop occurs (so if the operation is not canceled, there
+  must be at least one element in the middle step).</p>
 
   </div>
 
 
-  <h4 id=introduction-7><span class=secno>8.9.1 </span>Introduction</h4>
+  <h4 id=introduction-7><span class=secno>8.8.1 </span>Introduction</h4>
 
   <p><i>This section is non-normative.</i></p>
 
@@ -68806,7 +68409,7 @@
 
 
 
-  <h4 id=the-dragevent-and-datatransfer-interfaces><span class=secno>8.9.2 </span>The <code><a href=#dragevent>DragEvent</a></code> and <code><a href=#datatransfer>DataTransfer</a></code> interfaces</h4>
+  <h4 id=the-dragevent-and-datatransfer-interfaces><span class=secno>8.8.2 </span>The <code><a href=#dragevent>DragEvent</a></code> and <code><a href=#datatransfer>DataTransfer</a></code> interfaces</h4>
 
   <p>The drag-and-drop processing model involves several events. They
   all use the <code><a href=#dragevent>DragEvent</a></code> interface.</p>
@@ -69058,7 +68661,7 @@
   </div>
 
 
-  <h4 id=dndevents><span class=secno>8.9.3 </span>Events fired during a drag-and-drop action</h4>
+  <h4 id=dndevents><span class=secno>8.8.3 </span>Events fired during a drag-and-drop action</h4>
 
   <p>The following events are involved in the drag-and-drop
   model.</p>
@@ -69197,7 +68800,7 @@
 
   <div class=impl>
 
-  <h4 id=drag-and-drop-processing-model><span class=secno>8.9.4 </span>Drag-and-drop processing model</h4>
+  <h4 id=drag-and-drop-processing-model><span class=secno>8.8.4 </span>Drag-and-drop processing model</h4>
 
   <p>When the user attempts to begin a drag operation, the user agent
   must first determine what is being dragged. If the drag operation
@@ -69715,7 +69318,7 @@
 
   <div class=impl>
 
-  <h5 id=when-the-drag-and-drop-operation-starts-or-ends-in-another-document><span class=secno>8.9.4.1 </span>When the drag-and-drop operation starts or ends in another
+  <h5 id=when-the-drag-and-drop-operation-starts-or-ends-in-another-document><span class=secno>8.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
@@ -69730,7 +69333,7 @@
 
   <div class=impl>
 
-  <h5 id=when-the-drag-and-drop-operation-starts-or-ends-in-another-application><span class=secno>8.9.4.2 </span>When the drag-and-drop operation starts or ends in another
+  <h5 id=when-the-drag-and-drop-operation-starts-or-ends-in-another-application><span class=secno>8.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 href=#source-node>source
@@ -69760,7 +69363,7 @@
   </div>
 
 
-  <h4 id=the-draggable-attribute><span class=secno>8.9.5 </span>The <dfn title=attr-draggable><code>draggable</code></dfn> attribute</h4>
+  <h4 id=the-draggable-attribute><span class=secno>8.8.5 </span>The <dfn title=attr-draggable><code>draggable</code></dfn> attribute</h4>
 
   <p>All <a href=#html-elements>HTML elements</a> may have the <code title=attr-draggable><a href=#the-draggable-attribute>draggable</a></code> content attribute set. The
   <code title=attr-draggable><a href=#the-draggable-attribute>draggable</a></code> attribute is an
@@ -69902,7 +69505,7 @@
 
   <div class=impl>
 
-  <h4 id=security-risks-in-the-drag-and-drop-model><span class=secno>8.9.6 </span>Security risks in the drag-and-drop model</h4>
+  <h4 id=security-risks-in-the-drag-and-drop-model><span class=secno>8.8.6 </span>Security risks in the drag-and-drop model</h4>
 
   <p>User agents must not make the data added to the
   <code><a href=#datatransfer>DataTransfer</a></code> object during the <code title=event-dragstart><a href=#event-dragstart>dragstart</a></code> event available to scripts
@@ -69928,11 +69531,11 @@
   </div>
 
 
-  <h3 id=undo><span class=secno>8.10 </span><dfn>Undo history</dfn></h3>
+  <h3 id=undo><span class=secno>8.9 </span><dfn>Undo history</dfn></h3>
 
   <div class=impl>
 
-  <h4 id=definitions-2><span class=secno>8.10.1 </span>Definitions</h4>
+  <h4 id=definitions-2><span class=secno>8.9.1 </span>Definitions</h4>
 
   <p>The user agent must associate an <dfn id=undo-transaction-history>undo transaction
   history</dfn> with each <code><a href=#htmldocument>HTMLDocument</a></code> object.</p>
@@ -69970,7 +69573,7 @@
   </div>
 
 
-  <h4 id=the-undomanager-interface><span class=secno>8.10.2 </span>The <code><a href=#undomanager>UndoManager</a></code> interface</h4>
+  <h4 id=the-undomanager-interface><span class=secno>8.9.2 </span>The <code><a href=#undomanager>UndoManager</a></code> interface</h4>
 
   <p>To manage <a href=#undo-object>undo object</a> entries in the <a href=#undo-transaction-history>undo
   transaction history</a>, the <code><a href=#undomanager>UndoManager</a></code>
@@ -70137,7 +69740,7 @@
 
   <div class=impl>
 
-  <h4 id=undo:-moving-back-in-the-undo-transaction-history><span class=secno>8.10.3 </span><dfn title=do-undo>Undo: moving back in the undo transaction history</dfn></h4>
+  <h4 id=undo:-moving-back-in-the-undo-transaction-history><span class=secno>8.9.3 </span><dfn 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 title=dom-document-execCommand><a href=#execCommand>execCommand()</a></code> method is
   called with the <code title=command-undo><a href=#command-undo>undo</a></code> command, the
@@ -70174,7 +69777,7 @@
   command to undo his undo.</p>
 
 
-  <h4 id=redo:-moving-forward-in-the-undo-transaction-history><span class=secno>8.10.4 </span><dfn title=do-redo>Redo: moving forward in the undo transaction history</dfn></h4>
+  <h4 id=redo:-moving-forward-in-the-undo-transaction-history><span class=secno>8.9.4 </span><dfn 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 title=dom-document-execCommand><a href=#execCommand>execCommand()</a></code> method is
   called with the <code title=command-redo><a href=#command-redo>redo</a></code> command, the
@@ -70211,7 +69814,7 @@
   </div>
 
 
-  <h4 id=the-undomanagerevent-interface-and-the-undo-and-redo-events><span class=secno>8.10.5 </span>The <code><a href=#undomanagerevent>UndoManagerEvent</a></code> interface and the <code title=event-undo><a href=#event-undo>undo</a></code> and <code title=event-redo><a href=#event-redo>redo</a></code> events</h4>
+  <h4 id=the-undomanagerevent-interface-and-the-undo-and-redo-events><span class=secno>8.9.5 </span>The <code><a href=#undomanagerevent>UndoManagerEvent</a></code> interface and the <code title=event-undo><a href=#event-undo>undo</a></code> and <code title=event-redo><a href=#event-redo>redo</a></code> events</h4>
 
   <pre class=idl>interface <dfn id=undomanagerevent>UndoManagerEvent</dfn> : <a href=#event>Event</a> {
   readonly attribute any <a href=#dom-undomanagerevent-data title=dom-UndoManagerEvent-data>data</a>;
@@ -70246,7 +69849,7 @@
 
   <div class=impl>
 
-  <h4 id=implementation-notes><span class=secno>8.10.6 </span>Implementation notes</h4>
+  <h4 id=implementation-notes><span class=secno>8.9.6 </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
@@ -70269,7 +69872,7 @@
 
 
 
-  <h3 id=editing-apis><span class=secno>8.11 </span>Editing APIs</h3>
+  <h3 id=editing-apis><span class=secno>8.10 </span>Editing APIs</h3>
 
   <dl class=domintro><dt><var title="">document</var> . <code title=dom-document-execCommand><a href=#execCommand>execCommand</a></code>(<var title="">commandId</var> [, <var title="">showUI</var> [, <var title="">value</var> ] ] )</dt>
 
@@ -70325,10 +69928,9 @@
 
   <p>The <dfn id=execCommand title=dom-document-execCommand><code>execCommand(<var title="">commandId</var>, <var title="">showUI</var>, <var title="">value</var>)</code></dfn> method on the
   <code><a href=#htmldocument>HTMLDocument</a></code> interface allows scripts to perform
-  actions on the <a href=#the-selection title="the selection">current selection</a>
-  or at the current caret position. Generally, these commands would be
-  used to implement editor UI, for example having a "delete" button on
-  a toolbar.</p>
+  actions on the current selection or at the current caret position.
+  Generally, these commands would be used to implement editor UI, for
+  example having a "delete" button on a toolbar.</p>
 
   <p>There are three variants to this method, with one, two, and three
   arguments respectively. The <var title="">showUI</var> and <var title="">value</var> parameters, even if specified, are ignored

Modified: source
===================================================================
--- source	2010-10-12 21:20:32 UTC (rev 5616)
+++ source	2010-10-12 21:44:22 UTC (rev 5617)
@@ -7965,7 +7965,6 @@
 
   // <span>user interaction</span>
   readonly attribute <span>WindowProxy</span> <span title="dom-document-defaultView">defaultView</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>();
            attribute DOMString <span title="dom-document-designMode">designMode</span>;
@@ -11919,12 +11918,13 @@
    <li><p>Replace the <code>Document</code>'s singleton objects with
    new instances of those objects. (This includes in particular the
    <code>Window</code>, <code>Location</code>, <code>History</code>,
-   <code>ApplicationCache</code>, <code>UndoManager</code>,
-   <code>Navigator</code>, and <code>Selection</code> objects, the
-   various <code>BarProp</code> objects, the two <code>Storage</code>
-   objects, and the various <code>HTMLCollection</code> objects. It
-   also includes all the Web IDL prototypes in the JavaScript binding,
-   including the <code>Document</code> object's prototype.)</p></li>
+   <code>ApplicationCache</code>, <code>UndoManager</code>, and
+   <code>Navigator</code>, objects, the various <code>BarProp</code>
+   objects, the two <code>Storage</code> objects, the various
+   <code>HTMLCollection</code> objects, and objects defined by other
+   specifications, like <code>Selection</code>. It also includes all
+   the Web IDL prototypes in the JavaScript binding, including the
+   <code>Document</code> object's prototype.)</p></li>
 
    <!-- http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E...%3Ciframe%20src%3D%22document%22%3E%3C%2Fiframe%3E%0A%3Cscript%3Eonload%20%3D%20function%20()%20%7B%20f%20%3D%20document.getElementsByTagName('iframe')%5B0%5D%3B%20d%20%3D%20f.contentWindow.document%3B%20%7D%3C%2Fscript%3E%0A%3Cinput%20type%3Dbutton%20onclick%3D%22w(d.documentElement.innerHTML)%22%20value%3D%22dump%22%3E%0A%3Cinput%20type%3Dbutton%20onclick%3D%22d.open()%3B%20d.write('%3Cscript%3Evar%20x%20%3D%20new%20XMLHttpRequest()%3Bx.open(%26quot%3BGET%26quot%3B%2C%20%26quot%3BGET%26quot%3B)%3Bx.onreadystatechange%3Dfunction()%20%7B%20alert(x.readyState)%3B%20%7D%3Bx.send(null)%3B%3C%2Fscript%3E')%3Bd.close()%3B%20setTimeout(function()%20%7B%20d.open()%3B%20d.write('%3Cp%3Etest%3C%2Fp%3E')%3B%20d.close()%20%7D%2C%200)%3B%22%20value%3D%22xhr%22%3E%0A%3Cinput%20type%3Dbutton%20onclick%3D%22d.onclick%20%3D%20function()%20%7B%20w('click')%20%7D%22%20value%3D%22add%20click%20handler%22%3E%
 0A%3Cinput%20type%3Dbutton%20onclick%3D%22d.open()%3B%20d.write('%3Cp%3Etest%3C%2Fp%3E')%3B%20d.close()%22%20value%3D%22replace%22%3E%0A%3Cinput%20type%3Dbutton%20onclick%3D%22d.open()%3B%20d.write('%3Cp%3E%3Cscript%3Ei%20%3D%200%3B%20setTimeout(%26quot%3Bparent.w(i%2B%2B)%26quot%3B%2C%202000)%3C%2Fscript%3E%3C%2Fp%3E')%3B%20d.close()%22%20value%3D%22replace%20with%20timer%22%3E -->
    <!-- http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%0D%0A...%3Ciframe%3E%3C%2Fiframe%3E%0D%0A%3Cscript%3E%0D%0Aonload%20%3D%20function%20()%20%7B%0D%0A%20frames%5B0%5D.test%20%3D%201%0D%0A%20w(frames%5B0%5D.test)%3B%0D%0A%20var%20a%20%3D%20frames%5B0%5D.document.location.assign%3B%0D%0A%20w(a)%3B%0D%0A%20w(frames%5B0%5D.document.location.assign%20%3D%3D%3D%20a)%3B%0D%0A%20frames%5B0%5D.document.open()%3B%0D%0A%20frames%5B0%5D.document.write('%3Cscript%3Edocument.write(test)%3C%5C%2Fscript%3E')%3B%0D%0A%20frames%5B0%5D.document.close()%3B%0D%0A%20w(frames%5B0%5D.test)%3B%0D%0A%20w(frames%5B0%5D.document.location.assign%20%3D%3D%3D%20a)%3B%0D%0A%7D%0D%0A%3C%2Fscript%3E -->
@@ -51689,6 +51689,146 @@
 
 
 
+  <h3 id="textFieldSelection">APIs for the text field selections</h3>
+
+  <!-- v2 idea: DOM Range APIs to expose the textarea/input edited
+  value (ack martijnw) -->
+
+  <p>The <code>input</code> and <code>textarea</code> elements define
+  the following members in their DOM interfaces for handling their
+  selection:</p>
+
+  <pre class="idl extract">  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>
+  <!-- v2: 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>
+
+  <dl class="domintro">
+
+   <dt><var title="">element</var> . <code title="dom-textarea/input-select">select</code>()</dt>
+
+   <dd>
+
+    <p>Selects everything in the text field.</p>
+
+   </dd>
+
+   <dt><var title="">element</var> . <code title="dom-textarea/input-selecionStart">selectionStart</code> [ = <var title="">value</var> ]</dt>
+
+   <dd>
+
+    <p>Returns the offset to the start of the selection.</p>
+
+    <p>Can be set, to change the start of the selection.</p>
+
+   </dd>
+
+   <dt><var title="">element</var> . <code title="dom-textarea/input-selecionEnd">selectionEnd</code> [ = <var title="">value</var> ]</dt>
+
+   <dd>
+
+    <p>Returns the offset to the end of the selection.</p>
+
+    <p>Can be set, to change the end of the selection.</p>
+
+   </dd>
+
+   <dt><var title="">element</var> . <code title="dom-textarea/input-setSelectionRange">setSelectionRange</code>(<var title="">start</var>, <var title="">end</var>)</dt>
+
+   <dd>
+
+    <p>Changes the selection to cover the given substring.</p>
+
+   </dd>
+
+  </dl>
+
+  <div class="impl">
+
+  <p>When these methods and attributes are used with
+  <code>input</code> elements while they don't apply, they must raise
+  an <code>INVALID_STATE_ERR</code> exception. Otherwise, they must
+  act as described below.</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 title="">(<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>
+
+  <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>
+
+
+
   <h4>Constraints</h4>
 
   <h5>Definitions</h5>
@@ -66613,7 +66753,6 @@
   [PutForwards=<span title="dom-location-href">href</span>] readonly attribute <span>Location</span> <span title="dom-location">location</span>;
   readonly attribute <span>History</span> <span title="dom-history">history</span>;
   readonly attribute <span>UndoManager</span> <span title="dom-undoManager">undoManager</span>;
-  <span>Selection</span> <span title="dom-getSelection">getSelection</span>();
   [Replaceable] readonly attribute <span>BarProp</span> <span title="dom-window-locationbar">locationbar</span>;
   [Replaceable] readonly attribute <span>BarProp</span> <span title="dom-window-menubar">menubar</span>;
   [Replaceable] readonly attribute <span>BarProp</span> <span title="dom-window-personalbar">personalbar</span>;
@@ -76564,583 +76703,7 @@
   </div>
 
 
-  <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 agent should allow the user 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>
-
-  <div class="impl">
-
-  <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>
-
-  </div>
-
-  <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>
-
-  <div class="impl">
-
-  <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>
-
-  </div>
-
-  <!-- v2DATAGRID v2DGS:
-  <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>The <code>select</code> element also has a selection, indicating
-  which items have been picked by the user. This is 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 title="selector-selection">::selection</code>
-  pseudo-element. <a href="#refsSELECTORS">[SELECTORS]</a> <a
-  href="#refsCSS">[CSS]</a> --></p>
-
-
-
-  <h4 id="documentSelection">APIs for the browsing context selection</h4>
-
-  <dl class="domintro">
-
-   <dt><var title="">window</var> . <code title="dom-getSelection">getSelection</code>()</dt>
-   <dt><var title="">document</var> . <code title="dom-document-getSelection">getSelection</code>()</dt>
-
-   <dd>
-
-    <p>Returns the <code>Selection</code> object for the window, which
-    stringifies to the text of the current selection.</p>
-
-   </dd>
-
-  </dl>
-
-  <div class="impl">
-
-  <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>
-
-  </div>
-
-  <pre class="idl">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>();
-  <span title="dom-selection-toString">stringifier</span> DOMString ();
-};</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 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="#refsDOMRANGE">[DOMRANGE]</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>
-
-  <dl class="domintro">
-
-   <dt><var title="">selection</var> . <code title="dom-selection-anchorNode">anchorNode</code></dt>
-
-   <dd>
-
-    <p>Returns the element that contains the start of the selection.</p>
-
-    <p>Returns null if there's no selection.</p>
-
-   </dd>
-
-   <dt><var title="">selection</var> . <code title="dom-selection-anchorOffset">anchorOffset</code></dt>
-
-   <dd>
-
-    <p>Returns the offset of the start of the selection relative to the element that contains the start of the selection.</p>
-
-    <p>Returns 0 if there's no selection.</p>
-
-   </dd>
-
-   <dt><var title="">selection</var> . <code title="dom-selection-focusNode">focusNode</code></dt>
-
-   <dd>
-
-    <p>Returns the element that contains the end of the selection.</p>
-
-    <p>Returns null if there's no selection.</p>
-
-   </dd>
-
-   <dt><var title="">selection</var> . <code title="dom-selection-focusOffset">focusOffset</code></dt>
-
-   <dd>
-
-    <p>Returns the offset of the end of the selection relative to the element that contains the end of the selection.</p>
-
-    <p>Returns 0 if there's no selection.</p>
-
-   </dd>
-
-   <dt><var title="">collapsed</var> = <var title="">selection</var> . <code title="dom-selection-isCollapsed">isCollapsed</code>()</dt>
-
-   <dd>
-
-    <p>Returns true if there's no selection or if the selection is empty. Otherwise, returns false.</p>
-
-   </dd>
-
-   <dt><var title="">selection</var> . <code title="dom-selection-collapse">collapse</code>(<var title="">parentNode</var>, <var title="">offset</var>)</dt>
-
-   <dd>
-
-    <p>Replaces the selection with an empty one at the given position.</p>
-
-    <p>Throws a <code>WRONG_DOCUMENT_ERR</code> exception if the given node is in a different document.</p>
-
-   </dd>
-
-   <dt><var title="">selection</var> . <code title="dom-selection-collapseToStart">collapseToStart</code>()</dt>
-
-   <dd>
-
-    <p>Replaces the selection with an empty one at the position of the start of the current selection.</p>
-
-    <p>Throws an <code>INVALID_STATE_ERR</code> exception if there is no selection.</p>
-
-   </dd>
-
-   <dt><var title="">selection</var> . <code title="dom-selection-collapseToEnd">collapseToEnd</code>()</dt>
-
-   <dd>
-
-    <p>Replaces the selection with an empty one at the position of the end of the current selection.</p>
-
-    <p>Throws an <code>INVALID_STATE_ERR</code> exception if there is no selection.</p>
-
-   </dd>
-
-   <dt><var title="">selection</var> . <code title="dom-selection-selectAllChildren">selectAllChildren</code>(<var title="">parentNode</var>)</dt>
-
-   <dd>
-
-    <p>Replaces the selection with one that contains all the contents of the given element.</p>
-
-    <p>Throws a <code>WRONG_DOCUMENT_ERR</code> exception if the given node is in a different document.</p>
-
-   </dd>
-
-   <dt><var title="">selection</var> . <code title="dom-selection-deleteFromDocument">deleteFromDocument</code>()</dt>
-
-   <dd>
-
-    <p>Deletes the selection.</p>
-
-   </dd>
-
-   <dt><var title="">selection</var> . <code title="dom-selection-rangeCount">rangeCount</code></dt>
-
-   <dd>
-
-    <p>Returns the number of ranges in the selection.</p>
-
-   </dd>
-
-   <dt><var title="">selection</var> . <code title="dom-selection-getRangeAt">getRangeAt</code>(<var title="">index</var>)</dt>
-
-   <dd>
-
-    <p>Returns the given range.</p>
-
-    <p>Throws an <code>INDEX_SIZE_ERR</code> exception if the value is out of range.</p>
-
-   </dd>
-
-   <dt><var title="">selection</var> . <code title="dom-selection-addRange">addRange</code>(<var title="">range</var>)</dt>
-
-   <dd>
-
-    <p>Adds the given range to the selection.</p>
-
-   </dd>
-
-   <dt><var title="">selection</var> . <code title="dom-selection-removeRange">removeRange</code>(<var title="">range</var>)</dt>
-
-   <dd>
-
-    <p>Removes the given range from the selection, if the range was one of the ones in the selection.</p>
-
-   </dd>
-
-   <dt><var title="">selection</var> . <code title="dom-selection-removeAllRanges">removeAllRanges</code>()</dt>
-
-   <dd>
-
-    <p>Removes all the ranges in the selection.</p>
-
-   </dd>
-
-  </dl>
-
-  <div class="impl">
-
-  <p>The <dfn
-  title="dom-selection-anchorNode"><code>anchorNode</code></dfn>
-  attribute must return the value returned by the <code
-  title="dom-Range-startContainer">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="dom-Range-startOffset">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="dom-Range-endContainer">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="dom-Range-endOffset">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="dom-Range-collapsed">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>Document</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="dom-Range-setStart()">setStart()</code> and <code
-  title="dom-Range-setEnd()">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="dom-Range-startContainer">startContainer</code> and <code
-  title="dom-Range-startOffset">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="dom-Range-endContainer">endContainer</code> and <code
-  title="dom-Range-endOffset">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="dom-Range-selectNodeContents()">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="dom-Range-deleteContents()">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>
-
-  <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>
-
-  <div class="example">
-   <p>In the following document fragment, the emphasized 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>
-
-  <!-- v2DATAGRID v2DGS:
-  <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>
-
-  <!-- v2 idea: DOM Range APIs to expose the textarea/input edited
-  value (ack martijnw) -->
-
-  <p>The <code>input</code> and <code>textarea</code> elements define
-  the following members in their DOM interfaces for handling their
-  text selection:</p>
-
-  <pre class="idl extract">  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>
-  <!-- v2: 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>
-
-  <dl class="domintro">
-
-   <dt><var title="">element</var> . <code title="dom-textarea/input-select">select</code>()</dt>
-
-   <dd>
-
-    <p>Selects everything in the text field.</p>
-
-   </dd>
-
-   <dt><var title="">element</var> . <code title="dom-textarea/input-selecionStart">selectionStart</code> [ = <var title="">value</var> ]</dt>
-
-   <dd>
-
-    <p>Returns the offset to the start of the selection.</p>
-
-    <p>Can be set, to change the start of the selection.</p>
-
-   </dd>
-
-   <dt><var title="">element</var> . <code title="dom-textarea/input-selecionEnd">selectionEnd</code> [ = <var title="">value</var> ]</dt>
-
-   <dd>
-
-    <p>Returns the offset to the end of the selection.</p>
-
-    <p>Can be set, to change the end of the selection.</p>
-
-   </dd>
-
-   <dt><var title="">element</var> . <code title="dom-textarea/input-setSelectionRange">setSelectionRange</code>(<var title="">start</var>, <var title="">end</var>)</dt>
-
-   <dd>
-
-    <p>Changes the selection to cover the given substring.</p>
-
-   </dd>
-
-  </dl>
-
-  <div class="impl">
-
-  <p>When these methods and attributes are used with
-  <code>input</code> elements while they don't apply, they must raise
-  an <code>INVALID_STATE_ERR</code> exception. Otherwise, they must
-  act as described below.</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 title="">(<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>
-
-  <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>
-
-
-
   <h3 id="contenteditable">The <code
   title="attr-contenteditable">contenteditable</code> attribute</h3>
 
@@ -77258,9 +76821,8 @@
   editing hosts.</p>
 
   <p>When an editing host has focus, it must have a <dfn>caret
-  position</dfn> that specifies where the current editing position
-  is. It may also have a <span title="the
-  selection">selection</span>.</p>
+  position</dfn> that specifies where the current editing position is.
+  It may also have a selection.</p>
 
   <p class="note">How the caret and selection are represented depends
   entirely on the UA.</p>
@@ -77295,15 +76857,14 @@
 
    <dt>Change the selection</dt>
 
-   <dd><p>User agents must allow users to change <span>the
-   selection</span> within an editing host, even into nested editable
-   elements. User agents may prevent selections from being made in
-   ways that cross from editable elements into non-editable elements
-   (e.g. by making each non-editable descendant atomically selectable,
-   but not allowing text selection within them). This could be
-   triggered as the default action of <code
-   title="event-keydown">keydown</code> events with various key
-   identifiers and as the default action of <code
+   <dd><p>User agents must allow users to change the selection within
+   an editing host, even into nested editable elements. User agents
+   may prevent selections from being made in ways that cross from
+   editable elements into non-editable elements (e.g. by making each
+   non-editable descendant atomically selectable, but not allowing
+   text selection within them). This could be triggered as the default
+   action of <code title="event-keydown">keydown</code> events with
+   various key identifiers and as the default action of <code
    title="event-mousedown">mousedown</code> events.</p></dd>
 
 
@@ -77386,8 +76947,8 @@
    element, backspacing when the caret is immediately after an
    element, forward-deleting at the end of an element,
    forward-deleting when the caret is immediately before an element,
-   and deleting a <span title="the selection">selection</span> whose
-   start and end points do not share a common parent node.</p>
+   and deleting a selection whose start and end points do not share a
+   common parent node.</p>
 
    <p>In any case, the exact behavior is UA-dependent, but user
    agents must not, in response to a request to delete text or an
@@ -77461,8 +77022,8 @@
   <p>User agents may perform several commands per user request; for
   example if the user selects a block of text and hits
   <kbd><kbd>Enter</kbd></kbd>, the UA might interpret that as a
-  request to delete the content of <span>the selection</span> followed
-  by a request to break the paragraph at that position.</p>
+  request to delete the content of the selection followed by a request
+  to break the paragraph at that position.</p>
 
   <p>User agents may add <span>DOM changes</span> entries to the
   <span>undo transaction history</span> of the <span>editing
@@ -77860,16 +77421,15 @@
 
   <p>However it is implemented, drag-and-drop operations must have a
   starting point (e.g. where the mouse was clicked, or the start of
-  <span>the selection</span> or element that was selected for the
-  drag), may have any number of intermediate steps (elements that the
-  mouse moves over during a drag, or elements that the user picks as
-  possible drop points as he cycles through possibilities), and must
-  either have an end point (the element above which the mouse button
-  was released, or the element that was finally selected), or be
-  canceled. The end point must be the last element selected as a
-  possible drop point before the drop occurs (so if the operation is
-  not canceled, there must be at least one element in the middle
-  step).</p>
+  the selection or element that was selected for the drag), may have
+  any number of intermediate steps (elements that the mouse moves over
+  during a drag, or elements that the user picks as possible drop
+  points as he cycles through possibilities), and must either have an
+  end point (the element above which the mouse button was released, or
+  the element that was finally selected), or be canceled. The end
+  point must be the last element selected as a possible drop point
+  before the drop occurs (so if the operation is not canceled, there
+  must be at least one element in the middle step).</p>
 
   </div>
 
@@ -79840,10 +79400,9 @@
   title="">commandId</var>, <var title="">showUI</var>, <var
   title="">value</var>)</code></dfn> method on the
   <code>HTMLDocument</code> interface allows scripts to perform
-  actions on the <span title="the selection">current selection</span>
-  or at the current caret position. Generally, these commands would be
-  used to implement editor UI, for example having a "delete" button on
-  a toolbar.</p>
+  actions on the current selection or at the current caret position.
+  Generally, these commands would be used to implement editor UI, for
+  example having a "delete" button on a toolbar.</p>
 
   <p>There are three variants to this method, with one, two, and three
   arguments respectively. The <var title="">showUI</var> and <var




More information about the Commit-Watchers mailing list