Re: [FileAPI] File.slice spec bug

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 UTC