Re: [whatwg/dom] Editorial: provide a shorthand for other specifications to create events (#347)

bzbarsky commented on this pull request.



>  
- <li><p>If there is an <var>eventInitDict</var> argument, then for each <a>dictionary member</a>
- present, find the attribute on <a>event</a> whose <a spec=webidl>identifier</a> matches the key of
- the <a>dictionary member</a> and then set the attribute to the value of that
+ <li><p>If <var>eventInitDict</var> is given, then for each <a>dictionary member</a> present in

@domenic The dictionary argument is optional, but it has a default value.  Specifically, https://heycam.github.io/webidl/#idl-operations has this text (quite well hidden in all the examples, with no direct link):

> If the type of an argument is a dictionary type or record type or a union type that has a dictionary or record type as one of its flattened member types, and that dictionary type and its ancestors have no required members, and the argument is either the final argument or is followed only by optional arguments, then the argument must be specified as optional. Such arguments are always considered to have a default value of an empty dictionary or record, as appropriate, unless otherwise specified.

So in overload resolution step 10.4 that default value is added to the list, not "missing".

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/pull/347

Received on Friday, 21 October 2016 17:26:22 UTC