Re: [heycam/webidl] Sort out when dictionaries and records should have default values (#76)

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