W3C home > Mailing lists > Public > whatwg@whatwg.org > May 2012

[whatwg] Make files attribute of the input element writable

From: Nico Weber <thakis@chromium.org>
Date: Tue, 22 May 2012 10:41:34 -0700
Message-ID: <CAMGbLiEsUfh+UKAX4HW-0q47kF0N4iwyUGeOujSJ3BPwF0J1Fg@mail.gmail.com>
To: whatwg@whatwg.org

The files attribute of the input element is currently marked readonly
[1], to protect from `myInput.files = "/etc/passwd"; myForm.submit()`.
Since its type is now FileList and not string, that's no longer

Making the attribute writable would allow setting the files property
of an input element to dataTransfer.files from a drop handler. For
example, I would like to use this to create a larger drop-target for a
file input. Here's one request for this functionality:

Can the readonly restriction be removed from the spec?


1: http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#the-input-element
Received on Tuesday, 22 May 2012 17:51:10 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:09:13 UTC