[whatwg] DataTransfer.files tri-specification conflict

Ian Hickson ian at hixie.ch
Wed Jun 8 15:15:20 PDT 2011


On Sat, 19 Feb 2011, David Flanagan wrote:
>
> 1) HTML5 says this about DataTransfer.files:
> 
> > The files attribute must return a live FileList sequence consisting of 
> > File objects representing the files found by the following steps. The 
> > same object must be returned each time. Furthermore, for a given 
> > FileList object and a given underlying file, the same File object must 
> > be used each time.
> 
> 2) The FileAPI spec defines FileList as a sequence<File>
> 
> 3) The Web IDL spec says this about sequences:
> 
> > The sequence<T> type is a parameterized type whose values are 
> > (possibly zero-length) sequences of values of type T. Sequences are 
> > always passed by value. In language bindings where a sequence is 
> > represented by an object of some kind, passing a sequence to a user 
> > agent implemented object will not result in a reference to the 
> > sequence being kept by that object. Similarly, any sequence returned 
> > from a user agent implemented object will be a copy and modifications 
> > made to it will not be visible to the object.
> 
> Doesn't WebIDL pass-by-value requirement conflict with the HTML5 
> always-return-the-same-object requirement?

FileList is no longer a sequence, so this should now be ok. Let me know if 
it's still problematic.

-- 
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