- From: Kagami Sascha Rosylight <notifications@github.com>
- Date: Mon, 07 Jul 2025 15:23:18 -0700
- To: whatwg/webidl <webidl@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Monday, 7 July 2025 22:23:22 UTC
saschanaz created an issue (whatwg/webidl#1499)
### What is the issue with the Web IDL Standard?
https://webidl.spec.whatwg.org/#idl-operations
> and the argument is either the final argument or is followed only by [optional arguments](https://webidl.spec.whatwg.org/#dfn-optional-argument), then the argument must be specified as optional and have a default value provided.
But why such requirement? Web IDL doesn't have requirement that a required argument cannot follow an optional argument, that this is possible:
```webidl
undefined operation(optional OptionalDict dict = {}, DOMString str);
```
But because of that requirement we allow this too:
```webidl
undefined operation(OptionalDict dict, DOMString str);
```
which is weird? One can say such function signature is weird too though.
--
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/webidl/issues/1499
You are receiving this because you are subscribed to this thread.
Message ID: <whatwg/webidl/issues/1499@github.com>
Received on Monday, 7 July 2025 22:23:22 UTC