HTML Standard Tracker

Diff (omit for latest revision)
Filter

Short URL: http://html5.org/r/3544

File a bug

SVNBugCommentTime (UTC)
3544[Gecko] [Internet Explorer] [Opera] [Webkit] input.files support2009-08-05 23:56
Index: source
===================================================================
--- source	(revision 3543)
+++ source	(revision 3544)
@@ -32603,6 +32603,7 @@
            attribute boolean <span title="dom-input-checked">checked</span>;
            attribute boolean <span title="dom-fe-disabled">disabled</span>;
   readonly attribute <span>HTMLFormElement</span> <span title="dom-fae-form">form</span>;
+           attribute <span>FileList</span> <span title="dom-input-files">files</span>;
            attribute DOMString <span title="dom-fs-formAction">formAction</span>;
            attribute DOMString <span title="dom-fs-formEnctype">formEnctype</span>;
            attribute DOMString <span title="dom-fs-formMethod">formMethod</span>;
@@ -32813,6 +32814,7 @@
   <code>input</code> element depends on the state of its <code
   title="attr-input-type">type</code> attribute. Similarly, the <code
   title="dom-input-checked">checked</code>, <code
+  title="dom-input-files">files</code>, <code
   title="dom-input-valueAsDate">valueAsDate</code>, <code
   title="dom-input-valueAsNumber">valueAsNumber</code>, <code
   title="dom-input-list">list</code>, and <code
@@ -33454,6 +33456,31 @@
      <td class="no"> &middot; <!-- Reset Button -->
 <!-- <td class="no"> &middot;      Button -->
 
+    <tr>
+     <th> <code title="dom-input-files">files</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">value</code>
      <td class="yes"> <span title="dom-input-value-value">value</span> <!-- Hidden -->
@@ -33777,7 +33804,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>
 
@@ -34055,6 +34082,7 @@
    <p>The following DOM attributes and methods do not apply to the
    element:
    <code class="no-backref" title="dom-input-checked">checked</code>,
+   <code class="no-backref" title="dom-input-files">files</code>,
    <code class="no-backref" title="dom-input-list">list</code>,
    <code class="no-backref" title="dom-input-selectedOption">selectedOption</code>,
    <code class="no-backref" title="dom-textarea/input-selectionStart">selectionStart</code>,
@@ -34161,6 +34189,7 @@
    <p>The following DOM attributes and methods do not apply to the
    element:
    <code class="no-backref" title="dom-input-checked">checked</code>,
+   <code class="no-backref" title="dom-input-files">files</code>,
    <code class="no-backref" title="dom-input-valueAsDate">valueAsDate</code>, and
    <code class="no-backref" title="dom-input-valueAsNumber">valueAsNumber</code> DOM attributes;
    <code class="no-backref" title="dom-input-stepDown">stepDown()</code> and
@@ -34267,6 +34296,7 @@
    <p>The following DOM attributes and methods do not apply to the
    element:
    <code class="no-backref" title="dom-input-checked">checked</code>,
+   <code class="no-backref" title="dom-input-files">files</code>,
    <code class="no-backref" title="dom-input-valueAsDate">valueAsDate</code>, and
    <code class="no-backref" title="dom-input-valueAsNumber">valueAsNumber</code> DOM attributes;
    <code class="no-backref" title="dom-input-stepDown">stepDown()</code> and
@@ -34374,6 +34404,7 @@
    <p>The following DOM attributes and methods do not apply to the
    element:
    <code class="no-backref" title="dom-input-checked">checked</code>,
+   <code class="no-backref" title="dom-input-files">files</code>,
    <code class="no-backref" title="dom-input-valueAsDate">valueAsDate</code>, and
    <code class="no-backref" title="dom-input-valueAsNumber">valueAsNumber</code> DOM attributes;
    <code class="no-backref" title="dom-input-stepDown">stepDown()</code> and
@@ -34506,6 +34537,7 @@
    <p>The following DOM attributes and methods do not apply to the
    element:
    <code class="no-backref" title="dom-input-checked">checked</code>,
+   <code class="no-backref" title="dom-input-files">files</code>,
    <code class="no-backref" title="dom-input-valueAsDate">valueAsDate</code>, and
    <code class="no-backref" title="dom-input-valueAsNumber">valueAsNumber</code> DOM attributes;
    <code class="no-backref" title="dom-input-stepDown">stepDown()</code> and
@@ -34569,6 +34601,9 @@
    <code title="dom-textarea/input-select">select()</code>, and
    <code title="dom-textarea/input-setSelectionRange">setSelectionRange()</code> methods.</p>
 
+   <p>The <code title="dom-input-value">value</code> DOM attribute is
+   in mode <span title="dom-input-value-value">value</span>.</p>
+
    <p>The <code title="event-input-input">input</code> and <code
    title="event-input-change">change</code> events apply.</p>
 
@@ -34594,6 +34629,7 @@
    <p>The following DOM attributes and methods do not apply to the
    element:
    <code class="no-backref" title="dom-input-checked">checked</code>,
+   <code class="no-backref" title="dom-input-files">files</code>,
    <code class="no-backref" title="dom-input-list">list</code>,
    <code class="no-backref" title="dom-input-selectedOption">selectedOption</code>,
    <code class="no-backref" title="dom-input-valueAsDate">valueAsDate</code>, and
@@ -34774,6 +34810,7 @@
    <p>The following DOM attributes and methods do not apply to the
    element:
    <code class="no-backref" title="dom-input-checked">checked</code>,
+   <code class="no-backref" title="dom-input-files">files</code>,
    <code class="no-backref" title="dom-textarea/input-selectionStart">selectionStart</code>, and
    <code class="no-backref" title="dom-textarea/input-selectionEnd">selectionEnd</code> DOM attributes;
    <code class="no-backref" title="dom-textarea/input-select">select()</code> and
@@ -35107,6 +35144,7 @@
    <p>The following DOM attributes and methods do not apply to the
    element:
    <code class="no-backref" title="dom-input-checked">checked</code>,
+   <code class="no-backref" title="dom-input-files">files</code>,
    <code class="no-backref" title="dom-textarea/input-selectionStart">selectionStart</code>, and
    <code class="no-backref" title="dom-textarea/input-selectionEnd">selectionEnd</code> DOM attributes;
    <code class="no-backref" title="dom-textarea/input-select">select()</code> and
@@ -35274,6 +35312,7 @@
    <p>The following DOM attributes and methods do not apply to the
    element:
    <code class="no-backref" title="dom-input-checked">checked</code>,
+   <code class="no-backref" title="dom-input-files">files</code>,
    <code class="no-backref" title="dom-textarea/input-selectionStart">selectionStart</code>, and
    <code class="no-backref" title="dom-textarea/input-selectionEnd">selectionEnd</code> DOM attributes;
    <code class="no-backref" title="dom-textarea/input-select">select()</code> and
@@ -35436,6 +35475,7 @@
    <p>The following DOM attributes and methods do not apply to the
    element:
    <code class="no-backref" title="dom-input-checked">checked</code>,
+   <code class="no-backref" title="dom-input-files">files</code>,
    <code class="no-backref" title="dom-textarea/input-selectionStart">selectionStart</code>, and
    <code class="no-backref" title="dom-textarea/input-selectionEnd">selectionEnd</code> DOM attributes;
    <code class="no-backref" title="dom-textarea/input-select">select()</code> and
@@ -35586,6 +35626,7 @@
    <p>The following DOM attributes and methods do not apply to the
    element:
    <code class="no-backref" title="dom-input-checked">checked</code>,
+   <code class="no-backref" title="dom-input-files">files</code>,
    <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-input-valueAsDate">valueAsDate</code> DOM attributes;
@@ -35725,6 +35766,7 @@
    <p>The following DOM attributes and methods do not apply to the
    element:
    <code class="no-backref" title="dom-input-checked">checked</code>,
+   <code class="no-backref" title="dom-input-files">files</code>,
    <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-input-valueAsDate">valueAsDate</code> DOM attributes;
@@ -35907,6 +35949,7 @@
    <p>The following DOM attributes and methods do not apply to the
    element:
    <code class="no-backref" title="dom-input-checked">checked</code>,
+   <code class="no-backref" title="dom-input-files">files</code>,
    <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-input-valueAsDate">valueAsDate</code> DOM attributes;
@@ -36010,6 +36053,7 @@
    <p>The following DOM attributes and methods do not apply to the
    element:
    <code class="no-backref" title="dom-input-checked">checked</code>,
+   <code class="no-backref" title="dom-input-files">files</code>,
    <code class="no-backref" title="dom-textarea/input-selectionStart">selectionStart</code>,
    <code class="no-backref" title="dom-textarea/input-selectionEnd">selectionEnd</code>,
    <code class="no-backref" title="dom-input-valueAsDate">valueAsDate</code>, and
@@ -36132,6 +36176,7 @@
 
    <p>The following DOM attributes and methods do not apply to the
    element:
+   <code class="no-backref" title="dom-input-files">files</code>,
    <code class="no-backref" title="dom-input-list">list</code>,
    <code class="no-backref" title="dom-input-selectedOption">selectedOption</code>,
    <code class="no-backref" title="dom-textarea/input-selectionStart">selectionStart</code>,
@@ -36288,6 +36333,7 @@
 
    <p>The following DOM attributes and methods do not apply to the
    element:
+   <code class="no-backref" title="dom-input-files">files</code>,
    <code class="no-backref" title="dom-input-list">list</code>,
    <code class="no-backref" title="dom-input-selectedOption">selectedOption</code>,
    <code class="no-backref" title="dom-textarea/input-selectionStart">selectionStart</code>,
@@ -36397,9 +36443,14 @@
 
    <p>The following common <code>input</code> element content
    attributes apply to the element:
+
+   <p>The following common <code>input</code> element content
+   attributes and DOM attributes apply to the element:
    <code title="attr-input-accept">accept</code>,
    <code title="attr-input-multiple">multiple</code>, and
-   <code title="attr-input-required">required</code>.</p>
+   <code title="attr-input-required">required</code>;
+   <code title="dom-input-files">files</code> and
+   <code title="dom-input-value">value</code> DOM attributes.</p>
 
    <p>The <code title="dom-input-value">value</code> DOM attribute is
    in mode <span title="dom-input-value-filename">filename</span>.</p>
@@ -36536,6 +36587,7 @@
    <p>The following DOM attributes and methods do not apply to the
    element:
    <code class="no-backref" title="dom-input-checked">checked</code>,
+   <code class="no-backref" title="dom-input-files">files</code>,
    <code class="no-backref" title="dom-input-list">list</code>,
    <code class="no-backref" title="dom-input-selectedOption">selectedOption</code>,
    <code class="no-backref" title="dom-textarea/input-selectionStart">selectionStart</code>,
@@ -36777,6 +36829,7 @@
    <p>The following DOM attributes and methods do not apply to the
    element:
    <code class="no-backref" title="dom-input-checked">checked</code>,
+   <code class="no-backref" title="dom-input-files">files</code>,
    <code class="no-backref" title="dom-input-list">list</code>,
    <code class="no-backref" title="dom-input-selectedOption">selectedOption</code>,
    <code class="no-backref" title="dom-textarea/input-selectionStart">selectionStart</code>,
@@ -36870,6 +36923,7 @@
    <p>The following DOM attributes and methods do not apply to the
    element:
    <code class="no-backref" title="dom-input-checked">checked</code>,
+   <code class="no-backref" title="dom-input-files">files</code>,
    <code class="no-backref" title="dom-input-list">list</code>,
    <code class="no-backref" title="dom-input-selectedOption">selectedOption</code>,
    <code class="no-backref" title="dom-textarea/input-selectionStart">selectionStart</code>,
@@ -36952,6 +37006,7 @@
    <p>The following DOM attributes and methods do not apply to the
    element:
    <code class="no-backref" title="dom-input-checked">checked</code>,
+   <code class="no-backref" title="dom-input-files">files</code>,
    <code class="no-backref" title="dom-input-list">list</code>,
    <code class="no-backref" title="dom-input-selectedOption">selectedOption</code>,
    <code class="no-backref" title="dom-textarea/input-selectionStart">selectionStart</code>,
@@ -37684,6 +37739,18 @@
 
   <hr>
 
+  <p>The <dfn title="dom-input-files"><code>files</code></dfn> DOM
+  attribute allows scripts to access the element's <span
+  title="concept-input-type-file-selected">selected files</span>. On
+  getting, if the DOM attribute applies, it must return a new
+  <code>FileList</code> object that represents the current <span
+  title="concept-input-type-file-selected">selected files</span>. If
+  the DOM attribute does not apply, then it must instead throw an
+  <code>INVALID_STATE_ERR</code> exception. <a
+  href="#refsFILEAPI">[FILEAPI]</a></p>
+
+  <hr>
+
   <p>The <dfn
   title="dom-input-valueAsDate"><code>valueAsDate</code></dfn> DOM
   attribute represents the <span

|