hixie: input.files support (whatwg r3544)

hixie: input.files support (whatwg r3544)

http://dev.w3.org/cvsweb/html5/spec/Overview.html?r1=1.2738&r2=1.2739&f=h
http://html5.org/tools/web-apps-tracker?from=3543&to=3544

===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.2738
retrieving revision 1.2739
diff -u -d -r1.2738 -r1.2739
--- Overview.html 5 Aug 2009 23:40:32 -0000 1.2738
+++ Overview.html 5 Aug 2009 23:56:08 -0000 1.2739
@@ -26107,6 +26107,7 @@
            attribute boolean <a href="#dom-input-checked" title="dom-input-checked">checked</a>;
            attribute boolean <a href="#dom-fe-disabled" title="dom-fe-disabled">disabled</a>;
   readonly attribute <a href="#htmlformelement">HTMLFormElement</a> <a href="#dom-fae-form" title="dom-fae-form">form</a>;
+           attribute <span>FileList</span> <a href="#dom-input-files" title="dom-input-files">files</a>;
            attribute DOMString <a href="#dom-fs-formaction" title="dom-fs-formAction">formAction</a>;
            attribute DOMString <a href="#dom-fs-formenctype" title="dom-fs-formEnctype">formEnctype</a>;
            attribute DOMString <a href="#dom-fs-formmethod" title="dom-fs-formMethod">formMethod</a>;
@@ -26255,7 +26256,7 @@
      <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-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="att-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-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> attributes 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. Similarly, the <code title="dom-input-checked"><a href="#dom-input-checked">checked</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> DOM
+  <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. Similarly, 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> DOM
   attributes, and 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, are
   specific to certain states. The following table <span class="impl">is non-normative and</span> summarises which content
@@ -26860,6 +26861,30 @@
      <td class="no"> &middot; <!-- Reset Button -->
 <!-- <td class="no"> &middot;      Button -->
 
+    <tr><th> <code title="dom-input-files"><a href="#dom-input-files">files</a></code>
+     <td class="no"> &middot; <!-- Hidden -->
+     <td class="no"> &middot; <!-- Text -->
+<!-- <td class="no"> &middot;      Search -->
+<!-- <td class="no"> &middot;      URL -->
+     <td class="no"> &middot; <!-- E-mail -->
+     <td class="no"> &middot; <!-- Password -->
+     <td class="no"> &middot; <!-- Date and Time -->
+<!-- <td class="no"> &middot;      Date -->
+<!-- <td class="no"> &middot;      Month -->
+<!-- <td class="no"> &middot;      Week -->
+<!-- <td class="no"> &middot;      Time -->
+     <td class="no"> &middot; <!-- Local Date and Time -->
+<!-- <td class="no"> &middot;      Number -->
+     <td class="no"> &middot; <!-- Range -->
+     <td class="no"> &middot; <!-- Color -->
+     <td class="no"> &middot; <!-- Checkbox -->
+<!-- <td class="no"> &middot;      Radio Button -->
+     <td class="yes"> Yes     <!-- File Upload -->
+     <td class="no"> &middot; <!-- Submit Button -->
+     <td class="no"> &middot; <!-- Image Button -->
+     <td class="no"> &middot; <!-- Reset Button -->
+<!-- <td class="no"> &middot;      Button -->
+
     <tr class="impl"><th> <code title="dom-input-value"><a href="#dom-input-value">value</a></code>
      <td class="yes"> <a href="#dom-input-value-value" title="dom-input-value-value">value</a> <!-- Hidden -->
      <td class="yes"> <a href="#dom-input-value-value" title="dom-input-value-value">value</a> <!-- Text -->
@@ -27170,7 +27195,7 @@
      <td class="no"> &middot; <!-- Submit Button -->
      <td class="no"> &middot; <!-- Image Button -->
      <td class="no"> &middot; <!-- Reset Button -->
-<!-- <td class="no"> &middot; Button -->
+<!-- <td class="no"> &middot;      Button -->
 
   </table><div class="impl">
 
@@ -27349,6 +27374,7 @@
    <p>The following DOM 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-input-files"><a href="#dom-input-files">files</a></code>,
    <code class="no-backref" title="dom-input-list"><a href="#dom-input-list">list</a></code>,
    <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>,
@@ -27430,6 +27456,7 @@
    <p>The following DOM 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-input-files"><a href="#dom-input-files">files</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> DOM attributes;
    <code class="no-backref" title="dom-input-stepDown"><a href="#dom-input-stepdown">stepDown()</a></code> and
@@ -27507,6 +27534,7 @@
    <p>The following DOM 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-input-files"><a href="#dom-input-files">files</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> DOM attributes;
    <code class="no-backref" title="dom-input-stepDown"><a href="#dom-input-stepdown">stepDown()</a></code> and
@@ -27590,6 +27618,7 @@
    <p>The following DOM 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-input-files"><a href="#dom-input-files">files</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> DOM attributes;
    <code class="no-backref" title="dom-input-stepDown"><a href="#dom-input-stepdown">stepDown()</a></code> and
@@ -27691,6 +27720,7 @@
    <p>The following DOM 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-input-files"><a href="#dom-input-files">files</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> DOM attributes;
    <code class="no-backref" title="dom-input-stepDown"><a href="#dom-input-stepdown">stepDown()</a></code> and
@@ -27734,6 +27764,9 @@
    <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>
 
+   <p>The <code title="dom-input-value"><a href="#dom-input-value">value</a></code> DOM attribute is
+   in mode <a href="#dom-input-value-value" title="dom-input-value-value">value</a>.</p>
+
    <p>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.</p>
 
    <p>The following content attributes must not be specified and do not
@@ -27758,6 +27791,7 @@
    <p>The following DOM 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-input-files"><a href="#dom-input-files">files</a></code>,
    <code class="no-backref" title="dom-input-list"><a href="#dom-input-list">list</a></code>,
    <code class="no-backref" title="dom-input-selectedOption"><a href="#dom-input-selectedoption">selectedOption</a></code>,
    <code class="no-backref" title="dom-input-valueAsDate"><a href="#dom-input-valueasdate">valueAsDate</a></code>, and
@@ -27893,6 +27927,7 @@
    <p>The following DOM 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-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> DOM attributes;
    <code class="no-backref" title="dom-textarea/input-select"><a href="#dom-textarea-input-select">select()</a></code> and
@@ -28145,6 +28180,7 @@
    <p>The following DOM 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-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> DOM attributes;
    <code class="no-backref" title="dom-textarea/input-select"><a href="#dom-textarea-input-select">select()</a></code> and
@@ -28271,6 +28307,7 @@
    <p>The following DOM 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-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> DOM attributes;
    <code class="no-backref" title="dom-textarea/input-select"><a href="#dom-textarea-input-select">select()</a></code> and
@@ -28391,6 +28428,7 @@
    <p>The following DOM 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-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> DOM attributes;
    <code class="no-backref" title="dom-textarea/input-select"><a href="#dom-textarea-input-select">select()</a></code> and
@@ -28503,6 +28541,7 @@
    <p>The following DOM 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-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-input-valueAsDate"><a href="#dom-input-valueasdate">valueAsDate</a></code> DOM attributes;
@@ -28610,6 +28649,7 @@
    <p>The following DOM 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-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-input-valueAsDate"><a href="#dom-input-valueasdate">valueAsDate</a></code> DOM attributes;
@@ -28744,6 +28784,7 @@
    <p>The following DOM 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-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-input-valueAsDate"><a href="#dom-input-valueasdate">valueAsDate</a></code> DOM attributes;
@@ -28826,6 +28867,7 @@
    <p>The following DOM 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-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-input-valueAsDate"><a href="#dom-input-valueasdate">valueAsDate</a></code>, and
@@ -28918,6 +28960,7 @@
 
    <p>The following DOM attributes and methods do not apply to the
    element:
+   <code class="no-backref" title="dom-input-files"><a href="#dom-input-files">files</a></code>,
    <code class="no-backref" title="dom-input-list"><a href="#dom-input-list">list</a></code>,
    <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>,
@@ -29035,6 +29078,7 @@
 
    <p>The following DOM attributes and methods do not apply to the
    element:
+   <code class="no-backref" title="dom-input-files"><a href="#dom-input-files">files</a></code>,
    <code class="no-backref" title="dom-input-list"><a href="#dom-input-list">list</a></code>,
    <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>,
@@ -29110,9 +29154,14 @@
 
    <p>The following common <code><a href="#the-input-element">input</a></code> element content
    attributes apply to the element:
+
+   <p>The following common <code><a href="#the-input-element">input</a></code> element content
+   attributes and DOM attributes apply to the element:
    <code title="attr-input-accept"><a href="#attr-input-accept">accept</a></code>,
    <code title="attr-input-multiple"><a href="#attr-input-multiple">multiple</a></code>, and
-   <code title="attr-input-required"><a href="#attr-input-required">required</a></code>.</p>
+   <code title="attr-input-required"><a href="#attr-input-required">required</a></code>;
+   <code title="dom-input-files"><a href="#dom-input-files">files</a></code> and
+   <code title="dom-input-value"><a href="#dom-input-value">value</a></code> DOM attributes.</p>
 
    <p>The <code title="dom-input-value"><a href="#dom-input-value">value</a></code> DOM attribute is
    in mode <a href="#dom-input-value-filename" title="dom-input-value-filename">filename</a>.</p>
@@ -29223,6 +29272,7 @@
    <p>The following DOM 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-input-files"><a href="#dom-input-files">files</a></code>,
    <code class="no-backref" title="dom-input-list"><a href="#dom-input-list">list</a></code>,
    <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>,
@@ -29396,6 +29446,7 @@
    <p>The following DOM 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-input-files"><a href="#dom-input-files">files</a></code>,
    <code class="no-backref" title="dom-input-list"><a href="#dom-input-list">list</a></code>,
    <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>,
@@ -29468,6 +29519,7 @@
    <p>The following DOM 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-input-files"><a href="#dom-input-files">files</a></code>,
    <code class="no-backref" title="dom-input-list"><a href="#dom-input-list">list</a></code>,
    <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>,
@@ -29533,6 +29585,7 @@
    <p>The following DOM 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-input-files"><a href="#dom-input-files">files</a></code>,
    <code class="no-backref" title="dom-input-list"><a href="#dom-input-list">list</a></code>,
    <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>,
@@ -30015,6 +30068,13 @@
   set the element's <a href="#concept-input-checked-dirty-flag" title="concept-input-checked-dirty-flag">dirty checkedness
   flag</a> to true.</p>
 
+  <hr><p>The <dfn id="dom-input-files" title="dom-input-files"><code>files</code></dfn> DOM
+  attribute allows scripts to access the element's <a href="#concept-input-type-file-selected" title="concept-input-type-file-selected">selected files</a>. On
+  getting, if the DOM attribute applies, it must return a new
+  <code>FileList</code> object that represents the current <a href="#concept-input-type-file-selected" title="concept-input-type-file-selected">selected files</a>. If
+  the DOM attribute does not apply, then it must instead throw an
+  <code><a href="#invalid_state_err">INVALID_STATE_ERR</a></code> exception. <a href="#references">[FILEAPI]</a></p>
+
   <hr><p>The <dfn id="dom-input-valueasdate" title="dom-input-valueAsDate"><code>valueAsDate</code></dfn> DOM
   attribute represents the <a href="#concept-fe-value" title="concept-fe-value">value</a> of the element, interpreted
   as a date.</p>

Received on Wednesday, 5 August 2009 23:57:10 UTC