W3C home > Mailing lists > Public > public-script-coord@w3.org > October to December 2012

Re: [WebIDL][ES6] Include optional arguments in "length"

From: Rick Waldron <waldron.rick@gmail.com>
Date: Wed, 17 Oct 2012 10:31:58 -0400
Message-ID: <CAHfnhfoM+YyQtE1TVQQ7FGCmmZO2TC7TOZcrsLxQnzSG40+zJw@mail.gmail.com>
To: Simon Pieters <simonp@opera.com>
Cc: "public-script-coord@w3.org" <public-script-coord@w3.org>
On Wed, Oct 17, 2012 at 3:49 AM, Simon Pieters <simonp@opera.com> wrote:

> Hi,
>
> ES6 and WebIDL do not include optional arguments in the "length" property.
> It would be more useful for feature testing DOM stuff if they were. Gecko
> currently includes them for DOM stuff, but there's a bug
> https://bugzilla.mozilla.org/**show_bug.cgi?id=793151<https://bugzilla.mozilla.org/show_bug.cgi?id=793151>about changing it to match current WebIDL. IE/Opera/WebKit seem to always
> use 0 for DOM stuff. WebIDL is apparently aligned with ES6: "The length
> property of a function should be updated to not include optional
> parameters." http://wiki.ecmascript.org/**doku.php?id=harmony:parameter_**
> default_values<http://wiki.ecmascript.org/doku.php?id=harmony:parameter_default_values>
>
> Always using 0 is quite useless for feature testing, but not including
> optional arguments is also useless since you can't tell if the UA
> implements the optional argument or not. What was the rationale for not
> including optional arguments in length in ES6? Can we change both ES6 and
> WebIDL to include them?


The most recent discussion can be found here:
https://mail.mozilla.org/pipermail/es-discuss/2012-October/025711.html


Rick


>
>
> --
> Simon Pieters
> Opera Software
>
>
Received on Wednesday, 17 October 2012 14:32:54 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 May 2013 19:30:07 UTC