Re: Custom element lifecycle callbacks

On 1/9/15 8:46 AM, Anne van Kesteren wrote:
> As far as I can tell from the specification, when the value IDL
> attribute is in the filename mode, any values that might be stored in
> internal slots are ignored.

Hmm...  That was not obvious to me, but OK.  I guess it uses the "list 
of selected files" instead?  And then the claim is that the only 
sanitization that's needed is step 2 of "When an input element's type 
attribute changes state", to lose the old value, which was being stored 
all this time, when changing out of the file upload state?

That's pretty bizarre, since it requires storing information that will 
never get used, but ok.

> As far as I can tell from the specification you cannot influence the
> value returned by <input type=file>.value in any way.

UAs do not seem to be interoperable here.  In particular, in some UAs 
cloning a file input copies the list of selected files, and in some it 
does not, with the spec seeming to side with the latter.  It's a bit 
weird that cloning would normally copy the value, but not for file inputs.

In any case, the fact that we're even _having_ this discussion and that 
it needs careful reading of the HTML spec is my point.

-Boris

Received on Friday, 9 January 2015 14:09:38 UTC