[whatwg] Setting .value on <input type=file>
Ian Hickson
ian at hixie.ch
Wed Sep 16 02:50:20 PDT 2009
On Tue, 15 Sep 2009, Jonas Sicking wrote:
>
> Currently the spec says to throw an INVALID_ACCESS_ERR exception anytime
> the 'value' IDL attribute is set. However allowing it to be set to the
> empty string would be good.
>
> The simplest use case is allowing the page to implement a 'cancel'
> button. Many UAs (in fact all that I know of) don't have explicit UI for
> clearing the field. In fact a quick test shows that at least Firefox and
> Safari has no way to clear the field at all.
>
> While the page can always delete the old input element and create a new
> one, that is much more complicated. Especially if the element has event
> listeners or user data associated with it.
>
> Setting it to the empty string works in Firefox, Safari, and Chrome. It
> does not appear to work in IE or Opera.
Done.
--
Ian Hickson U+1047E )\._.,--....,'``. fL
http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,.
Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
More information about the whatwg
mailing list