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

Re: [FileAPI] File.slice spec bug

From: Dmitry Titov <dimich@chromium.org>
Date: Tue, 12 Apr 2011 15:04:11 -0700
Message-ID: <BANLkTi=soHoayhkyE7aObt8Ls9=ZO=cjbA@mail.gmail.com>
To: arun@mozilla.com
Cc: Glenn Maynard <glenn@zewt.org>, Jonas Sicking <jonas@sicking.cc>, Webapps WG <public-webapps@w3.org>
I think Glenn was asking how would the developers detect the new behavior of
slice() if we decide to change it and there will be 2 versions of behavior
around with the same method name...

One tricky thing about the behavior change is that it won't necessarily
crash or spew some console output etc - it can just silently serve a wrong
chunk of the file/blob and it can be tricky to even figure out what went
wrong and where.


On Tue, Apr 12, 2011 at 2:35 PM, Arun Ranganathan <arun@mozilla.com> wrote:

>  On 4/12/11 5:27 PM, Glenn Maynard wrote:
>
> On Tue, Apr 12, 2011 at 2:24 PM, Jonas Sicking <jonas@sicking.cc><jonas@sicking.cc>wrote:
>
>> 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.
>>
>
> "bb = new BlobBuilder(); bb.append("abcd"); bb.getBlob().slice(2, 2).size
> == 0" is a straightforward feature test, except that Firefox 4 doesn't
> support BlobBuilder.  Is there another way to synchronously retrieve a
> non-empty Blob to test with?
>
>
> Get a file.
>
> <input name="foo" type="file" onchange="
> alert(this.files[0]);alert(this.files[0].slice);">
>
>
>
> --
> Glenn Maynard
>
>
>
Received on Tuesday, 12 April 2011 22:05:21 GMT

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