RESOLVED FIXED 177308
eventInitDict parameter to GamepadEvent constructor should be optional
https://bugs.webkit.org/show_bug.cgi?id=177308
Summary eventInitDict parameter to GamepadEvent constructor should be optional
Chris Dumez
Reported 2017-09-21 09:52:36 PDT
eventInitDict parameter to GamepadEvent constructor should be optional to match Firefox and Chrome.
Attachments
Patch (4.84 KB, patch)
2017-09-21 10:25 PDT, Chris Dumez
no flags
Chris Dumez
Comment 1 2017-09-21 09:54:55 PDT
Per Web IDL: """ 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. """
Chris Dumez
Comment 2 2017-09-21 10:25:31 PDT
Sam Weinig
Comment 4 2017-09-21 13:44:55 PDT
Comment on attachment 321443 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=321443&action=review > Source/WebCore/ChangeLog:9 > + and Chrome. Having such dictionary parameter is also not valid Web IDL: Can you make this an error in the generator?
Chris Dumez
Comment 5 2017-09-21 13:46:57 PDT
Comment on attachment 321443 [details] Patch Clearing flags on attachment: 321443 Committed r222348: <http://trac.webkit.org/changeset/222348>
Chris Dumez
Comment 6 2017-09-21 13:46:59 PDT
All reviewed patches have been landed. Closing bug.
Darin Adler
Comment 7 2017-09-23 14:59:25 PDT
Comment on attachment 321443 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=321443&action=review >> Source/WebCore/ChangeLog:9 >> + and Chrome. Having such dictionary parameter is also not valid Web IDL: > > Can you make this an error in the generator? Heh, I came here to ask the same question.
Chris Dumez
Comment 8 2017-09-25 09:44:24 PDT
(In reply to Darin Adler from comment #7) > Comment on attachment 321443 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=321443&action=review > > >> Source/WebCore/ChangeLog:9 > >> + and Chrome. Having such dictionary parameter is also not valid Web IDL: > > > > Can you make this an error in the generator? > > Heh, I came here to ask the same question. Yes, will take a look once I am done with some urgent tasks.
Radar WebKit Bug Importer
Comment 9 2017-09-27 12:19:34 PDT
Note You need to log in before you can comment on or make changes to this bug.