Skip to content

Commit

Permalink
Make <input type=file>.files settable
Browse files Browse the repository at this point in the history
  • Loading branch information
annevk committed Aug 2, 2017
1 parent 5ead2c6 commit 5dc7db2
Showing 1 changed file with 24 additions and 11 deletions.
35 changes: 24 additions & 11 deletions source
Expand Up @@ -43257,7 +43257,7 @@ interface <dfn>HTMLInputElement</dfn> : <span>HTMLElement</span> {
[<span>CEReactions</span>] attribute DOMString <span data-x="dom-input-dirName">dirName</span>; [<span>CEReactions</span>] attribute DOMString <span data-x="dom-input-dirName">dirName</span>;
[<span>CEReactions</span>] attribute boolean <span data-x="dom-fe-disabled">disabled</span>; [<span>CEReactions</span>] attribute boolean <span data-x="dom-fe-disabled">disabled</span>;
readonly attribute <span>HTMLFormElement</span>? <span data-x="dom-fae-form">form</span>; readonly attribute <span>HTMLFormElement</span>? <span data-x="dom-fae-form">form</span>;
readonly attribute <span>FileList</span>? <span data-x="dom-input-files">files</span>; attribute <span>FileList</span>? <span data-x="dom-input-files">files</span>;
[<span>CEReactions</span>] attribute USVString <span data-x="dom-fs-formAction">formAction</span>; [<span>CEReactions</span>] attribute USVString <span data-x="dom-fs-formAction">formAction</span>;
[<span>CEReactions</span>] attribute DOMString <span data-x="dom-fs-formEnctype">formEnctype</span>; [<span>CEReactions</span>] attribute DOMString <span data-x="dom-fs-formEnctype">formEnctype</span>;
[<span>CEReactions</span>] attribute DOMString <span data-x="dom-fs-formMethod">formMethod</span>; [<span>CEReactions</span>] attribute DOMString <span data-x="dom-fs-formMethod">formMethod</span>;
Expand Down Expand Up @@ -48953,7 +48953,7 @@ You cannot submit this form when the field is incorrect.</samp></pre>


</dd> </dd>


<dt><var>input</var> . <code subdfn data-x="dom-input-files">files</code> <!-- [ = <var>files</var> ] --></dt> <dt><var>input</var> . <code subdfn data-x="dom-input-files">files</code> [ = <var>files</var> ]</dt>


<dd> <dd>


Expand All @@ -48962,9 +48962,9 @@ You cannot submit this form when the field is incorrect.</samp></pre>


<p>Returns null if the control isn't a file control.</p> <p>Returns null if the control isn't a file control.</p>


<!-- <p>Can be set to a <code>FileList</code> object to change the <span
<p>Can be set to an array of <code>File</code> or <code>Blob</code> instances.</p>- data-x="concept-input-type-file-selected">selected files</span> of the form control. For
--> instance, as the result of a drag-and-drop operation.</p>


</dd> </dd>


Expand Down Expand Up @@ -49118,13 +49118,26 @@ You cannot submit this form when the field is incorrect.</samp></pre>
<hr> <hr>


<p>The <dfn><code data-x="dom-input-files">files</code></dfn> IDL attribute allows scripts to <p>The <dfn><code data-x="dom-input-files">files</code></dfn> IDL attribute allows scripts to
access the element's <span data-x="concept-input-type-file-selected">selected files</span>. On access the element's <span data-x="concept-input-type-file-selected">selected files</span>.
getting, if the IDL attribute <span data-x="concept-input-apply">applies</span>, it must return a
<code>FileList</code> object that represents the current <span <p>On getting, if the IDL attribute <span data-x="concept-input-apply">applies</span>, it must
return a <code>FileList</code> object that represents the current <span
data-x="concept-input-type-file-selected">selected files</span>. The same object must be returned data-x="concept-input-type-file-selected">selected files</span>. The same object must be returned
until the list of <span data-x="concept-input-type-file-selected">selected files</span> changes. If until the list of <span data-x="concept-input-type-file-selected">selected files</span> changes.
the IDL attribute <span data-x="do not apply">does not apply</span>, then it must instead return If the IDL attribute <span data-x="do not apply">does not apply</span>, then it must instead
null. <ref spec=FILEAPI></p> return null. <ref spec=FILEAPI></p>

<p>On setting, it must run these steps:

<ol>
<li><p>If the IDL attribute <span data-x="do not apply">does not apply</span> or the given value
is null, then return.</p></li>
<!-- This is inconsistent with other attributes, but Chrome and Safari already shipped so doesn't
seem worth the churn. -->

<li><p>Replace the element's <span data-x="concept-input-type-file-selected">selected
files</span> with the given value.</p></li>
</ol>


<hr> <hr>


Expand Down

0 comments on commit 5dc7db2

Please sign in to comment.