[Webkit-unassigned] [Bug 189136] Omitting an optional argument when calling a WebIDL operation results in a "required member" TypeError if the argument type is a dictionary with required members

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Aug 29 20:05:33 PDT 2018


https://bugs.webkit.org/show_bug.cgi?id=189136

--- Comment #2 from Darin Adler <darin at apple.com> ---
The rule in question in the latest WebIDL draft SAYS this:

"If the type of an argument is a dictionary type or a union type that has a dictionary 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, unless otherwise specified."

Note that this rule does not apply to a dictionary with required members. So I think in C++ we need to represent such an argument using std::optional rather than by relying on a default value.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180830/49d7014a/attachment-0001.html>


More information about the webkit-unassigned mailing list