-
Notifications
You must be signed in to change notification settings - Fork 47
Make eventInitDict param optional in GamepadEvent constructor #217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: gh-pages
Are you sure you want to change the base?
Conversation
|
|
||
| interface GamepadEvent: Event { | ||
| constructor(DOMString type, GamepadEventInit eventInitDict); | ||
| constructor(DOMString type, optional GamepadEventInit eventInitDict = {}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably need to remove the required from GamepadEventInit's gamepad.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Blink, Gecko, WebKit agree that GamepadEventInit's gamepad attribute is optional and nullable, let's update the spec to match.
Gamepad? gamepad; // blink
Gamepad? gamepad = null; // Gecko
Gamepad? gamepad = null; // WebKit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good.
|
Should the type of the |
|
@tcl3, yes, good catch. I think the attributes are required to mirror the value they are initialized with. |
|
Other than matching current implementations, is there a reason/use case for a null |
Closes #216
The following tasks have been completed:
Implementation commitment:
Preview | Diff