html5/spec Overview.html,1.4865,1.4866

Update of /sources/public/html5/spec
In directory hutz:/tmp/cvs-serv13841

Modified Files:
	Overview.html 
Log Message:
Add input.selectionDirection and textarea.selectionDirection, to allow authors to save the direction of the selection. (whatwg r6060)

Index: Overview.html
===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.4865
retrieving revision 1.4866
diff -u -d -r1.4865 -r1.4866
--- Overview.html	3 May 2011 22:09:24 -0000	1.4865
+++ Overview.html	3 May 2011 23:49:55 -0000	1.4866
@@ -31047,7 +31047,8 @@
   void <a href="#dom-textarea-input-select" title="dom-textarea/input-select">select</a>();
            attribute unsigned long <a href="#dom-textarea-input-selectionstart" title="dom-textarea/input-selectionStart">selectionStart</a>;
            attribute unsigned long <a href="#dom-textarea-input-selectionend" title="dom-textarea/input-selectionEnd">selectionEnd</a>;
-  void <a href="#dom-textarea-input-setselectionrange" title="dom-textarea/input-setSelectionRange">setSelectionRange</a>(in unsigned long start, in unsigned long end);
+           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>(in unsigned long start, in unsigned long end, in optional DOMString direction);
 };</pre>
    </dd>
   </dl><p>The <code><a href="#the-input-element">input</a></code> element <a href="#represents">represents</a> a typed data field,
@@ -31153,8 +31154,9 @@
      <td> n/a
      <td> A button
   </table><p>The <i>missing value default</i> is the <a href="#text-state-and-search-state" title="attr-input-type-text">Text</a> state.<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 tite="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 title="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></cod>, 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">checked</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>, <code title="dom-input-list"><a href="#dom-input-list">list</a></code>, and <code title="dom-input-selectedOption"><a href="#dom-input-selectedoption">selectedOption</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> and
-  <code title="dom-textarea/input-selectionEnd"><a href="#dom-textarea-input-selectionend">selectionEnd</a></code>
+  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
   <code title="dom-input-stepDown"><a href="#dom-input-stepdown">stepDown()</a></code> methods, and the
@@ -31735,6 +31737,22 @@
      <td class="no"> &middot; 
      <td class="no"> &middot; 
 
+    <tr><th> <code title="dom-textarea/input-selectionDirection"><a href="#dom-textarea-input-selectiondirection">selectionDirection</a></code>
+     <td class="no"> &middot; 
+     <td class="yes"> Yes     
+     <td class="yes"> Yes     
+     <td class="no"> &middot; 
+     <td class="yes"> Yes     
+     <td class="no"> &middot; 
+     <td class="no"> &middot; 
+     <td class="no"> &middot; 
+     <td class="no"> &middot; 
+     <td class="no"> &middot; 
+     <td class="no"> &middot; 
+     <td class="no"> &middot; 
+     <td class="no"> &middot; 
+     <td class="no"> &middot; 
+
     <tr><th> <code title="dom-textarea/input-setSelectionRange"><a href="#dom-textarea-input-setselectionrange">setSelectionRange()</a></code>
      <td class="no"> &middot; 
      <td class="yes"> Yes     
@@ -31976,6 +31994,7 @@
   <code title="dom-lfe-labels"><a href="#dom-lfe-labels">labels</a></code> attribute provides a list
   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>,
   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
@@ -32040,6 +32059,7 @@
    <code class="no-backref" title="dom-input-selectedOption"><a href="#dom-input-selectedoption">selectedOption</a></code>,
    <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>,
+   <code class="no-backref" title="dom-textarea/input-selectionDirection"><a href="#dom-textarea-input-selectiondirection">selectionDirection</a></code>,
    <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>,
@@ -32107,7 +32127,8 @@
    <code title="dom-input-list"><a href="#dom-input-list">list</a></code>,
    <code title="dom-input-selectedOption"><a href="#dom-input-selectedoption">selectedOption</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>, and
+   <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>
@@ -32187,7 +32208,8 @@
    <code title="dom-input-list"><a href="#dom-input-list">list</a></code>,
    <code title="dom-input-selectedOption"><a href="#dom-input-selectedoption">selectedOption</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>, and
+   <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>
@@ -32275,7 +32297,8 @@
    <code title="dom-input-list"><a href="#dom-input-list">list</a></code>,
    <code title="dom-input-selectedOption"><a href="#dom-input-selectedoption">selectedOption</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>, and
+   <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>
@@ -32552,6 +32575,7 @@
    <code class="no-backref" title="dom-input-files"><a href="#dom-input-files">files</a></code>,
    <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>,
+   <code class="no-backref" title="dom-textarea/input-selectionDirection"><a href="#dom-textarea-input-selectiondirection">selectionDirection</a></code>,
    <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>,
@@ -32592,7 +32616,8 @@
    <code title="attr-input-required"><a href="#attr-input-required">required</a></code>, and
    <code title="attr-input-size"><a href="#attr-input-size">size</a></code> content attributes;
    <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-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>
@@ -32766,8 +32791,9 @@
    element:
    <code class="no-backref" title="dom-input-checked"><a href="#dom-input-checked">checked</a></code>,
    <code class="no-backref" title="dom-input-files"><a href="#dom-input-files">files</a></code>,
-   <code class="no-backref" title="dom-textarea/input-selectionStart"><a href="#dom-textarea-input-selectionstart">selectionStart</a></code>, and
-   <code class="no-backref" title="dom-textarea/input-selectionEnd"><a href="#dom-textarea-input-selectionend">selectionEnd</a></code> IDL attributes;
+   <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-setSelectionRange"><a href="#dom-textarea-input-setselectionrange">setSelectionRange()</a></code> methods.</p>
 
@@ -32913,8 +32939,9 @@
    <p>The following IDL attributes and methods do not apply to the
    element:
    <code class="no-backref" title="dom-input-checked"><a href="#dom-input-checked">checked</a></code>,
-   <code class="no-backref" title="dom-textarea/input-selectionStart"><a href="#dom-textarea-input-selectionstart">selectionStart</a></code>, and
-   <code class="no-backref" title="dom-textarea/input-selectionEnd"><a href="#dom-textarea-input-selectionend">selectionEnd</a></code> IDL attributes;
+   <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-setSelectionRange"><a href="#dom-textarea-input-setselectionrange">setSelectionRange()</a></code> methods.</p>
 
@@ -33039,8 +33066,9 @@
    element:
    <code class="no-backref" title="dom-input-checked"><a href="#dom-input-checked">checked</a></code>,
    <code class="no-backref" title="dom-input-files"><a href="#dom-input-files">files</a></code>,
-   <code class="no-backref" title="dom-textarea/input-selectionStart"><a href="#dom-textarea-input-selectionstart">selectionStart</a></code>, and
-   <code class="no-backref" title="dom-textarea/input-selectionEnd"><a href="#dom-textarea-input-selectionend">selectionEnd</a></code> IDL attributes;
+   <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-setSelectionRange"><a href="#dom-textarea-input-setselectionrange">setSelectionRange()</a></code> methods.</p>
 
@@ -33169,8 +33197,9 @@
    element:
    <code class="no-backref" title="dom-input-checked"><a href="#dom-input-checked">checked</a></code>,
    <code class="no-backref" title="dom-input-files"><a href="#dom-input-files">files</a></code>,
-   <code class="no-backref" title="dom-textarea/input-selectionStart"><a href="#dom-textarea-input-selectionstart">selectionStart</a></code>, and
-   <code class="no-backref" title="dom-textarea/input-selectionEnd"><a href="#dom-textarea-input-selectionend">selectionEnd</a></code> IDL attributes;
+   <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-setSelectionRange"><a href="#dom-textarea-input-setselectionrange">setSelectionRange()</a></code> methods.</p>
 
@@ -33292,8 +33321,9 @@
    element:
    <code class="no-backref" title="dom-input-checked"><a href="#dom-input-checked">checked</a></code>,
    <code class="no-backref" title="dom-input-files"><a href="#dom-input-files">files</a></code>,
-   <code class="no-backref" title="dom-textarea/input-selectionStart"><a href="#dom-textarea-input-selectionstart">selectionStart</a></code>, and
-   <code class="no-backref" title="dom-textarea/input-selectionEnd"><a href="#dom-textarea-input-selectionend">selectionEnd</a></code> IDL attributes;
+   <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-setSelectionRange"><a href="#dom-textarea-input-setselectionrange">setSelectionRange()</a></code> methods.</p>
 
@@ -33409,7 +33439,8 @@
    <code class="no-backref" title="dom-input-checked"><a href="#dom-input-checked">checked</a></code>,
    <code class="no-backref" title="dom-input-files"><a href="#dom-input-files">files</a></code>,
    <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-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-setSelectionRange"><a href="#dom-textarea-input-setselectionrange">setSelectionRange()</a></code> methods.</p>
@@ -33548,7 +33579,8 @@
    <code class="no-backref" title="dom-input-checked"><a href="#dom-input-checked">checked</a></code>,
    <code class="no-backref" title="dom-input-files"><a href="#dom-input-files">files</a></code>,
    <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-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-setSelectionRange"><a href="#dom-textarea-input-setselectionrange">setSelectionRange()</a></code> methods.</p>
@@ -33689,7 +33721,8 @@
    <code class="no-backref" title="dom-input-checked"><a href="#dom-input-checked">checked</a></code>,
    <code class="no-backref" title="dom-input-files"><a href="#dom-input-files">files</a></code>,
    <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-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-setSelectionRange"><a href="#dom-textarea-input-setselectionrange">setSelectionRange()</a></code> methods.</p>
@@ -33829,6 +33862,7 @@
    <code class="no-backref" title="dom-input-files"><a href="#dom-input-files">files</a></code>,
    <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>,
+   <code class="no-backref" title="dom-textarea/input-selectionDirection"><a href="#dom-textarea-input-selectiondirection">selectionDirection</a></code>,
    <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>,
@@ -33922,6 +33956,7 @@
    <code class="no-backref" title="dom-input-selectedOption"><a href="#dom-input-selectedoption">selectedOption</a></code>,
    <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>,
+   <code class="no-backref" title="dom-textarea/input-selectionDirection"><a href="#dom-textarea-input-selectiondirection">selectionDirection</a></code>,
    <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>,
@@ -34037,6 +34072,7 @@
    <code class="no-backref" title="dom-input-selectedOption"><a href="#dom-input-selectedoption">selectedOption</a></code>,
    <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>,
+   <code class="no-backref" title="dom-textarea/input-selectionDirection"><a href="#dom-textarea-input-selectiondirection">selectionDirection</a></code>,
    <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>,
@@ -34197,6 +34233,7 @@
    <code class="no-backref" title="dom-input-selectedOption"><a href="#dom-input-selectedoption">selectedOption</a></code>,
    <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>,
+   <code class="no-backref" title="dom-textarea/input-selectionDirection"><a href="#dom-textarea-input-selectiondirection">selectionDirection</a></code>,
    <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>,
@@ -34273,6 +34310,7 @@
    <code class="no-backref" title="dom-input-selectedOption"><a href="#dom-input-selectedoption">selectedOption</a></code>,
    <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>,
+   <code class="no-backref" title="dom-textarea/input-selectionDirection"><a href="#dom-textarea-input-selectiondirection">selectionDirection</a></code>,
    <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>,
@@ -34463,6 +34501,7 @@
    <code class="no-backref" title="dom-input-selectedOption"><a href="#dom-input-selectedoption">selectedOption</a></code>,
    <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>,
+   <code class="no-backref" title="dom-textarea/input-selectionDirection"><a href="#dom-textarea-input-selectiondirection">selectionDirection</a></code>,
    <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>,
@@ -34537,6 +34576,7 @@
    <code class="no-backref" title="dom-input-selectedOption"><a href="#dom-input-selectedoption">selectedOption</a></code>,
    <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>,
+   <code class="no-backref" title="dom-textarea/input-selectionDirection"><a href="#dom-textarea-input-selectiondirection">selectionDirection</a></code>,
    <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>,
@@ -34606,6 +34646,7 @@
    <code class="no-backref" title="dom-input-selectedOption"><a href="#dom-input-selectedoption">selectedOption</a></code>,
    <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>,
+   <code class="no-backref" title="dom-textarea/input-selectionDirection"><a href="#dom-textarea-input-selectiondirection">selectionDirection</a></code>,
    <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>,
@@ -36498,7 +36539,8 @@
   void <a href="#dom-textarea-input-select" title="dom-textarea/input-select">select</a>();
            attribute unsigned long <a href="#dom-textarea-input-selectionstart" title="dom-textarea/input-selectionStart">selectionStart</a>;
            attribute unsigned long <a href="#dom-textarea-input-selectionend" title="dom-textarea/input-selectionEnd">selectionEnd</a>;
-  void <a href="#dom-textarea-input-setselectionrange" title="dom-textarea/input-setSelectionRange">setSelectionRange</a>(in unsigned long start, in unsigned long end);
+           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>(in unsigned long start, in unsigned long end, in optional DOMString direction);
 };</pre>
    </dd>
   </dl><p>The <code><a href="#the-textarea-element">textarea</a></code> element <a href="#represents">represents</a> a
@@ -36734,6 +36776,7 @@
   <code title="dom-lfe-labels"><a href="#dom-lfe-labels">labels</a></code> attribute provides a list
   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>,
   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
@@ -38010,7 +38053,8 @@
   selection:<pre class="idl extract">  void <a href="#dom-textarea-input-select" title="dom-textarea/input-select">select</a>();
            attribute unsigned long <a href="#dom-textarea-input-selectionstart" title="dom-textarea/input-selectionStart">selectionStart</a>;
            attribute unsigned long <a href="#dom-textarea-input-selectionend" title="dom-textarea/input-selectionEnd">selectionEnd</a>;
-  void <a href="#dom-textarea-input-setselectionrange" title="dom-textarea/input-setSelectionRange">setSelectionRange</a>(in unsigned long start, in unsigned long end);</pre><p>These methods and attributes expose and control the selection of
+           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>(in unsigned long start, in unsigned long end, in optional DOMString direction);</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.<dl class="domintro"><dt><var title="">element</var> . <code title="dom-textarea/input-select"><a href="#dom-textarea-input-select">select</a></code>()</dt>
 
    <dd>
@@ -38039,11 +38083,23 @@
 
    </dd>
 
-   <dt><var title="">element</var> . <code title="dom-textarea/input-setSelectionRange"><a href="#dom-textarea-input-setselectionrange">setSelectionRange</a></code>(<var title="">start</var>, <var title="">end</var>)</dt>
+   <dt><var title="">element</var> . <code title="dom-textarea/input-selecionDirection">selectionDirection</code> [ = <var title="">value</var> ]</dt>
 
    <dd>
 
-    <p>Changes the selection to cover the given substring.</p>
+    <p>Returns the current direction of the selection.</p>
+
+    <p>Can be set, to change the direction of the selection.</p>
+
+    <p>The possible values are "<code title="">forward</code>", "<code title="">backward</code>", and "<code title="">none</code>".</p>
+
+   </dd>
+
+   <dt><var title="">element</var> . <code title="dom-textarea/input-setSelectionRange"><a href="#dom-textarea-input-setselectionrange">setSelectionRange</a></code>(<var title="">start</var>, <var title="">end</var> [, <var title="">direction</var>] )</dt>
+
+   <dd>
+
+    <p>Changes the selection to cover the given substring in the given direction. If the direction is omitted, it will be reset to be the platform default (none or forward).</p>
 
    </dd>
 
@@ -38059,8 +38115,33 @@
   elements, these methods and attributes must operate on the element's
   <a href="#concept-textarea-raw-value" title="concept-textarea-raw-value">raw value</a>.</p>
 
+  <p>The selections of <code><a href="#the-input-element">input</a></code> and <code><a href="#the-textarea-element">textarea</a></code>
+  elements have a <i>direction</i>, which is either <i>forward</i>,
+  <i>backward</i>, or <i>none</i>. This direction is set when the user
+  manipulates the selection. The exact meaning of the selection
+  direction depends on the platform.</p>
+
+  <p class="note">On Windows, the direction indicates the position of
+  the caret relative to the selection: a <i>forward</i> selection has
+  the caret at the end of the selection and a <i>backward</i>
+  selection has the caret at the start of the selection. Windows has
+  no <i>none</i> direction. On Mac, the direction indicates which end
+  of the selection is affected when the user adjusts the size of the
+  selection using the arrow keys with the Shift modifier: the forward
+  direction means the end of the selection is modified, and the
+  backwards direction means the start of the selection is modified.
+  The none direction is the default on Mac, it indicates that no
+  particular direction has yet been selected. The user sets the
+  direction implicitly when first adjusting the selection, based on
+  which directional arrow key was used.</p>
+
+
   <p>The <dfn id="dom-textarea-input-select" title="dom-textarea/input-select"><code>select()</code></dfn> method
-  must cause the contents of the text field to be fully selected.</p>
+  must cause the contents of the text field to be fully selected, with
+  the selection direction being none, if the platform support
+  selections with the direction <i>none</i>, or otherwise
+  <i>forward</i>.</p>
+
 
   <p>The <dfn id="dom-textarea-input-selectionstart" title="dom-textarea/input-selectionStart"><code>selectionStart</code></dfn>
   attribute must, on getting, return the offset (in logical order) to
@@ -38070,12 +38151,14 @@
   text entry cursor.</p>
 
   <p>On setting, it must act as if the <code title="dom-textarea/input-setSelectionRange"><a href="#dom-textarea-input-setselectionrange">setSelectionRange()</a></code>
-  method had been called, with the new value as the first argument,
-  and the current value of the <code title="dom-textarea/input-selectionEnd"><a href="#dom-textarea-input-selectionend">selectionEnd</a></code>
+  method had been called, with the new value as the first argument;
+  the current value of the <code title="dom-textarea/input-selectionEnd"><a href="#dom-textarea-input-selectionend">selectionEnd</a></code>
   attribute as the second argument, unless the current value of the
   <code title="dom-textarea/input-selectionEnd"><a href="#dom-textarea-input-selectionend">selectionEnd</a></code> is
   less than the new value, in which case the second argument must also
-  be the new value.</p>
+  be the new value; and the current value of the <code title="dom-textarea/input-selectionDirection"><a href="#dom-textarea-input-selectiondirection">selectionDirection</a></code>
+  as the third argument.</p>
+
 
   <p>The <dfn id="dom-textarea-input-selectionend" title="dom-textarea/input-selectionEnd"><code>selectionEnd</code></dfn>
   attribute must, on getting, return the offset (in logical order) to
@@ -38086,27 +38169,52 @@
 
   <p>On setting, it must act as if the <code title="dom-textarea/input-setSelectionRange"><a href="#dom-textarea-input-setselectionrange">setSelectionRange()</a></code>
   method had been called, with the current value of the <code title="dom-textarea/input-selectionStart"><a href="#dom-textarea-input-selectionstart">selectionStart</a></code>
-  attribute as the first argument, and new value as the second
+  attribute as the first argument, the new value as the second
+  argument, and the current value of the <code title="dom-textarea/input-selectionDirection"><a href="#dom-textarea-input-selectiondirection">selectionDirection</a></code>
+  as the third argument.</p>
+
+
+  <p>The <dfn id="dom-textarea-input-selectiondirection" title="dom-textarea/input-selectionDirection"><code>selectionDirection</code></dfn>
+  attribute must, on getting, return the string corresponding to the
+  current selection direction: if the direction is <i>forward</i>,
+  "<code title="">forward</code>"; if the direction is
+  <i>backward</i>, "<code title="">backward</code>"; and otherwise,
+  "<code title="">none</code>".</p>
+
+  <p>On setting, it must act as if the <code title="dom-textarea/input-setSelectionRange"><a href="#dom-textarea-input-setselectionrange">setSelectionRange()</a></code>
+  method had been called, with the current value of the <code title="dom-textarea/input-selectionStart"><a href="#dom-textarea-input-selectionstart">selectionStart</a></code>
+  attribute as the first argument, the current value of the <code title="dom-textarea/input-selectionEnd"><a href="#dom-textarea-input-selectionend">selectionEnd</a></code>
+  attribute as the first argument, and the new value as the third
   argument.</p>
 
-  <p>The <dfn id="dom-textarea-input-setselectionrange" title="dom-textarea/input-setSelectionRange"><code>setSelectionRange(<var title="">start</var>, <var title="">end</var>)</code></dfn> method
-  must set the selection of the text field to the sequence of
-  characters starting with the character at the <var title="">start</var>th position (in logical order) and ending with
-  the character at the <span title="">(<var title="">end</var>-1)</span>th position. Arguments greater than the
+
+  <p>The <dfn id="dom-textarea-input-setselectionrange" title="dom-textarea/input-setSelectionRange"><code>setSelectionRange(<var title="">start</var>, <var title="">end</var>, <var title="">direction</var>)</code></dfn> method must set the selection
+  of the text field to the sequence of characters starting with the
+  character at the <var title="">start</var>th position (in logical
+  order) and ending with the character at the <span title="">(<var title="">end</var>-1)</span>th position. Arguments greater than the
   length of the value in the text field must be treated as pointing at
   the end of the text field. If <var title="">end</var> is less than
   or equal to <var title="">start</var> then the start of the
   selection and the end of the selection must both be placed
   immediately before the character with offset <var title="">end</var>. In UAs where there is no concept of an empty
   selection, this must set the cursor to be just before the character
-  with offset <var title="">end</var>.</p>
+  with offset <var title="">end</var>. The direction of the selection
+  must be set to <i>backward</i> if <var title="">direction</var> is a
+  <a href="#case-sensitive">case-sensitive</a> match for the string "<code title="">backward</code>", <i>forward</i> if <var title="">direction</var> is a <a href="#case-sensitive">case-sensitive</a> match for
+  the string "<code title="">forward</code>" or if the platform does
+  not support selections with the direction <i>none</i>, and
+  <i>none</i> otherwise (including if the argument is omitted).</p>
+
 
   <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>
 
-  </div><div class="example">
+  </div><p>Characters with no visible rendering, such as U+200D ZERO WIDTH
+  JOINER, still count as characters. Thus, for instance, the selection
+  can include just an invisible character, and the text insertion
+  cursor can be placed to one side or another of such a character.<div class="example">
 
    <p>To obtain the currently selected text, the following JavaScript
    suffices:</p>
@@ -38116,10 +38224,23 @@
    <p>...where <var title="">control</var> is the <code><a href="#the-input-element">input</a></code>
    or <code><a href="#the-textarea-element">textarea</a></code> element.</p>
 
-  </div><p>Characters with no visible rendering, such as U+200D ZERO WIDTH
-  JOINER, still count as characters. Thus, for instance, the selection
-  can include just an invisible character, and the text insertion
-  cursor can be placed to one side or another of such a character.<h4 id="constraints"><span class="secno">4.10.21 </span>Constraints</h4><h5 id="definitions"><span class="secno">4.10.21.1 </span>Definitions</h5><div class="impl">
+  </div><div class="example">
+
+   <p>To add some text at the start of a text control, while
+   maintaining the text selection, the three attributes must be
+   preserved:</p>
+
+   <pre>var oldStart = control.selectionStart;
+var oldEnd = control.selectionEnd;
+var oldDirection = control.selectionDirection;
+var prefix = "http://";
+control.value = prefix + control.value;
+control.setSelectionRange(oldStart + prefix.length, oldEnd + prefix.length, oldDirection);</pre>
+
+   <p>...where <var title="">control</var> is the <code><a href="#the-input-element">input</a></code>
+   or <code><a href="#the-textarea-element">textarea</a></code> element.</p>
+
+  </div><h4 id="constraints"><span class="secno">4.10.21 </span>Constraints</h4><h5 id="definitions"><span class="secno">4.10.21.1 </span>Definitions</h5><div class="impl">
 
   <p>A <a href="#category-listed" title="category-listed">listed form-associated
   element</a> is a <dfn id="candidate-for-constraint-validation">candidate for constraint validation</dfn>

Received on Tuesday, 3 May 2011 23:50:04 UTC