What is the issue with the Web IDL Standard?
https://webidl.spec.whatwg.org/#web-idl-arguments-list-converting
-
Let esArgs be an empty list.
-
Let i be 0.
-
Let count be 0.
-
While i < args’s size:
-
If args[i] is the special value “missing”, then append undefined to esArgs.
-
Otherwise, args[i] is an IDL value:
-
Let convertResult be the result of converting args[i] to an ECMAScript value. Rethrow any exceptions.
-
Append convertResult to esArgs.
-
Set count to i + 1.
-
Set i to i + 1.
-
Truncate esArgs to contain count items.
-
Return esArgs.
As far as I can tell, args could be « value, "missing", optionalValue », in which case count would be 2 in step 5 and the output would be « value, undefined ». This seems incorrect.
If that case is impossible, the spec should say that. Otherwise I suppose it should count the number of trailing "missing" values in args separately.
What is the issue with the Web IDL Standard?
https://webidl.spec.whatwg.org/#web-idl-arguments-list-converting
As far as I can tell, args could be « value, "missing", optionalValue », in which case count would be 2 in step 5 and the output would be « value, undefined ». This seems incorrect.
If that case is impossible, the spec should say that. Otherwise I suppose it should count the number of trailing "missing" values in args separately.