[html5] r7081 - [giow] (0) input.setRangeText() Affected topics: DOM APIs, HTML

whatwg at whatwg.org whatwg at whatwg.org
Fri Apr 27 21:01:45 PDT 2012


Author: ianh
Date: 2012-04-27 21:01:44 -0700 (Fri, 27 Apr 2012)
New Revision: 7081

Modified:
   complete.html
   index
   source
Log:
[giow] (0) input.setRangeText()
Affected topics: DOM APIs, HTML

Modified: complete.html
===================================================================
--- complete.html	2012-04-27 15:37:50 UTC (rev 7080)
+++ complete.html	2012-04-28 04:01:44 UTC (rev 7081)
@@ -240,7 +240,7 @@
 
   <header class=head id=head><p><a class=logo href=http://www.whatwg.org/><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
    <hgroup><h1 class=allcaps>HTML</h1>
-    <h2 class="no-num no-toc">Living Standard — Last Updated 27 April 2012</h2>
+    <h2 class="no-num no-toc">Living Standard — Last Updated 28 April 2012</h2>
    </hgroup><dl><dt><strong>Web developer edition:</strong></dt>
     <dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
     <dt>Multiple-page version:</dt>
@@ -44596,6 +44596,10 @@
            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>;
            attribute DOMString <a href=#dom-textarea/input-selectiondirection title=dom-textarea/input-selectionDirection>selectionDirection</a>;
+
+  void <a href=#dom-textarea/input-setrangetext title=dom-textarea/input-setRangeText>setRangeText</a>(DOMString replacement);
+  void <a href=#dom-textarea/input-setrangetext title=dom-textarea/input-setRangeText>setRangeText</a>(DOMString replacement, unsigned long start, unsigned long end, optional <a href=#selectionmode>SelectionMode</a> selectionMode);
+
   void <a href=#dom-textarea/input-setselectionrange title=dom-textarea/input-setSelectionRange>setSelectionRange</a>(unsigned long start, unsigned long end, optional DOMString direction);
 };</pre>
    </dd>
@@ -44707,15 +44711,18 @@
      <td> A button
   </table><p>The <i>missing value default</i> is the <a href="#text-(type=text)-state-and-search-state-(type=search)" title=attr-input-type-text>Text</a> state.</p>
 
-  <p>Which of the <code title=attr-input-accept><a href=#attr-input-accept>accept</a></code>, <code title=attr-input-alt><a href=#attr-input-alt>alt</a></code>, <code title=attr-input-autocomplete><a href=#attr-input-autocomplete>autocomplete</a></code>, <code title=attr-input-checked><a href=#attr-input-checked>checked</a></code>, <code title=attr-input-dirname><a href=#attr-input-dirname>dirname</a></code>, <code title=attr-fs-formaction><a href=#attr-fs-formaction>formaction</a></code>, <code title=attr-fs-formenctype><a href=#attr-fs-formenctype>formenctype</a></code>, <code title=attr-fs-formmethod><a href=#attr-fs-formmethod>formmethod</a></code>, <code title=attr-fs-formnovalidate><a href=#attr-fs-formnovalidate>formnovalidate</a></code>, <code title=attr-fs-formtarget><a href=#attr-fs-formtarget>formtarget</a></code>, <code title=attr-dim-height><a href=#attr-dim-height>height</a></code>, <code title=attr-input-list><a href=#attr-input-list>list</a></code>, <code tit
 le=attr-input-max><a href=#attr-input-max>max</a></code>, <code title=attr-input-maxlength><a href=#attr-input-maxlength>maxlength</a></code>, <code title=attr-input-min><a href=#attr-input-min>min</a></code>, <code title=attr-input-multiple><a href=#attr-input-multiple>multiple</a></code>, <code title=attr-input-pattern><a href=#attr-input-pattern>pattern</a></code>, <code title=attr-input-placeholder><a href=#attr-input-placeholder>placeholder</a></code>, <code title=attr-input-readonly><a href=#attr-input-readonly>readonly</a></code>, <code title=attr-input-required><a href=#attr-input-required>required</a></code>, <code title=attr-input-size><a href=#attr-input-size>size</a></code>, <code title=attr-input-src><a href=#attr-input-src>src</a></code>, <code title=attr-input-step><a href=#attr-input-step>step</a></code>, and <code title=attr-dim-width><a href=#attr-dim-width>width</a></code> content attributes, the <code title=dom-input-checked><a href=#dom-input-checked>che
 cked</a></code>, <code title=dom-input-files><a href=#dom-input-files>files</a></code>, <code title=dom-input-valueAsDate><a href=#dom-input-valueasdate>valueAsDate</a></code>, <code title=dom-input-valueAsNumber><a href=#dom-input-valueasnumber>valueAsNumber</a></code>, and <code title=dom-input-list><a href=#dom-input-list>list</a></code> IDL
-  attributes, the <code title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code> method, the <code title=dom-textarea/input-selectionStart><a href=#dom-textarea/input-selectionstart>selectionStart</a></code>,
-  <code title=dom-textarea/input-selectionEnd><a href=#dom-textarea/input-selectionend>selectionEnd</a></code>, and
-  <code title=dom-textarea/input-selectionDirection><a href=#dom-textarea/input-selectiondirection>selectionDirection</a></code>,
-  IDL attributes, the <code title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-setselectionrange>setSelectionRange()</a></code>
-  method, the <code title=dom-input-stepUp><a href=#dom-input-stepup>stepUp()</a></code> and
+  <p>Which of the <code title=attr-input-accept><a href=#attr-input-accept>accept</a></code>, <code title=attr-input-alt><a href=#attr-input-alt>alt</a></code>, <code title=attr-input-autocomplete><a href=#attr-input-autocomplete>autocomplete</a></code>, <code title=attr-input-checked><a href=#attr-input-checked>checked</a></code>, <code title=attr-input-dirname><a href=#attr-input-dirname>dirname</a></code>, <code title=attr-fs-formaction><a href=#attr-fs-formaction>formaction</a></code>, <code title=attr-fs-formenctype><a href=#attr-fs-formenctype>formenctype</a></code>, <code title=attr-fs-formmethod><a href=#attr-fs-formmethod>formmethod</a></code>, <code title=attr-fs-formnovalidate><a href=#attr-fs-formnovalidate>formnovalidate</a></code>, <code title=attr-fs-formtarget><a href=#attr-fs-formtarget>formtarget</a></code>, <code title=attr-dim-height><a href=#attr-dim-height>height</a></code>, <code title=attr-input-list><a href=#attr-input-list>list</a></code>, <code tit
 le=attr-input-max><a href=#attr-input-max>max</a></code>, <code title=attr-input-maxlength><a href=#attr-input-maxlength>maxlength</a></code>, <code title=attr-input-min><a href=#attr-input-min>min</a></code>, <code title=attr-input-multiple><a href=#attr-input-multiple>multiple</a></code>, <code title=attr-input-pattern><a href=#attr-input-pattern>pattern</a></code>, <code title=attr-input-placeholder><a href=#attr-input-placeholder>placeholder</a></code>, <code title=attr-input-readonly><a href=#attr-input-readonly>readonly</a></code>, <code title=attr-input-required><a href=#attr-input-required>required</a></code>, <code title=attr-input-size><a href=#attr-input-size>size</a></code>, <code title=attr-input-src><a href=#attr-input-src>src</a></code>, <code title=attr-input-step><a href=#attr-input-step>step</a></code>, and <code title=attr-dim-width><a href=#attr-dim-width>width</a></code> content attributes, the <code title=dom-input-checked><a href=#dom-input-checked>che
 cked</a></code>, <code title=dom-input-files><a href=#dom-input-files>files</a></code>, <code title=dom-input-valueAsDate><a href=#dom-input-valueasdate>valueAsDate</a></code>, <code title=dom-input-valueAsNumber><a href=#dom-input-valueasnumber>valueAsNumber</a></code>, and <code title=dom-input-list><a href=#dom-input-list>list</a></code> IDL attributes, the <code title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code> method, the <code title=dom-textarea/input-selectionStart><a href=#dom-textarea/input-selectionstart>selectionStart</a></code>,
+  <code title=dom-textarea/input-selectionEnd><a href=#dom-textarea/input-selectionend>selectionEnd</a></code>,
+  and <code title=dom-textarea/input-selectionDirection><a href=#dom-textarea/input-selectiondirection>selectionDirection</a></code>,
+  IDL attributes, the
+
+  <code title=dom-textarea/input-setRangeText><a href=#dom-textarea/input-setrangetext>setRangeText()</a></code> and
+
+  <code title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-setselectionrange>setSelectionRange()</a></code>
+  methods, the <code title=dom-input-stepUp><a href=#dom-input-stepup>stepUp()</a></code> and
   <code title=dom-input-stepDown><a href=#dom-input-stepdown>stepDown()</a></code> methods, and the
   <code title=event-input-input><a href=#event-input-input>input</a></code> and <code title=event-input-change><a href=#event-input-change>change</a></code> events apply to an
-  <code><a href=#the-input-element>input</a></code> element depends on the state of its <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute.  The following table
+  <code><a href=#the-input-element>input</a></code> element depends on the state of its <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute. The following table
   <span class=impl>is non-normative and</span> summarizes which of
   those content attributes, IDL attributes, methods, and events apply
   to each state:</p>
@@ -45565,6 +45572,32 @@
      <td class=no> · <!-- Reset Button -->
 <!-- <td class="no"> ·      Button -->
 
+
+    <tr><th> <code title=dom-textarea/input-setRangeText><a href=#dom-textarea/input-setrangetext>setRangeText()</a></code>
+     <td class=no> · <!-- Hidden -->
+     <td class=yes> Yes     <!-- Text -->
+<!-- <td class="yes"> Yes          Search -->
+     <td class=yes> Yes     <!-- URL, Telephone -->
+     <td class=no> · <!-- E-mail -->
+     <td class=yes> Yes     <!-- Password -->
+     <td class=no> · <!-- Date and Time -->
+<!-- <td class="no"> ·      Date -->
+<!-- <td class="no"> ·      Month -->
+<!-- <td class="no"> ·      Week -->
+<!-- <td class="no"> ·      Time -->
+     <td class=no> · <!-- Local Date and Time -->
+     <td class=no> · <!-- Number -->
+     <td class=no> · <!-- Range -->
+     <td class=no> · <!-- Color -->
+     <td class=no> · <!-- Checkbox -->
+<!-- <td class="no"> ·      Radio Button -->
+     <td class=no> · <!-- File Upload -->
+     <td class=no> · <!-- Submit Button -->
+     <td class=no> · <!-- Image Button -->
+     <td class=no> · <!-- Reset Button -->
+<!-- <td class="no"> ·      Button -->
+
+
     <tr><th> <code title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-setselectionrange>setSelectionRange()</a></code>
      <td class=no> · <!-- Hidden -->
      <td class=yes> Yes     <!-- Text -->
@@ -45877,6 +45910,7 @@
   of the element's <code><a href=#the-label-element>label</a></code>s. The <code title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code>, <code title=dom-textarea/input-selectionStart><a href=#dom-textarea/input-selectionstart>selectionStart</a></code>,
   <code title=dom-textarea/input-selectionEnd><a href=#dom-textarea/input-selectionend>selectionEnd</a></code>,
   <code title=dom-textarea/input-selectionDirection><a href=#dom-textarea/input-selectiondirection>selectionDirection</a></code>,
+  <code title=dom-textarea/input-setRangeText><a href=#dom-textarea/input-setrangetext>setRangeText()</a></code>,
   and <code title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-setselectionrange>setSelectionRange()</a></code>
   methods and attributes expose the element's text selection. The
   <code title=dom-fe-autofocus><a href=#dom-fe-autofocus>autofocus</a></code>, <code title=dom-fe-disabled><a href=#dom-fe-disabled>disabled</a></code>, <code title=dom-fae-form><a href=#dom-fae-form>form</a></code>, and <code title=dom-fe-name><a href=#dom-fe-name>name</a></code> IDL attributes are part of the
@@ -45961,6 +45995,7 @@
    <code class=no-backref title=dom-input-valueAsDate><a href=#dom-input-valueasdate>valueAsDate</a></code>, and
    <code class=no-backref title=dom-input-valueAsNumber><a href=#dom-input-valueasnumber>valueAsNumber</a></code> IDL attributes;
    <code class=no-backref title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code>,
+   <code class=no-backref title=dom-textarea/input-setRangeText><a href=#dom-textarea/input-setrangetext>setRangeText()</a></code>,
    <code class=no-backref title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-setselectionrange>setSelectionRange()</a></code>,
    <code class=no-backref title=dom-input-stepDown><a href=#dom-input-stepdown>stepDown()</a></code>, and
    <code class=no-backref title=dom-input-stepUp><a href=#dom-input-stepup>stepUp()</a></code> methods.</p>
@@ -46048,8 +46083,10 @@
    <code title=dom-textarea/input-selectionEnd><a href=#dom-textarea/input-selectionend>selectionEnd</a></code>, 
    <code title=dom-textarea/input-selectionDirection><a href=#dom-textarea/input-selectiondirection>selectionDirection</a></code>, and
    <code title=dom-input-value><a href=#dom-input-value>value</a></code> IDL attributes;
-   <code title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code> and
-   <code title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-setselectionrange>setSelectionRange()</a></code> methods.</p>
+   <code title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code>,
+   <code title=dom-textarea/input-setRangeText><a href=#dom-textarea/input-setrangetext>setRangeText()</a></code>, and
+   <code title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-setselectionrange>setSelectionRange()</a></code>
+   methods.</p>
 
    <p>The <code title=dom-input-value><a href=#dom-input-value>value</a></code> IDL attribute is
    in mode <a href=#dom-input-value-value title=dom-input-value-value>value</a>.</p>
@@ -46146,8 +46183,10 @@
    <code title=dom-textarea/input-selectionEnd><a href=#dom-textarea/input-selectionend>selectionEnd</a></code>, 
    <code title=dom-textarea/input-selectionDirection><a href=#dom-textarea/input-selectiondirection>selectionDirection</a></code>, and
    <code title=dom-input-value><a href=#dom-input-value>value</a></code> IDL attributes;
-   <code title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code> and
-   <code title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-setselectionrange>setSelectionRange()</a></code> methods.</p>
+   <code title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code>,
+   <code title=dom-textarea/input-setRangeText><a href=#dom-textarea/input-setrangetext>setRangeText()</a></code>, and
+   <code title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-setselectionrange>setSelectionRange()</a></code>
+   methods.</p>
 
    <p>The <code title=dom-input-value><a href=#dom-input-value>value</a></code> IDL attribute is
    in mode <a href=#dom-input-value-value title=dom-input-value-value>value</a>.</p>
@@ -46251,8 +46290,10 @@
    <code title=dom-textarea/input-selectionEnd><a href=#dom-textarea/input-selectionend>selectionEnd</a></code>,
    <code title=dom-textarea/input-selectionDirection><a href=#dom-textarea/input-selectiondirection>selectionDirection</a></code>, and
    <code title=dom-input-value><a href=#dom-input-value>value</a></code> IDL attributes;
-   <code title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code> and
-   <code title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-setselectionrange>setSelectionRange()</a></code> methods.</p>
+   <code title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code>,
+   <code title=dom-textarea/input-setRangeText><a href=#dom-textarea/input-setrangetext>setRangeText()</a></code>, and
+   <code title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-setselectionrange>setSelectionRange()</a></code>
+   methods.</p>
 
    <p>The <code title=dom-input-value><a href=#dom-input-value>value</a></code> IDL attribute is
    in mode <a href=#dom-input-value-value title=dom-input-value-value>value</a>.</p>
@@ -46571,6 +46612,7 @@
    <code class=no-backref title=dom-input-valueAsDate><a href=#dom-input-valueasdate>valueAsDate</a></code>, and
    <code class=no-backref title=dom-input-valueAsNumber><a href=#dom-input-valueasnumber>valueAsNumber</a></code> IDL attributes;
    <code class=no-backref title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code>,
+   <code class=no-backref title=dom-textarea/input-setRangeText><a href=#dom-textarea/input-setrangetext>setRangeText()</a></code>,
    <code class=no-backref title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-setselectionrange>setSelectionRange()</a></code>,
    <code class=no-backref title=dom-input-stepDown><a href=#dom-input-stepdown>stepDown()</a></code> and
    <code class=no-backref title=dom-input-stepUp><a href=#dom-input-stepup>stepUp()</a></code> methods.</p>
@@ -46626,7 +46668,8 @@
    <code title=dom-textarea/input-selectionEnd><a href=#dom-textarea/input-selectionend>selectionEnd</a></code>,
    <code title=dom-textarea/input-selectionDirection><a href=#dom-textarea/input-selectiondirection>selectionDirection</a></code>, and
    <code title=dom-input-value><a href=#dom-input-value>value</a></code> IDL attributes;
-   <code title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code>, and
+   <code title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code>,
+   <code title=dom-textarea/input-setRangeText><a href=#dom-textarea/input-setrangetext>setRangeText()</a></code>, and
    <code title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-setselectionrange>setSelectionRange()</a></code> methods.</p>
 
    <p>The <code title=dom-input-value><a href=#dom-input-value>value</a></code> IDL attribute is
@@ -46852,7 +46895,8 @@
    <code class=no-backref title=dom-textarea/input-selectionStart><a href=#dom-textarea/input-selectionstart>selectionStart</a></code>,
    <code class=no-backref title=dom-textarea/input-selectionEnd><a href=#dom-textarea/input-selectionend>selectionEnd</a></code>, and
    <code class=no-backref title=dom-textarea/input-selectionDirection><a href=#dom-textarea/input-selectiondirection>selectionDirection</a></code> IDL attributes;
-   <code class=no-backref title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code> and
+   <code class=no-backref title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code>,
+   <code class=no-backref title=dom-textarea/input-setRangeText><a href=#dom-textarea/input-setrangetext>setRangeText()</a></code>, and
    <code class=no-backref title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-setselectionrange>setSelectionRange()</a></code> methods.</p>
 
   </div>
@@ -47029,7 +47073,8 @@
    <code class=no-backref title=dom-textarea/input-selectionStart><a href=#dom-textarea/input-selectionstart>selectionStart</a></code>,
    <code class=no-backref title=dom-textarea/input-selectionEnd><a href=#dom-textarea/input-selectionend>selectionEnd</a></code>, and
    <code class=no-backref title=dom-textarea/input-selectionDirection><a href=#dom-textarea/input-selectiondirection>selectionDirection</a></code> IDL attributes;
-   <code class=no-backref title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code> and
+   <code class=no-backref title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code>,
+   <code class=no-backref title=dom-textarea/input-setRangeText><a href=#dom-textarea/input-setrangetext>setRangeText()</a></code>, and
    <code class=no-backref title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-setselectionrange>setSelectionRange()</a></code> methods.</p>
 
   </div>
@@ -47184,7 +47229,8 @@
    <code class=no-backref title=dom-textarea/input-selectionStart><a href=#dom-textarea/input-selectionstart>selectionStart</a></code>,
    <code class=no-backref title=dom-textarea/input-selectionEnd><a href=#dom-textarea/input-selectionend>selectionEnd</a></code>, and
    <code class=no-backref title=dom-textarea/input-selectionDirection><a href=#dom-textarea/input-selectiondirection>selectionDirection</a></code> IDL attributes;
-   <code class=no-backref title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code> and
+   <code class=no-backref title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code>,
+   <code class=no-backref title=dom-textarea/input-setRangeText><a href=#dom-textarea/input-setrangetext>setRangeText()</a></code>, and
    <code class=no-backref title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-setselectionrange>setSelectionRange()</a></code> methods.</p>
 
   </div>
@@ -47339,7 +47385,8 @@
    <code class=no-backref title=dom-textarea/input-selectionStart><a href=#dom-textarea/input-selectionstart>selectionStart</a></code>,
    <code class=no-backref title=dom-textarea/input-selectionEnd><a href=#dom-textarea/input-selectionend>selectionEnd</a></code>, and
    <code class=no-backref title=dom-textarea/input-selectionDirection><a href=#dom-textarea/input-selectiondirection>selectionDirection</a></code> IDL attributes;
-   <code class=no-backref title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code> and
+   <code class=no-backref title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code>,
+   <code class=no-backref title=dom-textarea/input-setRangeText><a href=#dom-textarea/input-setrangetext>setRangeText()</a></code>, and
    <code class=no-backref title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-setselectionrange>setSelectionRange()</a></code> methods.</p>
 
   </div>
@@ -47492,7 +47539,8 @@
    <code class=no-backref title=dom-textarea/input-selectionStart><a href=#dom-textarea/input-selectionstart>selectionStart</a></code>,
    <code class=no-backref title=dom-textarea/input-selectionEnd><a href=#dom-textarea/input-selectionend>selectionEnd</a></code>, and
    <code class=no-backref title=dom-textarea/input-selectionDirection><a href=#dom-textarea/input-selectiondirection>selectionDirection</a></code> IDL attributes;
-   <code class=no-backref title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code> and
+   <code class=no-backref title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code>,
+   <code class=no-backref title=dom-textarea/input-setRangeText><a href=#dom-textarea/input-setrangetext>setRangeText()</a></code>, and
    <code class=no-backref title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-setselectionrange>setSelectionRange()</a></code> methods.</p>
 
   </div>
@@ -47643,7 +47691,8 @@
    <code class=no-backref title=dom-textarea/input-selectionEnd><a href=#dom-textarea/input-selectionend>selectionEnd</a></code>,
    <code class=no-backref title=dom-textarea/input-selectionDirection><a href=#dom-textarea/input-selectiondirection>selectionDirection</a></code>, and
    <code class=no-backref title=dom-input-valueAsDate><a href=#dom-input-valueasdate>valueAsDate</a></code> IDL attributes;
-   <code class=no-backref title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code> and
+   <code class=no-backref title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code>,
+   <code class=no-backref title=dom-textarea/input-setRangeText><a href=#dom-textarea/input-setrangetext>setRangeText()</a></code>, and
    <code class=no-backref title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-setselectionrange>setSelectionRange()</a></code> methods.</p>
 
   </div>
@@ -47815,7 +47864,8 @@
    <code class=no-backref title=dom-textarea/input-selectionEnd><a href=#dom-textarea/input-selectionend>selectionEnd</a></code>,
    <code class=no-backref title=dom-textarea/input-selectionDirection><a href=#dom-textarea/input-selectiondirection>selectionDirection</a></code>, and
    <code class=no-backref title=dom-input-valueAsDate><a href=#dom-input-valueasdate>valueAsDate</a></code> IDL attributes;
-   <code class=no-backref title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code> and
+   <code class=no-backref title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code>,
+   <code class=no-backref title=dom-textarea/input-setRangeText><a href=#dom-textarea/input-setrangetext>setRangeText()</a></code>, and
    <code class=no-backref title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-setselectionrange>setSelectionRange()</a></code> methods.</p>
 
   </div>
@@ -47984,7 +48034,8 @@
    <code class=no-backref title=dom-textarea/input-selectionEnd><a href=#dom-textarea/input-selectionend>selectionEnd</a></code>,
    <code class=no-backref title=dom-textarea/input-selectionDirection><a href=#dom-textarea/input-selectiondirection>selectionDirection</a></code>, and
    <code class=no-backref title=dom-input-valueAsDate><a href=#dom-input-valueasdate>valueAsDate</a></code> IDL attributes;
-   <code class=no-backref title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code> and
+   <code class=no-backref title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code>,
+   <code class=no-backref title=dom-textarea/input-setRangeText><a href=#dom-textarea/input-setrangetext>setRangeText()</a></code>, and
    <code class=no-backref title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-setselectionrange>setSelectionRange()</a></code> methods.</p>
 
   </div>
@@ -48145,6 +48196,7 @@
    <code class=no-backref title=dom-input-valueAsDate><a href=#dom-input-valueasdate>valueAsDate</a></code>, and
    <code class=no-backref title=dom-input-valueAsNumber><a href=#dom-input-valueasnumber>valueAsNumber</a></code> IDL attributes;
    <code class=no-backref title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code>,
+   <code class=no-backref title=dom-textarea/input-setRangeText><a href=#dom-textarea/input-setrangetext>setRangeText()</a></code>,
    <code class=no-backref title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-setselectionrange>setSelectionRange()</a></code>,
    <code class=no-backref title=dom-input-stepDown><a href=#dom-input-stepdown>stepDown()</a></code>, and
    <code class=no-backref title=dom-input-stepUp><a href=#dom-input-stepup>stepUp()</a></code> methods.</p>
@@ -48257,6 +48309,7 @@
    <code class=no-backref title=dom-input-valueAsDate><a href=#dom-input-valueasdate>valueAsDate</a></code>, and
    <code class=no-backref title=dom-input-valueAsNumber><a href=#dom-input-valueasnumber>valueAsNumber</a></code> IDL attributes;
    <code class=no-backref title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code>,
+   <code class=no-backref title=dom-textarea/input-setRangeText><a href=#dom-textarea/input-setrangetext>setRangeText()</a></code>,
    <code class=no-backref title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-setselectionrange>setSelectionRange()</a></code>,
    <code class=no-backref title=dom-input-stepDown><a href=#dom-input-stepdown>stepDown()</a></code>, and
    <code class=no-backref title=dom-input-stepUp><a href=#dom-input-stepup>stepUp()</a></code> methods.</p>
@@ -48396,6 +48449,7 @@
    <code class=no-backref title=dom-input-valueAsDate><a href=#dom-input-valueasdate>valueAsDate</a></code>, and
    <code class=no-backref title=dom-input-valueAsNumber><a href=#dom-input-valueasnumber>valueAsNumber</a></code> IDL attributes;
    <code class=no-backref title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code>,
+   <code class=no-backref title=dom-textarea/input-setRangeText><a href=#dom-textarea/input-setrangetext>setRangeText()</a></code>,
    <code class=no-backref title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-setselectionrange>setSelectionRange()</a></code>,
    <code class=no-backref title=dom-input-stepDown><a href=#dom-input-stepdown>stepDown()</a></code>, and
    <code class=no-backref title=dom-input-stepUp><a href=#dom-input-stepup>stepUp()</a></code> methods.</p>
@@ -48634,6 +48688,7 @@
    <code class=no-backref title=dom-input-valueAsDate><a href=#dom-input-valueasdate>valueAsDate</a></code>, and
    <code class=no-backref title=dom-input-valueAsNumber><a href=#dom-input-valueasnumber>valueAsNumber</a></code> IDL attributes;
    <code class=no-backref title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code>,
+   <code class=no-backref title=dom-textarea/input-setRangeText><a href=#dom-textarea/input-setrangetext>setRangeText()</a></code>,
    <code class=no-backref title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-setselectionrange>setSelectionRange()</a></code>,
    <code class=no-backref title=dom-input-stepDown><a href=#dom-input-stepdown>stepDown()</a></code>, and
    <code class=no-backref title=dom-input-stepUp><a href=#dom-input-stepup>stepUp()</a></code> methods.</p>
@@ -48727,6 +48782,7 @@
    <code class=no-backref title=dom-input-valueAsDate><a href=#dom-input-valueasdate>valueAsDate</a></code>, and
    <code class=no-backref title=dom-input-valueAsNumber><a href=#dom-input-valueasnumber>valueAsNumber</a></code> IDL attributes;
    <code class=no-backref title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code>,
+   <code class=no-backref title=dom-textarea/input-setRangeText><a href=#dom-textarea/input-setrangetext>setRangeText()</a></code>,
    <code class=no-backref title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-setselectionrange>setSelectionRange()</a></code>,
    <code class=no-backref title=dom-input-stepDown><a href=#dom-input-stepdown>stepDown()</a></code>, and
    <code class=no-backref title=dom-input-stepUp><a href=#dom-input-stepup>stepUp()</a></code> methods.</p>
@@ -48965,6 +49021,7 @@
    <code class=no-backref title=dom-input-valueAsDate><a href=#dom-input-valueasdate>valueAsDate</a></code>, and
    <code class=no-backref title=dom-input-valueAsNumber><a href=#dom-input-valueasnumber>valueAsNumber</a></code> IDL attributes;
    <code class=no-backref title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code>,
+   <code class=no-backref title=dom-textarea/input-setRangeText><a href=#dom-textarea/input-setrangetext>setRangeText()</a></code>,
    <code class=no-backref title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-setselectionrange>setSelectionRange()</a></code>,
    <code class=no-backref title=dom-input-stepDown><a href=#dom-input-stepdown>stepDown()</a></code>, and
    <code class=no-backref title=dom-input-stepUp><a href=#dom-input-stepup>stepUp()</a></code> methods.</p>
@@ -49067,6 +49124,7 @@
    <code class=no-backref title=dom-input-valueAsDate><a href=#dom-input-valueasdate>valueAsDate</a></code>, and
    <code class=no-backref title=dom-input-valueAsNumber><a href=#dom-input-valueasnumber>valueAsNumber</a></code> IDL attributes;
    <code class=no-backref title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code>,
+   <code class=no-backref title=dom-textarea/input-setRangeText><a href=#dom-textarea/input-setrangetext>setRangeText()</a></code>,
    <code class=no-backref title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-setselectionrange>setSelectionRange()</a></code>,
    <code class=no-backref title=dom-input-stepDown><a href=#dom-input-stepdown>stepDown()</a></code>, and
    <code class=no-backref title=dom-input-stepUp><a href=#dom-input-stepup>stepUp()</a></code> methods.</p>
@@ -49149,6 +49207,7 @@
    <code class=no-backref title=dom-input-valueAsDate><a href=#dom-input-valueasdate>valueAsDate</a></code>, and
    <code class=no-backref title=dom-input-valueAsNumber><a href=#dom-input-valueasnumber>valueAsNumber</a></code> IDL attributes;
    <code class=no-backref title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code>,
+   <code class=no-backref title=dom-textarea/input-setRangeText><a href=#dom-textarea/input-setrangetext>setRangeText()</a></code>,
    <code class=no-backref title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-setselectionrange>setSelectionRange()</a></code>,
    <code class=no-backref title=dom-input-stepDown><a href=#dom-input-stepdown>stepDown()</a></code>, and
    <code class=no-backref title=dom-input-stepUp><a href=#dom-input-stepup>stepUp()</a></code> methods.</p>
@@ -51421,6 +51480,10 @@
            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>;
            attribute DOMString <a href=#dom-textarea/input-selectiondirection title=dom-textarea/input-selectionDirection>selectionDirection</a>;
+
+  void <a href=#dom-textarea/input-setrangetext title=dom-textarea/input-setRangeText>setRangeText</a>(DOMString replacement);
+  void <a href=#dom-textarea/input-setrangetext title=dom-textarea/input-setRangeText>setRangeText</a>(DOMString replacement, unsigned long start, unsigned long end, optional <a href=#selectionmode>SelectionMode</a> selectionMode);
+
   void <a href=#dom-textarea/input-setselectionrange title=dom-textarea/input-setSelectionRange>setSelectionRange</a>(unsigned long start, unsigned long end, optional DOMString direction);
 };</pre>
    </dd>
@@ -51740,6 +51803,9 @@
   of the element's <code><a href=#the-label-element>label</a></code>s. The <code title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code>, <code title=dom-textarea/input-selectionStart><a href=#dom-textarea/input-selectionstart>selectionStart</a></code>,
   <code title=dom-textarea/input-selectionEnd><a href=#dom-textarea/input-selectionend>selectionEnd</a></code>,
   <code title=dom-textarea/input-selectionDirection><a href=#dom-textarea/input-selectiondirection>selectionDirection</a></code>,
+
+  <code title=dom-textarea/input-setRangeText><a href=#dom-textarea/input-setrangetext>setRangeText()</a></code>,
+
   and <code title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-setselectionrange>setSelectionRange()</a></code>
   methods and attributes expose the element's text selection. The
   <code title=dom-fe-autofocus><a href=#dom-fe-autofocus>autofocus</a></code>, <code title=dom-fe-disabled><a href=#dom-fe-disabled>disabled</a></code>, <code title=dom-fae-form><a href=#dom-fae-form>form</a></code>, and <code title=dom-fe-name><a href=#dom-fe-name>name</a></code> IDL attributes are part of the
@@ -53326,9 +53392,25 @@
            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>;
            attribute DOMString <a href=#dom-textarea/input-selectiondirection title=dom-textarea/input-selectionDirection>selectionDirection</a>;
-  void <a href=#dom-textarea/input-setselectionrange title=dom-textarea/input-setSelectionRange>setSelectionRange</a>(unsigned long start, unsigned long end, optional DOMString direction);</pre>
+
+  void <a href=#dom-textarea/input-setrangetext title=dom-textarea/input-setRangeText>setRangeText</a>(DOMString replacement);
+  void <a href=#dom-textarea/input-setrangetext title=dom-textarea/input-setRangeText>setRangeText</a>(DOMString replacement, unsigned long start, unsigned long end, optional <a href=#selectionmode>SelectionMode</a> selectionMode);
+
+  void <a href=#dom-textarea/input-setselectionrange title=dom-textarea/input-setSelectionRange>setSelectionRange</a>(unsigned long start, unsigned long end, optional DOMString direction = "preserve");</pre>
   <!-- v2: also add textLength? it seems to be widely used -->
 
+
+  <p>The <code title=dom-textarea/input-setRangeText><a href=#dom-textarea/input-setrangetext>setRangeText</a></code> method
+  uses the following enumeration:</p>
+
+  <pre class=idl>enum <dfn id=selectionmode>SelectionMode</dfn> {
+  '<a href=#dom-selectionmode-select title=dom-SelectionMode-select>select</a>',
+  '<a href=#dom-selectionmode-start title=dom-SelectionMode-start>start</a>',
+  '<a href=#dom-selectionmode-end title=dom-SelectionMode-end>end</a>',
+  '<a href=#dom-selectionmode-preserve title=dom-SelectionMode-preserve>preserve</a>',
+};</pre>
+
+
   <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>
 
@@ -53380,6 +53462,40 @@
 
    </dd>
 
+
+   <dt><var title="">element</var> . <code title=dom-textarea/input-setRangeText><a href=#dom-textarea/input-setrangetext>setRangeText</a></code>(<var title="">replacement</var> [, <var title="">start</var>, <var title="">end</var> [, <var title="">selectionMode</var> ] ] )</dt>
+
+   <dd>
+
+    <p>Replaces a range of text with the new text. If the <var title="">start</var> and <var title="">end</var> arguments are not
+    provided, the range is assumed to be the selection.</p>
+
+    <p>The final argument determines how the selection should be set
+    after the text has been replaced. The possible values are:</p>
+
+    <dl><dt>"<code title=dom-SelectionMode-select><a href=#dom-selectionmode-select>select</a></code>"</dt>
+
+     <dd>Selects the newly inserted text.</dd>
+
+
+     <dt>"<code title=dom-SelectionMode-start><a href=#dom-selectionmode-start>start</a></code>"</dt>
+
+     <dd>Moves the selection to just before the inserted text.</dd>
+
+
+     <dt>"<code title=dom-SelectionMode-end><a href=#dom-selectionmode-end>end</a></code>"</dt>
+
+     <dd>Moves the selection to just after the selected text.</dd>
+
+
+     <dt>"<code title=dom-SelectionMode-preserve><a href=#dom-selectionmode-preserve>preserve</a></code>"</dt>
+
+     <dd>Attempts to preserve the selection. This is the default.</dd>
+
+
+    </dl></dd>
+
+
   </dl><div class=impl>
 
   <p>When these methods and attributes are used with
@@ -53477,7 +53593,7 @@
   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
+  length of the value of 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
@@ -53494,7 +53610,134 @@
   <a href=#user-interaction-task-source>user interaction task source</a> as the task source.</p>
 
 
-  <p>All elements to which this API applies have either a selection or
+
+  <p>The <dfn id=dom-textarea/input-setrangetext title=dom-textarea/input-setRangeText><code>setRangeText(<var title="">replacement</var>, <var title="">start</var>, <var title="">end</var>, <var title="">selectMode</var>)</code></dfn>
+  method must run the following steps:</p>
+
+  <ol><li>
+
+    <p>If the method has only one argument, then let <var title="">start</var> and <var title="">end</var> have the values
+    of the <code title=dom-textarea/input-selectionStart><a href=#dom-textarea/input-selectionstart>selectionStart</a></code>
+    attribute and the <code title=dom-textarea/input-selectionEnd><a href=#dom-textarea/input-selectionend>selectionEnd</a></code>
+    attribute respectively.</p>
+
+    <p>Otherwise, let <var title="">start</var>, <var title="">end</var> have the values of the second and third
+    arguments respectively.</p>
+
+   </li>
+
+   <li><p>If <var title="">start</var> is greater than <var title="">end</var>, then throw an <code><a href=#indexsizeerror>IndexSizeError</a></code>
+   exception and abort these steps.</li>
+
+   <li><p>If either <var title="">start</var> or <var title="">end</var> are greater than the length of the value of the
+   text field, then set them to the length of the value of the text
+   field.</li>
+
+   <li><p>Let <var title="">selection start</var> be the current value
+   of the <code title=dom-textarea/input-selectionStart><a href=#dom-textarea/input-selectionstart>selectionStart</a></code>
+   attribute.</li>
+
+   <li><p>Let <var title="">selection end</var> be the current value
+   of the <code title=dom-textarea/input-selectionEnd><a href=#dom-textarea/input-selectionend>selectionEnd</a></code>
+   attribute.</li>
+
+   <li><p>If <var title="">start</var> is less than <var title="">end</var>, delete the sequence of characters starting with
+   the character at the <var title="">selection start</var>th position
+   (in logical order) and ending with the character at the <span title="">(<var title="">selection end</var>-1)</span>th
+   position.</li>
+
+   <li><p>Insert the value of the first argument into the text of the
+   value of the text field, immediately before the <var title="">start</var>th character.</li>
+
+   <li>
+
+    <p>Run the appropriate set of substeps from the following
+    list:</p>
+
+    <dl class=switch><dt>If the fourth argument's value is "<dfn id=dom-selectionmode-select title=dom-SelectionMode-select><code>select</code></dfn>"</dt>
+
+     <dd>
+
+      <p>Let <var title="">selection start</var> be <var title="">start</var>.</p>
+
+      <p>Let <var title="">selection end</var> be <var title="">end</var>.</p>
+
+     </dd>
+
+     <dt>If the fourth argument's value is "<dfn id=dom-selectionmode-start title=dom-SelectionMode-start><code>start</code></dfn>"</dt>
+
+     <dd>
+
+      <p>Let <var title="">selection start</var> and <var title="">selection end</var> be <var title="">start</var>.</p>
+
+     </dd>
+
+     <dt>If the fourth argument's value is "<dfn id=dom-selectionmode-end title=dom-SelectionMode-end><code>end</code></dfn>"</dt>
+
+     <dd>
+
+      <p>Let <var title="">selection start</var> and <var title="">selection end</var> be <var title="">end</var>.</p>
+
+     </dd>
+
+     <dt>If the fourth argument's value is "<dfn id=dom-selectionmode-preserve title=dom-SelectionMode-preserve><code>preserve</code></dfn>", or if the argument was omitted</dt>
+
+     <dd>
+
+      <ol><li><p>Let <var title="">old length</var> be <var title="">end</var> minus <var title="">start</var>.</p>
+
+       <li><p>Let <var title="">new length</var> be the length of the
+       value of the first argument (the newly inserted text).</p>
+
+       <li><p>Let <var title="">delta</var> be <var title="">new
+       length</var> minus <var title="">old length</var>.</p>
+
+       <li>
+
+        <p>If <var title="">selection start</var> is greater than <var title="">end</var>, then increment it by <var title="">delta</var>. (If <var title="">delta</var> is
+        negative, i.e. the new text is shorter than the old text, then
+        this will <em>decrease</em> the value of <var title="">selection start</var>.)</p>
+
+        <p>Otherwise: if <var title="">selection start</var> is
+        greater than <var title="">start</var>, then set it to <var title="">start</var>. (This snaps the start of the selection
+        to the start of the new text if it was in the middle of the
+        text that it replaced.)</p>
+
+       </li>
+
+       <li>
+
+        <p>If <var title="">selection end</var> is greater than <var title="">end</var>, then increment it by <var title="">delta</var> in the same way.</p>
+
+        <p>Otherwise: if <var title="">selection end</var> is greater
+        than <var title="">start</var>, then set it to <var title="">end</var>. (This snaps the end of the selection to
+        the end of the new text if it was in the middle of the text
+        that it replaced.)</p>
+
+       </li>
+
+      </ol></dd>
+
+    </dl></li>
+
+   <li>
+
+    <p>Set the selection of the text field to the sequence of
+    characters starting with the character at the <var title="">selection start</var>th position (in logical order) and
+    ending with the character at the <span title="">(<var title="">selection end</var>-1)</span>th position. 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>. The direction of the selection must be set to
+    <i>forward</i> if the platform does not support selections with
+    the direction <i>none</i>, and <i>none</i> otherwise.</p>
+
+   </li>
+
+   <li><p><a href=#queue-a-task>Queue a task</a> to <a href=#fire-a-simple-event>fire a simple
+   event</a> that bubbles named <code title=event-select>select</code> at the element, using the
+   <a href=#user-interaction-task-source>user interaction task source</a> as the task
+   source.</li>
+
+  </ol><p>All elements to which this API applies have either a selection or
   a text entry cursor position at all times (even for elements that
   are not <a href=#being-rendered>being rendered</a>). User agents should follow
   platform conventions to determine their initial state.</p>

Modified: index
===================================================================
--- index	2012-04-27 15:37:50 UTC (rev 7080)
+++ index	2012-04-28 04:01:44 UTC (rev 7081)
@@ -240,7 +240,7 @@
 
   <header class=head id=head><p><a class=logo href=http://www.whatwg.org/><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
    <hgroup><h1 class=allcaps>HTML</h1>
-    <h2 class="no-num no-toc">Living Standard — Last Updated 27 April 2012</h2>
+    <h2 class="no-num no-toc">Living Standard — Last Updated 28 April 2012</h2>
    </hgroup><dl><dt><strong>Web developer edition:</strong></dt>
     <dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
     <dt>Multiple-page version:</dt>
@@ -44596,6 +44596,10 @@
            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>;
            attribute DOMString <a href=#dom-textarea/input-selectiondirection title=dom-textarea/input-selectionDirection>selectionDirection</a>;
+
+  void <a href=#dom-textarea/input-setrangetext title=dom-textarea/input-setRangeText>setRangeText</a>(DOMString replacement);
+  void <a href=#dom-textarea/input-setrangetext title=dom-textarea/input-setRangeText>setRangeText</a>(DOMString replacement, unsigned long start, unsigned long end, optional <a href=#selectionmode>SelectionMode</a> selectionMode);
+
   void <a href=#dom-textarea/input-setselectionrange title=dom-textarea/input-setSelectionRange>setSelectionRange</a>(unsigned long start, unsigned long end, optional DOMString direction);
 };</pre>
    </dd>
@@ -44707,15 +44711,18 @@
      <td> A button
   </table><p>The <i>missing value default</i> is the <a href="#text-(type=text)-state-and-search-state-(type=search)" title=attr-input-type-text>Text</a> state.</p>
 
-  <p>Which of the <code title=attr-input-accept><a href=#attr-input-accept>accept</a></code>, <code title=attr-input-alt><a href=#attr-input-alt>alt</a></code>, <code title=attr-input-autocomplete><a href=#attr-input-autocomplete>autocomplete</a></code>, <code title=attr-input-checked><a href=#attr-input-checked>checked</a></code>, <code title=attr-input-dirname><a href=#attr-input-dirname>dirname</a></code>, <code title=attr-fs-formaction><a href=#attr-fs-formaction>formaction</a></code>, <code title=attr-fs-formenctype><a href=#attr-fs-formenctype>formenctype</a></code>, <code title=attr-fs-formmethod><a href=#attr-fs-formmethod>formmethod</a></code>, <code title=attr-fs-formnovalidate><a href=#attr-fs-formnovalidate>formnovalidate</a></code>, <code title=attr-fs-formtarget><a href=#attr-fs-formtarget>formtarget</a></code>, <code title=attr-dim-height><a href=#attr-dim-height>height</a></code>, <code title=attr-input-list><a href=#attr-input-list>list</a></code>, <code tit
 le=attr-input-max><a href=#attr-input-max>max</a></code>, <code title=attr-input-maxlength><a href=#attr-input-maxlength>maxlength</a></code>, <code title=attr-input-min><a href=#attr-input-min>min</a></code>, <code title=attr-input-multiple><a href=#attr-input-multiple>multiple</a></code>, <code title=attr-input-pattern><a href=#attr-input-pattern>pattern</a></code>, <code title=attr-input-placeholder><a href=#attr-input-placeholder>placeholder</a></code>, <code title=attr-input-readonly><a href=#attr-input-readonly>readonly</a></code>, <code title=attr-input-required><a href=#attr-input-required>required</a></code>, <code title=attr-input-size><a href=#attr-input-size>size</a></code>, <code title=attr-input-src><a href=#attr-input-src>src</a></code>, <code title=attr-input-step><a href=#attr-input-step>step</a></code>, and <code title=attr-dim-width><a href=#attr-dim-width>width</a></code> content attributes, the <code title=dom-input-checked><a href=#dom-input-checked>che
 cked</a></code>, <code title=dom-input-files><a href=#dom-input-files>files</a></code>, <code title=dom-input-valueAsDate><a href=#dom-input-valueasdate>valueAsDate</a></code>, <code title=dom-input-valueAsNumber><a href=#dom-input-valueasnumber>valueAsNumber</a></code>, and <code title=dom-input-list><a href=#dom-input-list>list</a></code> IDL
-  attributes, the <code title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code> method, the <code title=dom-textarea/input-selectionStart><a href=#dom-textarea/input-selectionstart>selectionStart</a></code>,
-  <code title=dom-textarea/input-selectionEnd><a href=#dom-textarea/input-selectionend>selectionEnd</a></code>, and
-  <code title=dom-textarea/input-selectionDirection><a href=#dom-textarea/input-selectiondirection>selectionDirection</a></code>,
-  IDL attributes, the <code title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-setselectionrange>setSelectionRange()</a></code>
-  method, the <code title=dom-input-stepUp><a href=#dom-input-stepup>stepUp()</a></code> and
+  <p>Which of the <code title=attr-input-accept><a href=#attr-input-accept>accept</a></code>, <code title=attr-input-alt><a href=#attr-input-alt>alt</a></code>, <code title=attr-input-autocomplete><a href=#attr-input-autocomplete>autocomplete</a></code>, <code title=attr-input-checked><a href=#attr-input-checked>checked</a></code>, <code title=attr-input-dirname><a href=#attr-input-dirname>dirname</a></code>, <code title=attr-fs-formaction><a href=#attr-fs-formaction>formaction</a></code>, <code title=attr-fs-formenctype><a href=#attr-fs-formenctype>formenctype</a></code>, <code title=attr-fs-formmethod><a href=#attr-fs-formmethod>formmethod</a></code>, <code title=attr-fs-formnovalidate><a href=#attr-fs-formnovalidate>formnovalidate</a></code>, <code title=attr-fs-formtarget><a href=#attr-fs-formtarget>formtarget</a></code>, <code title=attr-dim-height><a href=#attr-dim-height>height</a></code>, <code title=attr-input-list><a href=#attr-input-list>list</a></code>, <code tit
 le=attr-input-max><a href=#attr-input-max>max</a></code>, <code title=attr-input-maxlength><a href=#attr-input-maxlength>maxlength</a></code>, <code title=attr-input-min><a href=#attr-input-min>min</a></code>, <code title=attr-input-multiple><a href=#attr-input-multiple>multiple</a></code>, <code title=attr-input-pattern><a href=#attr-input-pattern>pattern</a></code>, <code title=attr-input-placeholder><a href=#attr-input-placeholder>placeholder</a></code>, <code title=attr-input-readonly><a href=#attr-input-readonly>readonly</a></code>, <code title=attr-input-required><a href=#attr-input-required>required</a></code>, <code title=attr-input-size><a href=#attr-input-size>size</a></code>, <code title=attr-input-src><a href=#attr-input-src>src</a></code>, <code title=attr-input-step><a href=#attr-input-step>step</a></code>, and <code title=attr-dim-width><a href=#attr-dim-width>width</a></code> content attributes, the <code title=dom-input-checked><a href=#dom-input-checked>che
 cked</a></code>, <code title=dom-input-files><a href=#dom-input-files>files</a></code>, <code title=dom-input-valueAsDate><a href=#dom-input-valueasdate>valueAsDate</a></code>, <code title=dom-input-valueAsNumber><a href=#dom-input-valueasnumber>valueAsNumber</a></code>, and <code title=dom-input-list><a href=#dom-input-list>list</a></code> IDL attributes, the <code title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code> method, the <code title=dom-textarea/input-selectionStart><a href=#dom-textarea/input-selectionstart>selectionStart</a></code>,
+  <code title=dom-textarea/input-selectionEnd><a href=#dom-textarea/input-selectionend>selectionEnd</a></code>,
+  and <code title=dom-textarea/input-selectionDirection><a href=#dom-textarea/input-selectiondirection>selectionDirection</a></code>,
+  IDL attributes, the
+
+  <code title=dom-textarea/input-setRangeText><a href=#dom-textarea/input-setrangetext>setRangeText()</a></code> and
+
+  <code title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-setselectionrange>setSelectionRange()</a></code>
+  methods, the <code title=dom-input-stepUp><a href=#dom-input-stepup>stepUp()</a></code> and
   <code title=dom-input-stepDown><a href=#dom-input-stepdown>stepDown()</a></code> methods, and the
   <code title=event-input-input><a href=#event-input-input>input</a></code> and <code title=event-input-change><a href=#event-input-change>change</a></code> events apply to an
-  <code><a href=#the-input-element>input</a></code> element depends on the state of its <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute.  The following table
+  <code><a href=#the-input-element>input</a></code> element depends on the state of its <code title=attr-input-type><a href=#attr-input-type>type</a></code> attribute. The following table
   <span class=impl>is non-normative and</span> summarizes which of
   those content attributes, IDL attributes, methods, and events apply
   to each state:</p>
@@ -45565,6 +45572,32 @@
      <td class=no> · <!-- Reset Button -->
 <!-- <td class="no"> ·      Button -->
 
+
+    <tr><th> <code title=dom-textarea/input-setRangeText><a href=#dom-textarea/input-setrangetext>setRangeText()</a></code>
+     <td class=no> · <!-- Hidden -->
+     <td class=yes> Yes     <!-- Text -->
+<!-- <td class="yes"> Yes          Search -->
+     <td class=yes> Yes     <!-- URL, Telephone -->
+     <td class=no> · <!-- E-mail -->
+     <td class=yes> Yes     <!-- Password -->
+     <td class=no> · <!-- Date and Time -->
+<!-- <td class="no"> ·      Date -->
+<!-- <td class="no"> ·      Month -->
+<!-- <td class="no"> ·      Week -->
+<!-- <td class="no"> ·      Time -->
+     <td class=no> · <!-- Local Date and Time -->
+     <td class=no> · <!-- Number -->
+     <td class=no> · <!-- Range -->
+     <td class=no> · <!-- Color -->
+     <td class=no> · <!-- Checkbox -->
+<!-- <td class="no"> ·      Radio Button -->
+     <td class=no> · <!-- File Upload -->
+     <td class=no> · <!-- Submit Button -->
+     <td class=no> · <!-- Image Button -->
+     <td class=no> · <!-- Reset Button -->
+<!-- <td class="no"> ·      Button -->
+
+
     <tr><th> <code title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-setselectionrange>setSelectionRange()</a></code>
      <td class=no> · <!-- Hidden -->
      <td class=yes> Yes     <!-- Text -->
@@ -45877,6 +45910,7 @@
   of the element's <code><a href=#the-label-element>label</a></code>s. The <code title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code>, <code title=dom-textarea/input-selectionStart><a href=#dom-textarea/input-selectionstart>selectionStart</a></code>,
   <code title=dom-textarea/input-selectionEnd><a href=#dom-textarea/input-selectionend>selectionEnd</a></code>,
   <code title=dom-textarea/input-selectionDirection><a href=#dom-textarea/input-selectiondirection>selectionDirection</a></code>,
+  <code title=dom-textarea/input-setRangeText><a href=#dom-textarea/input-setrangetext>setRangeText()</a></code>,
   and <code title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-setselectionrange>setSelectionRange()</a></code>
   methods and attributes expose the element's text selection. The
   <code title=dom-fe-autofocus><a href=#dom-fe-autofocus>autofocus</a></code>, <code title=dom-fe-disabled><a href=#dom-fe-disabled>disabled</a></code>, <code title=dom-fae-form><a href=#dom-fae-form>form</a></code>, and <code title=dom-fe-name><a href=#dom-fe-name>name</a></code> IDL attributes are part of the
@@ -45961,6 +45995,7 @@
    <code class=no-backref title=dom-input-valueAsDate><a href=#dom-input-valueasdate>valueAsDate</a></code>, and
    <code class=no-backref title=dom-input-valueAsNumber><a href=#dom-input-valueasnumber>valueAsNumber</a></code> IDL attributes;
    <code class=no-backref title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code>,
+   <code class=no-backref title=dom-textarea/input-setRangeText><a href=#dom-textarea/input-setrangetext>setRangeText()</a></code>,
    <code class=no-backref title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-setselectionrange>setSelectionRange()</a></code>,
    <code class=no-backref title=dom-input-stepDown><a href=#dom-input-stepdown>stepDown()</a></code>, and
    <code class=no-backref title=dom-input-stepUp><a href=#dom-input-stepup>stepUp()</a></code> methods.</p>
@@ -46048,8 +46083,10 @@
    <code title=dom-textarea/input-selectionEnd><a href=#dom-textarea/input-selectionend>selectionEnd</a></code>, 
    <code title=dom-textarea/input-selectionDirection><a href=#dom-textarea/input-selectiondirection>selectionDirection</a></code>, and
    <code title=dom-input-value><a href=#dom-input-value>value</a></code> IDL attributes;
-   <code title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code> and
-   <code title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-setselectionrange>setSelectionRange()</a></code> methods.</p>
+   <code title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code>,
+   <code title=dom-textarea/input-setRangeText><a href=#dom-textarea/input-setrangetext>setRangeText()</a></code>, and
+   <code title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-setselectionrange>setSelectionRange()</a></code>
+   methods.</p>
 
    <p>The <code title=dom-input-value><a href=#dom-input-value>value</a></code> IDL attribute is
    in mode <a href=#dom-input-value-value title=dom-input-value-value>value</a>.</p>
@@ -46146,8 +46183,10 @@
    <code title=dom-textarea/input-selectionEnd><a href=#dom-textarea/input-selectionend>selectionEnd</a></code>, 
    <code title=dom-textarea/input-selectionDirection><a href=#dom-textarea/input-selectiondirection>selectionDirection</a></code>, and
    <code title=dom-input-value><a href=#dom-input-value>value</a></code> IDL attributes;
-   <code title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code> and
-   <code title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-setselectionrange>setSelectionRange()</a></code> methods.</p>
+   <code title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code>,
+   <code title=dom-textarea/input-setRangeText><a href=#dom-textarea/input-setrangetext>setRangeText()</a></code>, and
+   <code title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-setselectionrange>setSelectionRange()</a></code>
+   methods.</p>
 
    <p>The <code title=dom-input-value><a href=#dom-input-value>value</a></code> IDL attribute is
    in mode <a href=#dom-input-value-value title=dom-input-value-value>value</a>.</p>
@@ -46251,8 +46290,10 @@
    <code title=dom-textarea/input-selectionEnd><a href=#dom-textarea/input-selectionend>selectionEnd</a></code>,
    <code title=dom-textarea/input-selectionDirection><a href=#dom-textarea/input-selectiondirection>selectionDirection</a></code>, and
    <code title=dom-input-value><a href=#dom-input-value>value</a></code> IDL attributes;
-   <code title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code> and
-   <code title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-setselectionrange>setSelectionRange()</a></code> methods.</p>
+   <code title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code>,
+   <code title=dom-textarea/input-setRangeText><a href=#dom-textarea/input-setrangetext>setRangeText()</a></code>, and
+   <code title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-setselectionrange>setSelectionRange()</a></code>
+   methods.</p>
 
    <p>The <code title=dom-input-value><a href=#dom-input-value>value</a></code> IDL attribute is
    in mode <a href=#dom-input-value-value title=dom-input-value-value>value</a>.</p>
@@ -46571,6 +46612,7 @@
    <code class=no-backref title=dom-input-valueAsDate><a href=#dom-input-valueasdate>valueAsDate</a></code>, and
    <code class=no-backref title=dom-input-valueAsNumber><a href=#dom-input-valueasnumber>valueAsNumber</a></code> IDL attributes;
    <code class=no-backref title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code>,
+   <code class=no-backref title=dom-textarea/input-setRangeText><a href=#dom-textarea/input-setrangetext>setRangeText()</a></code>,
    <code class=no-backref title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-setselectionrange>setSelectionRange()</a></code>,
    <code class=no-backref title=dom-input-stepDown><a href=#dom-input-stepdown>stepDown()</a></code> and
    <code class=no-backref title=dom-input-stepUp><a href=#dom-input-stepup>stepUp()</a></code> methods.</p>
@@ -46626,7 +46668,8 @@
    <code title=dom-textarea/input-selectionEnd><a href=#dom-textarea/input-selectionend>selectionEnd</a></code>,
    <code title=dom-textarea/input-selectionDirection><a href=#dom-textarea/input-selectiondirection>selectionDirection</a></code>, and
    <code title=dom-input-value><a href=#dom-input-value>value</a></code> IDL attributes;
-   <code title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code>, and
+   <code title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code>,
+   <code title=dom-textarea/input-setRangeText><a href=#dom-textarea/input-setrangetext>setRangeText()</a></code>, and
    <code title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-setselectionrange>setSelectionRange()</a></code> methods.</p>
 
    <p>The <code title=dom-input-value><a href=#dom-input-value>value</a></code> IDL attribute is
@@ -46852,7 +46895,8 @@
    <code class=no-backref title=dom-textarea/input-selectionStart><a href=#dom-textarea/input-selectionstart>selectionStart</a></code>,
    <code class=no-backref title=dom-textarea/input-selectionEnd><a href=#dom-textarea/input-selectionend>selectionEnd</a></code>, and
    <code class=no-backref title=dom-textarea/input-selectionDirection><a href=#dom-textarea/input-selectiondirection>selectionDirection</a></code> IDL attributes;
-   <code class=no-backref title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code> and
+   <code class=no-backref title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code>,
+   <code class=no-backref title=dom-textarea/input-setRangeText><a href=#dom-textarea/input-setrangetext>setRangeText()</a></code>, and
    <code class=no-backref title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-setselectionrange>setSelectionRange()</a></code> methods.</p>
 
   </div>
@@ -47029,7 +47073,8 @@
    <code class=no-backref title=dom-textarea/input-selectionStart><a href=#dom-textarea/input-selectionstart>selectionStart</a></code>,
    <code class=no-backref title=dom-textarea/input-selectionEnd><a href=#dom-textarea/input-selectionend>selectionEnd</a></code>, and
    <code class=no-backref title=dom-textarea/input-selectionDirection><a href=#dom-textarea/input-selectiondirection>selectionDirection</a></code> IDL attributes;
-   <code class=no-backref title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code> and
+   <code class=no-backref title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code>,
+   <code class=no-backref title=dom-textarea/input-setRangeText><a href=#dom-textarea/input-setrangetext>setRangeText()</a></code>, and
    <code class=no-backref title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-setselectionrange>setSelectionRange()</a></code> methods.</p>
 
   </div>
@@ -47184,7 +47229,8 @@
    <code class=no-backref title=dom-textarea/input-selectionStart><a href=#dom-textarea/input-selectionstart>selectionStart</a></code>,
    <code class=no-backref title=dom-textarea/input-selectionEnd><a href=#dom-textarea/input-selectionend>selectionEnd</a></code>, and
    <code class=no-backref title=dom-textarea/input-selectionDirection><a href=#dom-textarea/input-selectiondirection>selectionDirection</a></code> IDL attributes;
-   <code class=no-backref title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code> and
+   <code class=no-backref title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code>,
+   <code class=no-backref title=dom-textarea/input-setRangeText><a href=#dom-textarea/input-setrangetext>setRangeText()</a></code>, and
    <code class=no-backref title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-setselectionrange>setSelectionRange()</a></code> methods.</p>
 
   </div>
@@ -47339,7 +47385,8 @@
    <code class=no-backref title=dom-textarea/input-selectionStart><a href=#dom-textarea/input-selectionstart>selectionStart</a></code>,
    <code class=no-backref title=dom-textarea/input-selectionEnd><a href=#dom-textarea/input-selectionend>selectionEnd</a></code>, and
    <code class=no-backref title=dom-textarea/input-selectionDirection><a href=#dom-textarea/input-selectiondirection>selectionDirection</a></code> IDL attributes;
-   <code class=no-backref title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code> and
+   <code class=no-backref title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code>,
+   <code class=no-backref title=dom-textarea/input-setRangeText><a href=#dom-textarea/input-setrangetext>setRangeText()</a></code>, and
    <code class=no-backref title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-setselectionrange>setSelectionRange()</a></code> methods.</p>
 
   </div>
@@ -47492,7 +47539,8 @@
    <code class=no-backref title=dom-textarea/input-selectionStart><a href=#dom-textarea/input-selectionstart>selectionStart</a></code>,
    <code class=no-backref title=dom-textarea/input-selectionEnd><a href=#dom-textarea/input-selectionend>selectionEnd</a></code>, and
    <code class=no-backref title=dom-textarea/input-selectionDirection><a href=#dom-textarea/input-selectiondirection>selectionDirection</a></code> IDL attributes;
-   <code class=no-backref title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code> and
+   <code class=no-backref title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code>,
+   <code class=no-backref title=dom-textarea/input-setRangeText><a href=#dom-textarea/input-setrangetext>setRangeText()</a></code>, and
    <code class=no-backref title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-setselectionrange>setSelectionRange()</a></code> methods.</p>
 
   </div>
@@ -47643,7 +47691,8 @@
    <code class=no-backref title=dom-textarea/input-selectionEnd><a href=#dom-textarea/input-selectionend>selectionEnd</a></code>,
    <code class=no-backref title=dom-textarea/input-selectionDirection><a href=#dom-textarea/input-selectiondirection>selectionDirection</a></code>, and
    <code class=no-backref title=dom-input-valueAsDate><a href=#dom-input-valueasdate>valueAsDate</a></code> IDL attributes;
-   <code class=no-backref title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code> and
+   <code class=no-backref title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code>,
+   <code class=no-backref title=dom-textarea/input-setRangeText><a href=#dom-textarea/input-setrangetext>setRangeText()</a></code>, and
    <code class=no-backref title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-setselectionrange>setSelectionRange()</a></code> methods.</p>
 
   </div>
@@ -47815,7 +47864,8 @@
    <code class=no-backref title=dom-textarea/input-selectionEnd><a href=#dom-textarea/input-selectionend>selectionEnd</a></code>,
    <code class=no-backref title=dom-textarea/input-selectionDirection><a href=#dom-textarea/input-selectiondirection>selectionDirection</a></code>, and
    <code class=no-backref title=dom-input-valueAsDate><a href=#dom-input-valueasdate>valueAsDate</a></code> IDL attributes;
-   <code class=no-backref title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code> and
+   <code class=no-backref title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code>,
+   <code class=no-backref title=dom-textarea/input-setRangeText><a href=#dom-textarea/input-setrangetext>setRangeText()</a></code>, and
    <code class=no-backref title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-setselectionrange>setSelectionRange()</a></code> methods.</p>
 
   </div>
@@ -47984,7 +48034,8 @@
    <code class=no-backref title=dom-textarea/input-selectionEnd><a href=#dom-textarea/input-selectionend>selectionEnd</a></code>,
    <code class=no-backref title=dom-textarea/input-selectionDirection><a href=#dom-textarea/input-selectiondirection>selectionDirection</a></code>, and
    <code class=no-backref title=dom-input-valueAsDate><a href=#dom-input-valueasdate>valueAsDate</a></code> IDL attributes;
-   <code class=no-backref title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code> and
+   <code class=no-backref title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code>,
+   <code class=no-backref title=dom-textarea/input-setRangeText><a href=#dom-textarea/input-setrangetext>setRangeText()</a></code>, and
    <code class=no-backref title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-setselectionrange>setSelectionRange()</a></code> methods.</p>
 
   </div>
@@ -48145,6 +48196,7 @@
    <code class=no-backref title=dom-input-valueAsDate><a href=#dom-input-valueasdate>valueAsDate</a></code>, and
    <code class=no-backref title=dom-input-valueAsNumber><a href=#dom-input-valueasnumber>valueAsNumber</a></code> IDL attributes;
    <code class=no-backref title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code>,
+   <code class=no-backref title=dom-textarea/input-setRangeText><a href=#dom-textarea/input-setrangetext>setRangeText()</a></code>,
    <code class=no-backref title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-setselectionrange>setSelectionRange()</a></code>,
    <code class=no-backref title=dom-input-stepDown><a href=#dom-input-stepdown>stepDown()</a></code>, and
    <code class=no-backref title=dom-input-stepUp><a href=#dom-input-stepup>stepUp()</a></code> methods.</p>
@@ -48257,6 +48309,7 @@
    <code class=no-backref title=dom-input-valueAsDate><a href=#dom-input-valueasdate>valueAsDate</a></code>, and
    <code class=no-backref title=dom-input-valueAsNumber><a href=#dom-input-valueasnumber>valueAsNumber</a></code> IDL attributes;
    <code class=no-backref title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code>,
+   <code class=no-backref title=dom-textarea/input-setRangeText><a href=#dom-textarea/input-setrangetext>setRangeText()</a></code>,
    <code class=no-backref title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-setselectionrange>setSelectionRange()</a></code>,
    <code class=no-backref title=dom-input-stepDown><a href=#dom-input-stepdown>stepDown()</a></code>, and
    <code class=no-backref title=dom-input-stepUp><a href=#dom-input-stepup>stepUp()</a></code> methods.</p>
@@ -48396,6 +48449,7 @@
    <code class=no-backref title=dom-input-valueAsDate><a href=#dom-input-valueasdate>valueAsDate</a></code>, and
    <code class=no-backref title=dom-input-valueAsNumber><a href=#dom-input-valueasnumber>valueAsNumber</a></code> IDL attributes;
    <code class=no-backref title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code>,
+   <code class=no-backref title=dom-textarea/input-setRangeText><a href=#dom-textarea/input-setrangetext>setRangeText()</a></code>,
    <code class=no-backref title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-setselectionrange>setSelectionRange()</a></code>,
    <code class=no-backref title=dom-input-stepDown><a href=#dom-input-stepdown>stepDown()</a></code>, and
    <code class=no-backref title=dom-input-stepUp><a href=#dom-input-stepup>stepUp()</a></code> methods.</p>
@@ -48634,6 +48688,7 @@
    <code class=no-backref title=dom-input-valueAsDate><a href=#dom-input-valueasdate>valueAsDate</a></code>, and
    <code class=no-backref title=dom-input-valueAsNumber><a href=#dom-input-valueasnumber>valueAsNumber</a></code> IDL attributes;
    <code class=no-backref title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code>,
+   <code class=no-backref title=dom-textarea/input-setRangeText><a href=#dom-textarea/input-setrangetext>setRangeText()</a></code>,
    <code class=no-backref title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-setselectionrange>setSelectionRange()</a></code>,
    <code class=no-backref title=dom-input-stepDown><a href=#dom-input-stepdown>stepDown()</a></code>, and
    <code class=no-backref title=dom-input-stepUp><a href=#dom-input-stepup>stepUp()</a></code> methods.</p>
@@ -48727,6 +48782,7 @@
    <code class=no-backref title=dom-input-valueAsDate><a href=#dom-input-valueasdate>valueAsDate</a></code>, and
    <code class=no-backref title=dom-input-valueAsNumber><a href=#dom-input-valueasnumber>valueAsNumber</a></code> IDL attributes;
    <code class=no-backref title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code>,
+   <code class=no-backref title=dom-textarea/input-setRangeText><a href=#dom-textarea/input-setrangetext>setRangeText()</a></code>,
    <code class=no-backref title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-setselectionrange>setSelectionRange()</a></code>,
    <code class=no-backref title=dom-input-stepDown><a href=#dom-input-stepdown>stepDown()</a></code>, and
    <code class=no-backref title=dom-input-stepUp><a href=#dom-input-stepup>stepUp()</a></code> methods.</p>
@@ -48965,6 +49021,7 @@
    <code class=no-backref title=dom-input-valueAsDate><a href=#dom-input-valueasdate>valueAsDate</a></code>, and
    <code class=no-backref title=dom-input-valueAsNumber><a href=#dom-input-valueasnumber>valueAsNumber</a></code> IDL attributes;
    <code class=no-backref title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code>,
+   <code class=no-backref title=dom-textarea/input-setRangeText><a href=#dom-textarea/input-setrangetext>setRangeText()</a></code>,
    <code class=no-backref title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-setselectionrange>setSelectionRange()</a></code>,
    <code class=no-backref title=dom-input-stepDown><a href=#dom-input-stepdown>stepDown()</a></code>, and
    <code class=no-backref title=dom-input-stepUp><a href=#dom-input-stepup>stepUp()</a></code> methods.</p>
@@ -49067,6 +49124,7 @@
    <code class=no-backref title=dom-input-valueAsDate><a href=#dom-input-valueasdate>valueAsDate</a></code>, and
    <code class=no-backref title=dom-input-valueAsNumber><a href=#dom-input-valueasnumber>valueAsNumber</a></code> IDL attributes;
    <code class=no-backref title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code>,
+   <code class=no-backref title=dom-textarea/input-setRangeText><a href=#dom-textarea/input-setrangetext>setRangeText()</a></code>,
    <code class=no-backref title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-setselectionrange>setSelectionRange()</a></code>,
    <code class=no-backref title=dom-input-stepDown><a href=#dom-input-stepdown>stepDown()</a></code>, and
    <code class=no-backref title=dom-input-stepUp><a href=#dom-input-stepup>stepUp()</a></code> methods.</p>
@@ -49149,6 +49207,7 @@
    <code class=no-backref title=dom-input-valueAsDate><a href=#dom-input-valueasdate>valueAsDate</a></code>, and
    <code class=no-backref title=dom-input-valueAsNumber><a href=#dom-input-valueasnumber>valueAsNumber</a></code> IDL attributes;
    <code class=no-backref title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code>,
+   <code class=no-backref title=dom-textarea/input-setRangeText><a href=#dom-textarea/input-setrangetext>setRangeText()</a></code>,
    <code class=no-backref title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-setselectionrange>setSelectionRange()</a></code>,
    <code class=no-backref title=dom-input-stepDown><a href=#dom-input-stepdown>stepDown()</a></code>, and
    <code class=no-backref title=dom-input-stepUp><a href=#dom-input-stepup>stepUp()</a></code> methods.</p>
@@ -51421,6 +51480,10 @@
            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>;
            attribute DOMString <a href=#dom-textarea/input-selectiondirection title=dom-textarea/input-selectionDirection>selectionDirection</a>;
+
+  void <a href=#dom-textarea/input-setrangetext title=dom-textarea/input-setRangeText>setRangeText</a>(DOMString replacement);
+  void <a href=#dom-textarea/input-setrangetext title=dom-textarea/input-setRangeText>setRangeText</a>(DOMString replacement, unsigned long start, unsigned long end, optional <a href=#selectionmode>SelectionMode</a> selectionMode);
+
   void <a href=#dom-textarea/input-setselectionrange title=dom-textarea/input-setSelectionRange>setSelectionRange</a>(unsigned long start, unsigned long end, optional DOMString direction);
 };</pre>
    </dd>
@@ -51740,6 +51803,9 @@
   of the element's <code><a href=#the-label-element>label</a></code>s. The <code title=dom-textarea/input-select><a href=#dom-textarea/input-select>select()</a></code>, <code title=dom-textarea/input-selectionStart><a href=#dom-textarea/input-selectionstart>selectionStart</a></code>,
   <code title=dom-textarea/input-selectionEnd><a href=#dom-textarea/input-selectionend>selectionEnd</a></code>,
   <code title=dom-textarea/input-selectionDirection><a href=#dom-textarea/input-selectiondirection>selectionDirection</a></code>,
+
+  <code title=dom-textarea/input-setRangeText><a href=#dom-textarea/input-setrangetext>setRangeText()</a></code>,
+
   and <code title=dom-textarea/input-setSelectionRange><a href=#dom-textarea/input-setselectionrange>setSelectionRange()</a></code>
   methods and attributes expose the element's text selection. The
   <code title=dom-fe-autofocus><a href=#dom-fe-autofocus>autofocus</a></code>, <code title=dom-fe-disabled><a href=#dom-fe-disabled>disabled</a></code>, <code title=dom-fae-form><a href=#dom-fae-form>form</a></code>, and <code title=dom-fe-name><a href=#dom-fe-name>name</a></code> IDL attributes are part of the
@@ -53326,9 +53392,25 @@
            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>;
            attribute DOMString <a href=#dom-textarea/input-selectiondirection title=dom-textarea/input-selectionDirection>selectionDirection</a>;
-  void <a href=#dom-textarea/input-setselectionrange title=dom-textarea/input-setSelectionRange>setSelectionRange</a>(unsigned long start, unsigned long end, optional DOMString direction);</pre>
+
+  void <a href=#dom-textarea/input-setrangetext title=dom-textarea/input-setRangeText>setRangeText</a>(DOMString replacement);
+  void <a href=#dom-textarea/input-setrangetext title=dom-textarea/input-setRangeText>setRangeText</a>(DOMString replacement, unsigned long start, unsigned long end, optional <a href=#selectionmode>SelectionMode</a> selectionMode);
+
+  void <a href=#dom-textarea/input-setselectionrange title=dom-textarea/input-setSelectionRange>setSelectionRange</a>(unsigned long start, unsigned long end, optional DOMString direction = "preserve");</pre>
   <!-- v2: also add textLength? it seems to be widely used -->
 
+
+  <p>The <code title=dom-textarea/input-setRangeText><a href=#dom-textarea/input-setrangetext>setRangeText</a></code> method
+  uses the following enumeration:</p>
+
+  <pre class=idl>enum <dfn id=selectionmode>SelectionMode</dfn> {
+  '<a href=#dom-selectionmode-select title=dom-SelectionMode-select>select</a>',
+  '<a href=#dom-selectionmode-start title=dom-SelectionMode-start>start</a>',
+  '<a href=#dom-selectionmode-end title=dom-SelectionMode-end>end</a>',
+  '<a href=#dom-selectionmode-preserve title=dom-SelectionMode-preserve>preserve</a>',
+};</pre>
+
+
   <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>
 
@@ -53380,6 +53462,40 @@
 
    </dd>
 
+
+   <dt><var title="">element</var> . <code title=dom-textarea/input-setRangeText><a href=#dom-textarea/input-setrangetext>setRangeText</a></code>(<var title="">replacement</var> [, <var title="">start</var>, <var title="">end</var> [, <var title="">selectionMode</var> ] ] )</dt>
+
+   <dd>
+
+    <p>Replaces a range of text with the new text. If the <var title="">start</var> and <var title="">end</var> arguments are not
+    provided, the range is assumed to be the selection.</p>
+
+    <p>The final argument determines how the selection should be set
+    after the text has been replaced. The possible values are:</p>
+
+    <dl><dt>"<code title=dom-SelectionMode-select><a href=#dom-selectionmode-select>select</a></code>"</dt>
+
+     <dd>Selects the newly inserted text.</dd>
+
+
+     <dt>"<code title=dom-SelectionMode-start><a href=#dom-selectionmode-start>start</a></code>"</dt>
+
+     <dd>Moves the selection to just before the inserted text.</dd>
+
+
+     <dt>"<code title=dom-SelectionMode-end><a href=#dom-selectionmode-end>end</a></code>"</dt>
+
+     <dd>Moves the selection to just after the selected text.</dd>
+
+
+     <dt>"<code title=dom-SelectionMode-preserve><a href=#dom-selectionmode-preserve>preserve</a></code>"</dt>
+
+     <dd>Attempts to preserve the selection. This is the default.</dd>
+
+
+    </dl></dd>
+
+
   </dl><div class=impl>
 
   <p>When these methods and attributes are used with
@@ -53477,7 +53593,7 @@
   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
+  length of the value of 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
@@ -53494,7 +53610,134 @@
   <a href=#user-interaction-task-source>user interaction task source</a> as the task source.</p>
 
 
-  <p>All elements to which this API applies have either a selection or
+
+  <p>The <dfn id=dom-textarea/input-setrangetext title=dom-textarea/input-setRangeText><code>setRangeText(<var title="">replacement</var>, <var title="">start</var>, <var title="">end</var>, <var title="">selectMode</var>)</code></dfn>
+  method must run the following steps:</p>
+
+  <ol><li>
+
+    <p>If the method has only one argument, then let <var title="">start</var> and <var title="">end</var> have the values
+    of the <code title=dom-textarea/input-selectionStart><a href=#dom-textarea/input-selectionstart>selectionStart</a></code>
+    attribute and the <code title=dom-textarea/input-selectionEnd><a href=#dom-textarea/input-selectionend>selectionEnd</a></code>
+    attribute respectively.</p>
+
+    <p>Otherwise, let <var title="">start</var>, <var title="">end</var> have the values of the second and third
+    arguments respectively.</p>
+
+   </li>
+
+   <li><p>If <var title="">start</var> is greater than <var title="">end</var>, then throw an <code><a href=#indexsizeerror>IndexSizeError</a></code>
+   exception and abort these steps.</li>
+
+   <li><p>If either <var title="">start</var> or <var title="">end</var> are greater than the length of the value of the
+   text field, then set them to the length of the value of the text
+   field.</li>
+
+   <li><p>Let <var title="">selection start</var> be the current value
+   of the <code title=dom-textarea/input-selectionStart><a href=#dom-textarea/input-selectionstart>selectionStart</a></code>
+   attribute.</li>
+
+   <li><p>Let <var title="">selection end</var> be the current value
+   of the <code title=dom-textarea/input-selectionEnd><a href=#dom-textarea/input-selectionend>selectionEnd</a></code>
+   attribute.</li>
+
+   <li><p>If <var title="">start</var> is less than <var title="">end</var>, delete the sequence of characters starting with
+   the character at the <var title="">selection start</var>th position
+   (in logical order) and ending with the character at the <span title="">(<var title="">selection end</var>-1)</span>th
+   position.</li>
+
+   <li><p>Insert the value of the first argument into the text of the
+   value of the text field, immediately before the <var title="">start</var>th character.</li>
+
+   <li>
+
+    <p>Run the appropriate set of substeps from the following
+    list:</p>
+
+    <dl class=switch><dt>If the fourth argument's value is "<dfn id=dom-selectionmode-select title=dom-SelectionMode-select><code>select</code></dfn>"</dt>
+
+     <dd>
+
+      <p>Let <var title="">selection start</var> be <var title="">start</var>.</p>
+
+      <p>Let <var title="">selection end</var> be <var title="">end</var>.</p>
+
+     </dd>
+
+     <dt>If the fourth argument's value is "<dfn id=dom-selectionmode-start title=dom-SelectionMode-start><code>start</code></dfn>"</dt>
+
+     <dd>
+
+      <p>Let <var title="">selection start</var> and <var title="">selection end</var> be <var title="">start</var>.</p>
+
+     </dd>
+
+     <dt>If the fourth argument's value is "<dfn id=dom-selectionmode-end title=dom-SelectionMode-end><code>end</code></dfn>"</dt>
+
+     <dd>
+
+      <p>Let <var title="">selection start</var> and <var title="">selection end</var> be <var title="">end</var>.</p>
+
+     </dd>
+
+     <dt>If the fourth argument's value is "<dfn id=dom-selectionmode-preserve title=dom-SelectionMode-preserve><code>preserve</code></dfn>", or if the argument was omitted</dt>
+
+     <dd>
+
+      <ol><li><p>Let <var title="">old length</var> be <var title="">end</var> minus <var title="">start</var>.</p>
+
+       <li><p>Let <var title="">new length</var> be the length of the
+       value of the first argument (the newly inserted text).</p>
+
+       <li><p>Let <var title="">delta</var> be <var title="">new
+       length</var> minus <var title="">old length</var>.</p>
+
+       <li>
+
+        <p>If <var title="">selection start</var> is greater than <var title="">end</var>, then increment it by <var title="">delta</var>. (If <var title="">delta</var> is
+        negative, i.e. the new text is shorter than the old text, then
+        this will <em>decrease</em> the value of <var title="">selection start</var>.)</p>
+
+        <p>Otherwise: if <var title="">selection start</var> is
+        greater than <var title="">start</var>, then set it to <var title="">start</var>. (This snaps the start of the selection
+        to the start of the new text if it was in the middle of the
+        text that it replaced.)</p>
+
+       </li>
+
+       <li>
+
+        <p>If <var title="">selection end</var> is greater than <var title="">end</var>, then increment it by <var title="">delta</var> in the same way.</p>
+
+        <p>Otherwise: if <var title="">selection end</var> is greater
+        than <var title="">start</var>, then set it to <var title="">end</var>. (This snaps the end of the selection to
+        the end of the new text if it was in the middle of the text
+        that it replaced.)</p>
+
+       </li>
+
+      </ol></dd>
+
+    </dl></li>
+
+   <li>
+
+    <p>Set the selection of the text field to the sequence of
+    characters starting with the character at the <var title="">selection start</var>th position (in logical order) and
+    ending with the character at the <span title="">(<var title="">selection end</var>-1)</span>th position. 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>. The direction of the selection must be set to
+    <i>forward</i> if the platform does not support selections with
+    the direction <i>none</i>, and <i>none</i> otherwise.</p>
+
+   </li>
+
+   <li><p><a href=#queue-a-task>Queue a task</a> to <a href=#fire-a-simple-event>fire a simple
+   event</a> that bubbles named <code title=event-select>select</code> at the element, using the
+   <a href=#user-interaction-task-source>user interaction task source</a> as the task
+   source.</li>
+
+  </ol><p>All elements to which this API applies have either a selection or
   a text entry cursor position at all times (even for elements that
   are not <a href=#being-rendered>being rendered</a>). User agents should follow
   platform conventions to determine their initial state.</p>

Modified: source
===================================================================
--- source	2012-04-27 15:37:50 UTC (rev 7080)
+++ source	2012-04-28 04:01:44 UTC (rev 7081)
@@ -52126,6 +52126,10 @@
            attribute unsigned long <span title="dom-textarea/input-selectionStart">selectionStart</span>;
            attribute unsigned long <span title="dom-textarea/input-selectionEnd">selectionEnd</span>;
            attribute DOMString <span title="dom-textarea/input-selectionDirection">selectionDirection</span>;
+<!--END w3c-html-->
+  void <span title="dom-textarea/input-setRangeText">setRangeText</span>(DOMString replacement);
+  void <span title="dom-textarea/input-setRangeText">setRangeText</span>(DOMString replacement, unsigned long start, unsigned long end, optional <span>SelectionMode</span> selectionMode);
+<!--START w3c-html-->
   void <span title="dom-textarea/input-setSelectionRange">setSelectionRange</span>(unsigned long start, unsigned long end, optional DOMString direction);
 };</pre>
    </dd>
@@ -52297,20 +52301,24 @@
   title="dom-input-files">files</code>, <code
   title="dom-input-valueAsDate">valueAsDate</code>, <code
   title="dom-input-valueAsNumber">valueAsNumber</code>, and <code
-  title="dom-input-list">list</code> IDL
-  attributes, the <code
+  title="dom-input-list">list</code> IDL attributes, the <code
   title="dom-textarea/input-select">select()</code> method, the <code
   title="dom-textarea/input-selectionStart">selectionStart</code>,
-  <code title="dom-textarea/input-selectionEnd">selectionEnd</code>, and
-  <code title="dom-textarea/input-selectionDirection">selectionDirection</code>,
-  IDL attributes, the <code
+  <code title="dom-textarea/input-selectionEnd">selectionEnd</code>,
+  and <code
+  title="dom-textarea/input-selectionDirection">selectionDirection</code>,
+  IDL attributes, the
+<!--END w3c-html-->
+  <code title="dom-textarea/input-setRangeText">setRangeText()</code> and
+<!--START w3c-html-->
+  <code
   title="dom-textarea/input-setSelectionRange">setSelectionRange()</code>
-  method, the <code title="dom-input-stepUp">stepUp()</code> and
+  methods, the <code title="dom-input-stepUp">stepUp()</code> and
   <code title="dom-input-stepDown">stepDown()</code> methods, and the
   <code title="event-input-input">input</code> and <code
   title="event-input-change">change</code> events apply to an
   <code>input</code> element depends on the state of its <code
-  title="attr-input-type">type</code> attribute.  The following table
+  title="attr-input-type">type</code> attribute. The following table
   <span class="impl">is non-normative and</span> summarizes which of
   those content attributes, IDL attributes, methods, and events apply
   to each state:</p>
@@ -53201,7 +53209,34 @@
      <td class="no"> · <!-- Reset Button -->
 <!-- <td class="no"> ·      Button -->
 
+<!--END w3c-html-->
     <tr>
+     <th> <code title="dom-textarea/input-setRangeText">setRangeText()</code>
+     <td class="no"> · <!-- Hidden -->
+     <td class="yes"> Yes     <!-- Text -->
+<!-- <td class="yes"> Yes          Search -->
+     <td class="yes"> Yes     <!-- URL, Telephone -->
+     <td class="no"> · <!-- E-mail -->
+     <td class="yes"> Yes     <!-- Password -->
+     <td class="no"> · <!-- Date and Time -->
+<!-- <td class="no"> ·      Date -->
+<!-- <td class="no"> ·      Month -->
+<!-- <td class="no"> ·      Week -->
+<!-- <td class="no"> ·      Time -->
+     <td class="no"> · <!-- Local Date and Time -->
+     <td class="no"> · <!-- Number -->
+     <td class="no"> · <!-- Range -->
+     <td class="no"> · <!-- Color -->
+     <td class="no"> · <!-- Checkbox -->
+<!-- <td class="no"> ·      Radio Button -->
+     <td class="no"> · <!-- File Upload -->
+     <td class="no"> · <!-- Submit Button -->
+     <td class="no"> · <!-- Image Button -->
+     <td class="no"> · <!-- Reset Button -->
+<!-- <td class="no"> ·      Button -->
+<!--START w3c-html-->
+
+    <tr>
      <th> <code title="dom-textarea/input-setSelectionRange">setSelectionRange()</code>
      <td class="no"> · <!-- Hidden -->
      <td class="yes"> Yes     <!-- Text -->
@@ -53621,7 +53656,9 @@
   title="dom-textarea/input-select">select()</code>, <code
   title="dom-textarea/input-selectionStart">selectionStart</code>,
   <code title="dom-textarea/input-selectionEnd">selectionEnd</code>,
-  <code title="dom-textarea/input-selectionDirection">selectionDirection</code>,
+  <code
+  title="dom-textarea/input-selectionDirection">selectionDirection</code>,
+  <code title="dom-textarea/input-setRangeText">setRangeText()</code>,
   and <code
   title="dom-textarea/input-setSelectionRange">setSelectionRange()</code>
   methods and attributes expose the element's text selection. The
@@ -53713,6 +53750,7 @@
    <code class="no-backref" title="dom-input-valueAsDate">valueAsDate</code>, and
    <code class="no-backref" title="dom-input-valueAsNumber">valueAsNumber</code> IDL attributes;
    <code class="no-backref" title="dom-textarea/input-select">select()</code>,
+   <code class="no-backref" title="dom-textarea/input-setRangeText">setRangeText()</code>,
    <code class="no-backref" title="dom-textarea/input-setSelectionRange">setSelectionRange()</code>,
    <code class="no-backref" title="dom-input-stepDown">stepDown()</code>, and
    <code class="no-backref" title="dom-input-stepUp">stepUp()</code> methods.</p>
@@ -53816,8 +53854,10 @@
    <code title="dom-textarea/input-selectionEnd">selectionEnd</code>, 
    <code title="dom-textarea/input-selectionDirection">selectionDirection</code>, and
    <code title="dom-input-value">value</code> IDL attributes;
-   <code title="dom-textarea/input-select">select()</code> and
-   <code title="dom-textarea/input-setSelectionRange">setSelectionRange()</code> methods.</p>
+   <code title="dom-textarea/input-select">select()</code>,
+   <code title="dom-textarea/input-setRangeText">setRangeText()</code>, and
+   <code title="dom-textarea/input-setSelectionRange">setSelectionRange()</code>
+   methods.</p>
 
    <p>The <code title="dom-input-value">value</code> IDL attribute is
    in mode <span title="dom-input-value-value">value</span>.</p>
@@ -53924,8 +53964,10 @@
    <code title="dom-textarea/input-selectionEnd">selectionEnd</code>, 
    <code title="dom-textarea/input-selectionDirection">selectionDirection</code>, and
    <code title="dom-input-value">value</code> IDL attributes;
-   <code title="dom-textarea/input-select">select()</code> and
-   <code title="dom-textarea/input-setSelectionRange">setSelectionRange()</code> methods.</p>
+   <code title="dom-textarea/input-select">select()</code>,
+   <code title="dom-textarea/input-setRangeText">setRangeText()</code>, and
+   <code title="dom-textarea/input-setSelectionRange">setSelectionRange()</code>
+   methods.</p>
 
    <p>The <code title="dom-input-value">value</code> IDL attribute is
    in mode <span title="dom-input-value-value">value</span>.</p>
@@ -54037,8 +54079,10 @@
    <code title="dom-textarea/input-selectionEnd">selectionEnd</code>,
    <code title="dom-textarea/input-selectionDirection">selectionDirection</code>, and
    <code title="dom-input-value">value</code> IDL attributes;
-   <code title="dom-textarea/input-select">select()</code> and
-   <code title="dom-textarea/input-setSelectionRange">setSelectionRange()</code> methods.</p>
+   <code title="dom-textarea/input-select">select()</code>,
+   <code title="dom-textarea/input-setRangeText">setRangeText()</code>, and
+   <code title="dom-textarea/input-setSelectionRange">setSelectionRange()</code>
+   methods.</p>
 
    <p>The <code title="dom-input-value">value</code> IDL attribute is
    in mode <span title="dom-input-value-value">value</span>.</p>
@@ -54399,6 +54443,7 @@
    <code class="no-backref" title="dom-input-valueAsDate">valueAsDate</code>, and
    <code class="no-backref" title="dom-input-valueAsNumber">valueAsNumber</code> IDL attributes;
    <code class="no-backref" title="dom-textarea/input-select">select()</code>,
+   <code class="no-backref" title="dom-textarea/input-setRangeText">setRangeText()</code>,
    <code class="no-backref" title="dom-textarea/input-setSelectionRange">setSelectionRange()</code>,
    <code class="no-backref" title="dom-input-stepDown">stepDown()</code> and
    <code class="no-backref" title="dom-input-stepUp">stepUp()</code> methods.</p>
@@ -54459,7 +54504,8 @@
    <code title="dom-textarea/input-selectionEnd">selectionEnd</code>,
    <code title="dom-textarea/input-selectionDirection">selectionDirection</code>, and
    <code title="dom-input-value">value</code> IDL attributes;
-   <code title="dom-textarea/input-select">select()</code>, and
+   <code title="dom-textarea/input-select">select()</code>,
+   <code title="dom-textarea/input-setRangeText">setRangeText()</code>, and
    <code title="dom-textarea/input-setSelectionRange">setSelectionRange()</code> methods.</p>
 
    <p>The <code title="dom-input-value">value</code> IDL attribute is
@@ -54714,7 +54760,8 @@
    <code class="no-backref" title="dom-textarea/input-selectionStart">selectionStart</code>,
    <code class="no-backref" title="dom-textarea/input-selectionEnd">selectionEnd</code>, and
    <code class="no-backref" title="dom-textarea/input-selectionDirection">selectionDirection</code> IDL attributes;
-   <code class="no-backref" title="dom-textarea/input-select">select()</code> and
+   <code class="no-backref" title="dom-textarea/input-select">select()</code>,
+   <code class="no-backref" title="dom-textarea/input-setRangeText">setRangeText()</code>, and
    <code class="no-backref" title="dom-textarea/input-setSelectionRange">setSelectionRange()</code> methods.</p>
 
   </div>
@@ -54917,7 +54964,8 @@
    <code class="no-backref" title="dom-textarea/input-selectionStart">selectionStart</code>,
    <code class="no-backref" title="dom-textarea/input-selectionEnd">selectionEnd</code>, and
    <code class="no-backref" title="dom-textarea/input-selectionDirection">selectionDirection</code> IDL attributes;
-   <code class="no-backref" title="dom-textarea/input-select">select()</code> and
+   <code class="no-backref" title="dom-textarea/input-select">select()</code>,
+   <code class="no-backref" title="dom-textarea/input-setRangeText">setRangeText()</code>, and
    <code class="no-backref" title="dom-textarea/input-setSelectionRange">setSelectionRange()</code> methods.</p>
 
   </div>
@@ -55095,7 +55143,8 @@
    <code class="no-backref" title="dom-textarea/input-selectionStart">selectionStart</code>,
    <code class="no-backref" title="dom-textarea/input-selectionEnd">selectionEnd</code>, and
    <code class="no-backref" title="dom-textarea/input-selectionDirection">selectionDirection</code> IDL attributes;
-   <code class="no-backref" title="dom-textarea/input-select">select()</code> and
+   <code class="no-backref" title="dom-textarea/input-select">select()</code>,
+   <code class="no-backref" title="dom-textarea/input-setRangeText">setRangeText()</code>, and
    <code class="no-backref" title="dom-textarea/input-setSelectionRange">setSelectionRange()</code> methods.</p>
 
   </div>
@@ -55275,7 +55324,8 @@
    <code class="no-backref" title="dom-textarea/input-selectionStart">selectionStart</code>,
    <code class="no-backref" title="dom-textarea/input-selectionEnd">selectionEnd</code>, and
    <code class="no-backref" title="dom-textarea/input-selectionDirection">selectionDirection</code> IDL attributes;
-   <code class="no-backref" title="dom-textarea/input-select">select()</code> and
+   <code class="no-backref" title="dom-textarea/input-select">select()</code>,
+   <code class="no-backref" title="dom-textarea/input-setRangeText">setRangeText()</code>, and
    <code class="no-backref" title="dom-textarea/input-setSelectionRange">setSelectionRange()</code> methods.</p>
 
   </div>
@@ -55452,7 +55502,8 @@
    <code class="no-backref" title="dom-textarea/input-selectionStart">selectionStart</code>,
    <code class="no-backref" title="dom-textarea/input-selectionEnd">selectionEnd</code>, and
    <code class="no-backref" title="dom-textarea/input-selectionDirection">selectionDirection</code> IDL attributes;
-   <code class="no-backref" title="dom-textarea/input-select">select()</code> and
+   <code class="no-backref" title="dom-textarea/input-select">select()</code>,
+   <code class="no-backref" title="dom-textarea/input-setRangeText">setRangeText()</code>, and
    <code class="no-backref" title="dom-textarea/input-setSelectionRange">setSelectionRange()</code> methods.</p>
 
   </div>
@@ -55620,7 +55671,8 @@
    <code class="no-backref" title="dom-textarea/input-selectionEnd">selectionEnd</code>,
    <code class="no-backref" title="dom-textarea/input-selectionDirection">selectionDirection</code>, and
    <code class="no-backref" title="dom-input-valueAsDate">valueAsDate</code> IDL attributes;
-   <code class="no-backref" title="dom-textarea/input-select">select()</code> and
+   <code class="no-backref" title="dom-textarea/input-select">select()</code>,
+   <code class="no-backref" title="dom-textarea/input-setRangeText">setRangeText()</code>, and
    <code class="no-backref" title="dom-textarea/input-setSelectionRange">setSelectionRange()</code> methods.</p>
 
   </div>
@@ -55803,7 +55855,8 @@
    <code class="no-backref" title="dom-textarea/input-selectionEnd">selectionEnd</code>,
    <code class="no-backref" title="dom-textarea/input-selectionDirection">selectionDirection</code>, and
    <code class="no-backref" title="dom-input-valueAsDate">valueAsDate</code> IDL attributes;
-   <code class="no-backref" title="dom-textarea/input-select">select()</code> and
+   <code class="no-backref" title="dom-textarea/input-select">select()</code>,
+   <code class="no-backref" title="dom-textarea/input-setRangeText">setRangeText()</code>, and
    <code class="no-backref" title="dom-textarea/input-setSelectionRange">setSelectionRange()</code> methods.</p>
 
   </div>
@@ -55997,7 +56050,8 @@
    <code class="no-backref" title="dom-textarea/input-selectionEnd">selectionEnd</code>,
    <code class="no-backref" title="dom-textarea/input-selectionDirection">selectionDirection</code>, and
    <code class="no-backref" title="dom-input-valueAsDate">valueAsDate</code> IDL attributes;
-   <code class="no-backref" title="dom-textarea/input-select">select()</code> and
+   <code class="no-backref" title="dom-textarea/input-select">select()</code>,
+   <code class="no-backref" title="dom-textarea/input-setRangeText">setRangeText()</code>, and
    <code class="no-backref" title="dom-textarea/input-setSelectionRange">setSelectionRange()</code> methods.</p>
 
   </div>
@@ -56166,6 +56220,7 @@
    <code class="no-backref" title="dom-input-valueAsDate">valueAsDate</code>, and
    <code class="no-backref" title="dom-input-valueAsNumber">valueAsNumber</code> IDL attributes;
    <code class="no-backref" title="dom-textarea/input-select">select()</code>,
+   <code class="no-backref" title="dom-textarea/input-setRangeText">setRangeText()</code>,
    <code class="no-backref" title="dom-textarea/input-setSelectionRange">setSelectionRange()</code>,
    <code class="no-backref" title="dom-input-stepDown">stepDown()</code>, and
    <code class="no-backref" title="dom-input-stepUp">stepUp()</code> methods.</p>
@@ -56296,6 +56351,7 @@
    <code class="no-backref" title="dom-input-valueAsDate">valueAsDate</code>, and
    <code class="no-backref" title="dom-input-valueAsNumber">valueAsNumber</code> IDL attributes;
    <code class="no-backref" title="dom-textarea/input-select">select()</code>,
+   <code class="no-backref" title="dom-textarea/input-setRangeText">setRangeText()</code>,
    <code class="no-backref" title="dom-textarea/input-setSelectionRange">setSelectionRange()</code>,
    <code class="no-backref" title="dom-input-stepDown">stepDown()</code>, and
    <code class="no-backref" title="dom-input-stepUp">stepUp()</code> methods.</p>
@@ -56456,6 +56512,7 @@
    <code class="no-backref" title="dom-input-valueAsDate">valueAsDate</code>, and
    <code class="no-backref" title="dom-input-valueAsNumber">valueAsNumber</code> IDL attributes;
    <code class="no-backref" title="dom-textarea/input-select">select()</code>,
+   <code class="no-backref" title="dom-textarea/input-setRangeText">setRangeText()</code>,
    <code class="no-backref" title="dom-textarea/input-setSelectionRange">setSelectionRange()</code>,
    <code class="no-backref" title="dom-input-stepDown">stepDown()</code>, and
    <code class="no-backref" title="dom-input-stepUp">stepUp()</code> methods.</p>
@@ -56711,6 +56768,7 @@
    <code class="no-backref" title="dom-input-valueAsDate">valueAsDate</code>, and
    <code class="no-backref" title="dom-input-valueAsNumber">valueAsNumber</code> IDL attributes;
    <code class="no-backref" title="dom-textarea/input-select">select()</code>,
+   <code class="no-backref" title="dom-textarea/input-setRangeText">setRangeText()</code>,
    <code class="no-backref" title="dom-textarea/input-setSelectionRange">setSelectionRange()</code>,
    <code class="no-backref" title="dom-input-stepDown">stepDown()</code>, and
    <code class="no-backref" title="dom-input-stepUp">stepUp()</code> methods.</p>
@@ -56816,6 +56874,7 @@
    <code class="no-backref" title="dom-input-valueAsDate">valueAsDate</code>, and
    <code class="no-backref" title="dom-input-valueAsNumber">valueAsNumber</code> IDL attributes;
    <code class="no-backref" title="dom-textarea/input-select">select()</code>,
+   <code class="no-backref" title="dom-textarea/input-setRangeText">setRangeText()</code>,
    <code class="no-backref" title="dom-textarea/input-setSelectionRange">setSelectionRange()</code>,
    <code class="no-backref" title="dom-input-stepDown">stepDown()</code>, and
    <code class="no-backref" title="dom-input-stepUp">stepUp()</code> methods.</p>
@@ -57125,6 +57184,7 @@
    <code class="no-backref" title="dom-input-valueAsDate">valueAsDate</code>, and
    <code class="no-backref" title="dom-input-valueAsNumber">valueAsNumber</code> IDL attributes;
    <code class="no-backref" title="dom-textarea/input-select">select()</code>,
+   <code class="no-backref" title="dom-textarea/input-setRangeText">setRangeText()</code>,
    <code class="no-backref" title="dom-textarea/input-setSelectionRange">setSelectionRange()</code>,
    <code class="no-backref" title="dom-input-stepDown">stepDown()</code>, and
    <code class="no-backref" title="dom-input-stepUp">stepUp()</code> methods.</p>
@@ -57236,6 +57296,7 @@
    <code class="no-backref" title="dom-input-valueAsDate">valueAsDate</code>, and
    <code class="no-backref" title="dom-input-valueAsNumber">valueAsNumber</code> IDL attributes;
    <code class="no-backref" title="dom-textarea/input-select">select()</code>,
+   <code class="no-backref" title="dom-textarea/input-setRangeText">setRangeText()</code>,
    <code class="no-backref" title="dom-textarea/input-setSelectionRange">setSelectionRange()</code>,
    <code class="no-backref" title="dom-input-stepDown">stepDown()</code>, and
    <code class="no-backref" title="dom-input-stepUp">stepUp()</code> methods.</p>
@@ -57325,6 +57386,7 @@
    <code class="no-backref" title="dom-input-valueAsDate">valueAsDate</code>, and
    <code class="no-backref" title="dom-input-valueAsNumber">valueAsNumber</code> IDL attributes;
    <code class="no-backref" title="dom-textarea/input-select">select()</code>,
+   <code class="no-backref" title="dom-textarea/input-setRangeText">setRangeText()</code>,
    <code class="no-backref" title="dom-textarea/input-setSelectionRange">setSelectionRange()</code>,
    <code class="no-backref" title="dom-input-stepDown">stepDown()</code>, and
    <code class="no-backref" title="dom-input-stepUp">stepUp()</code> methods.</p>
@@ -60023,6 +60085,10 @@
            attribute unsigned long <span title="dom-textarea/input-selectionStart">selectionStart</span>;
            attribute unsigned long <span title="dom-textarea/input-selectionEnd">selectionEnd</span>;
            attribute DOMString <span title="dom-textarea/input-selectionDirection">selectionDirection</span>;
+<!--END w3c-html-->
+  void <span title="dom-textarea/input-setRangeText">setRangeText</span>(DOMString replacement);
+  void <span title="dom-textarea/input-setRangeText">setRangeText</span>(DOMString replacement, unsigned long start, unsigned long end, optional <span>SelectionMode</span> selectionMode);
+<!--START w3c-html-->
   void <span title="dom-textarea/input-setSelectionRange">setSelectionRange</span>(unsigned long start, unsigned long end, optional DOMString direction);
 };</pre>
    </dd>
@@ -60420,7 +60486,11 @@
   title="dom-textarea/input-select">select()</code>, <code
   title="dom-textarea/input-selectionStart">selectionStart</code>,
   <code title="dom-textarea/input-selectionEnd">selectionEnd</code>,
-  <code title="dom-textarea/input-selectionDirection">selectionDirection</code>,
+  <code
+  title="dom-textarea/input-selectionDirection">selectionDirection</code>,
+<!--END w3c-html-->
+  <code title="dom-textarea/input-setRangeText">setRangeText()</code>,
+<!--START w3c-html-->
   and <code
   title="dom-textarea/input-setSelectionRange">setSelectionRange()</code>
   methods and attributes expose the element's text selection. The
@@ -62286,9 +62356,26 @@
            attribute unsigned long <span title="dom-textarea/input-selectionStart">selectionStart</span>;
            attribute unsigned long <span title="dom-textarea/input-selectionEnd">selectionEnd</span>;
            attribute DOMString <span title="dom-textarea/input-selectionDirection">selectionDirection</span>;
-  void <span title="dom-textarea/input-setSelectionRange">setSelectionRange</span>(unsigned long start, unsigned long end, optional DOMString direction);</pre>
+<!--END w3c-html-->
+  void <span title="dom-textarea/input-setRangeText">setRangeText</span>(DOMString replacement);
+  void <span title="dom-textarea/input-setRangeText">setRangeText</span>(DOMString replacement, unsigned long start, unsigned long end, optional <span>SelectionMode</span> selectionMode);
+<!--START w3c-html-->
+  void <span title="dom-textarea/input-setSelectionRange">setSelectionRange</span>(unsigned long start, unsigned long end, optional DOMString direction = "preserve");</pre>
   <!-- v2: also add textLength? it seems to be widely used -->
 
+<!--END w3c-html-->
+  <p>The <code
+  title="dom-textarea/input-setRangeText">setRangeText</code> method
+  uses the following enumeration:</p>
+
+  <pre class="idl">enum <dfn>SelectionMode</dfn> {
+  '<span title="dom-SelectionMode-select">select</span>',
+  '<span title="dom-SelectionMode-start">start</span>',
+  '<span title="dom-SelectionMode-end">end</span>',
+  '<span title="dom-SelectionMode-preserve">preserve</span>',
+};</pre>
+<!--START w3c-html-->
+
   <p>These methods and attributes expose and control the selection of
   <code>input</code> and <code>textarea</code> text fields.</p>
 
@@ -62342,6 +62429,46 @@
 
    </dd>
 
+<!--END w3c-html-->
+   <dt><var title="">element</var> . <code title="dom-textarea/input-setRangeText">setRangeText</code>(<var title="">replacement</var> [, <var title="">start</var>, <var title="">end</var> [, <var title="">selectionMode</var> ] ] )</dt>
+
+   <dd>
+
+    <p>Replaces a range of text with the new text. If the <var
+    title="">start</var> and <var title="">end</var> arguments are not
+    provided, the range is assumed to be the selection.</p>
+
+    <p>The final argument determines how the selection should be set
+    after the text has been replaced. The possible values are:</p>
+
+    <dl>
+
+
+     <dt>"<code title="dom-SelectionMode-select">select</code>"</dt>
+
+     <dd>Selects the newly inserted text.</dd>
+
+
+     <dt>"<code title="dom-SelectionMode-start">start</code>"</dt>
+
+     <dd>Moves the selection to just before the inserted text.</dd>
+
+
+     <dt>"<code title="dom-SelectionMode-end">end</code>"</dt>
+
+     <dd>Moves the selection to just after the selected text.</dd>
+
+
+     <dt>"<code title="dom-SelectionMode-preserve">preserve</code>"</dt>
+
+     <dd>Attempts to preserve the selection. This is the default.</dd>
+
+
+    </dl>
+
+   </dd>
+<!--START w3c-html-->
+
   </dl>
 
   <div class="impl">
@@ -62460,7 +62587,7 @@
   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
+  length of the value of 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
@@ -62481,6 +62608,177 @@
   <span>user interaction task source</span> as the task source.</p>
 
 
+<!--END w3c-html-->
+  <p>The <dfn
+  title="dom-textarea/input-setRangeText"><code>setRangeText(<var
+  title="">replacement</var>, <var title="">start</var>, <var
+  title="">end</var>, <var title="">selectMode</var>)</code></dfn>
+  method must run the following steps:</p>
+
+  <ol>
+
+   <li>
+
+    <p>If the method has only one argument, then let <var
+    title="">start</var> and <var title="">end</var> have the values
+    of the <code
+    title="dom-textarea/input-selectionStart">selectionStart</code>
+    attribute and the <code
+    title="dom-textarea/input-selectionEnd">selectionEnd</code>
+    attribute respectively.</p>
+
+    <p>Otherwise, let <var title="">start</var>, <var
+    title="">end</var> have the values of the second and third
+    arguments respectively.</p>
+
+   </li>
+
+   <li><p>If <var title="">start</var> is greater than <var
+   title="">end</var>, then throw an <code>IndexSizeError</code>
+   exception and abort these steps.</p></li>
+
+   <li><p>If either <var title="">start</var> or <var
+   title="">end</var> are greater than the length of the value of the
+   text field, then set them to the length of the value of the text
+   field.</p></li>
+
+   <li><p>Let <var title="">selection start</var> be the current value
+   of the <code
+   title="dom-textarea/input-selectionStart">selectionStart</code>
+   attribute.</p></li>
+
+   <li><p>Let <var title="">selection end</var> be the current value
+   of the <code
+   title="dom-textarea/input-selectionEnd">selectionEnd</code>
+   attribute.</p></li>
+
+   <li><p>If <var title="">start</var> is less than <var
+   title="">end</var>, delete the sequence of characters starting with
+   the character at the <var title="">selection start</var>th position
+   (in logical order) and ending with the character at the <span
+   title="">(<var title="">selection end</var>-1)</span>th
+   position.</p></li>
+
+   <li><p>Insert the value of the first argument into the text of the
+   value of the text field, immediately before the <var
+   title="">start</var>th character.</p></li>
+
+   <li>
+
+    <p>Run the appropriate set of substeps from the following
+    list:</p>
+
+    <dl class="switch">
+
+     <dt>If the fourth argument's value is "<dfn title="dom-SelectionMode-select"><code>select</code></dfn>"</dt>
+
+     <dd>
+
+      <p>Let <var title="">selection start</var> be <var
+      title="">start</var>.</p>
+
+      <p>Let <var title="">selection end</var> be <var
+      title="">end</var>.</p>
+
+     </dd>
+
+     <dt>If the fourth argument's value is "<dfn title="dom-SelectionMode-start"><code>start</code></dfn>"</dt>
+
+     <dd>
+
+      <p>Let <var title="">selection start</var> and <var
+      title="">selection end</var> be <var title="">start</var>.</p>
+
+     </dd>
+
+     <dt>If the fourth argument's value is "<dfn title="dom-SelectionMode-end"><code>end</code></dfn>"</dt>
+
+     <dd>
+
+      <p>Let <var title="">selection start</var> and <var
+      title="">selection end</var> be <var title="">end</var>.</p>
+
+     </dd>
+
+     <dt>If the fourth argument's value is "<dfn title="dom-SelectionMode-preserve"><code>preserve</code></dfn>", or if the argument was omitted</dt>
+
+     <dd>
+
+      <ol>
+
+       <li><p>Let <var title="">old length</var> be <var
+       title="">end</var> minus <var title="">start</var>.</p>
+
+       <li><p>Let <var title="">new length</var> be the length of the
+       value of the first argument (the newly inserted text).</p>
+
+       <li><p>Let <var title="">delta</var> be <var title="">new
+       length</var> minus <var title="">old length</var>.</p>
+
+       <li>
+
+        <p>If <var title="">selection start</var> is greater than <var
+        title="">end</var>, then increment it by <var
+        title="">delta</var>. (If <var title="">delta</var> is
+        negative, i.e. the new text is shorter than the old text, then
+        this will <em>decrease</em> the value of <var
+        title="">selection start</var>.)</p>
+
+        <p>Otherwise: if <var title="">selection start</var> is
+        greater than <var title="">start</var>, then set it to <var
+        title="">start</var>. (This snaps the start of the selection
+        to the start of the new text if it was in the middle of the
+        text that it replaced.)</p>
+
+       </li>
+
+       <li>
+
+        <p>If <var title="">selection end</var> is greater than <var
+        title="">end</var>, then increment it by <var
+        title="">delta</var> in the same way.</p>
+
+        <p>Otherwise: if <var title="">selection end</var> is greater
+        than <var title="">start</var>, then set it to <var
+        title="">end</var>. (This snaps the end of the selection to
+        the end of the new text if it was in the middle of the text
+        that it replaced.)</p>
+
+       </li>
+
+      </ol>
+
+     </dd>
+
+    </dl>
+
+   </li>
+
+   <li>
+
+    <p>Set the selection of the text field to the sequence of
+    characters starting with the character at the <var
+    title="">selection start</var>th position (in logical order) and
+    ending with the character at the <span title="">(<var
+    title="">selection end</var>-1)</span>th position. 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>. The direction of the selection must be set to
+    <i>forward</i> if the platform does not support selections with
+    the direction <i>none</i>, and <i>none</i> otherwise.</p>
+
+   </li>
+
+   <li><p><span>Queue a task</span> to <span>fire a simple
+   event</span> that bubbles named <code
+   title="event-select">select</code> at the element, using the
+   <span>user interaction task source</span> as the task
+   source.</p></li>
+
+  </ol>
+<!--START w3c-html-->
+
+
   <p>All elements to which this API applies have either a selection or
   a text entry cursor position at all times (even for elements that
   are not <span>being rendered</span>). User agents should follow




More information about the Commit-Watchers mailing list