- From: Simon Pieters <simonp@opera.com>
- Date: Wed, 17 Oct 2012 09:49:51 +0200
- To: "public-script-coord@w3.org" <public-script-coord@w3.org>
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 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 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? -- Simon Pieters Opera Software
Received on Wednesday, 17 October 2012 07:50:20 UTC