W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2011

[FileAPI] File.slice spec bug

From: Jonas Sicking <jonas@sicking.cc>
Date: Tue, 12 Apr 2011 11:24:31 -0700
Message-ID: <BANLkTintNz_UP3TQfcaHevNMx-HDo16cXg@mail.gmail.com>
To: Webapps WG <public-webapps@w3.org>
Hi All,

It was recently (yesterday) pointed out to me that we let a bad
spec-bug slip through for File.slice. It doesn't match the argument
semantics of Array.slice which can be very confusing for developers.

In Array.slice the second argument is the index of the last item to be
included in the returned slice.
In File.slice the second argument is the number of bytes included in
the returned slices.

In other words, it's Array.slice(start, end), but File.slice(start, length).

Additionally, in Array.slice the second argument is optional.

File.slice is currently shipped by Chrome and Firefox 4. I would be
fine with fixing this in Firefox 4.0.1, however that only makes sense
if the chrome folks are fine with fixing it in their implementation.

So consider this an official request, would chrome be ok with changing
the spec here?

/ Jonas
Received on Tuesday, 12 April 2011 18:25:28 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:44 GMT