[webkit-dev] Optional parameter in IDL and undefined JS value
Jian Li
jianli at chromium.org
Thu Apr 21 18:29:00 PDT 2011
I've pinged the spec author to make it clear in the spec. What is meant in
the spec is really that we want Blob.slice to have the same exact behavior
as Array.slice defined in ECMAScript 5, 15.4.4.10. That is,
Blob.slice(start) has the same result as Blob.slice(start, undefined).
The current code generator scripts will convert undefined value to 0. But we
really want to use the custom default value for Blob.slice. Do we want to
consider adding "DefaultValue=" extended attribute support to IDL?
Thanks,
Jian
On Thu, Apr 21, 2011 at 3:38 AM, Maciej Stachowiak <mjs at apple.com> wrote:
>
> On Apr 21, 2011, at 12:14 AM, Jian Li wrote:
>
> > The current File API spec says that:
> > If the end parameter is not provided (undefined), let relativeEnd be
> size.
>
> That seems like loose wording. Parameter not provided and parameter
> provided with a value of undefined are in general not the same thing. The
> spec should be explicit about which cases it's talking about.
>
> Regards,
> Maciej
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20110421/cb217b37/attachment.html>
More information about the webkit-dev
mailing list