W3C home > Mailing lists > Public > whatwg@whatwg.org > June 2011

[whatwg] DataTransfer.files tri-specification conflict

From: Ian Hickson <ian@hixie.ch>
Date: Wed, 8 Jun 2011 22:15:20 +0000 (UTC)
Message-ID: <Pine.LNX.4.64.1106082213530.19153@ps20323.dreamhostps.com>
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.   `._.-(,_..'--(,_..'`-.;.'
Received on Wednesday, 8 June 2011 15:15:20 UTC

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