- From: Anne van Kesteren <notifications@github.com>
- Date: Fri, 01 Jun 2018 07:43:27 -0700
- To: heycam/webidl <webidl@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Friday, 1 June 2018 14:43:50 UTC
I think I'd argue that a dictionary member that is a dictionary should have a default value as well.
```
dictionary Foo { required long foo1; };
dictionary Bar { Foo myFoo; };
```
```
...
void doStuff(optional Bar myBar);
```
Invoking `doStuff()` should throw. Invoking `doStuff({ myBar: { foo1: 42 }})` would be okay, as far as IDL is concerned.
I don't think there's a good reason to make dictionary handling inconsistent between it being an argument and a member of another dictionary.
(According to bz on IRC Firefox already does this.)
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/heycam/webidl/issues/76#issuecomment-393902429
Received on Friday, 1 June 2018 14:43:50 UTC