W3C home > Mailing lists > Public > public-script-coord@w3.org > April to June 2013

Re: FileList (and other Array-like types)

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Thu, 30 May 2013 00:49:49 -0400
Message-ID: <51A6DA6D.8090207@mit.edu>
To: Jonas Sicking <jonas@sicking.cc>
CC: "public-script-coord@w3.org" <public-script-coord@w3.org>, Arun Ranganathan <arun@mozilla.com>, Anne van Kesteren <annevk@annevk.nl>
On 5/30/13 12:37 AM, Jonas Sicking wrote:
> So sounds like File[] defeats the whole purpose of what I'm
> suggesting, which is to avoid introducing new types and instead use
> plain JS-Arrays.

For the readonly case plain JS arrays might work, if your freeze them, etc.

This is already expressible in WebIDL, kinda: you say you return 
"object" and define in prose what the object is.

> This is an interesting question. I actually do like having
> myInputElement.files.push(5) throwing, but that would preclude using a
> real JS Array?

I think it would, yes...

-Boris
Received on Thursday, 30 May 2013 04:50:29 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:37:49 UTC