Skip to content
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

Make eventInitDict param optional in GamepadEvent constructor #217

Open
wants to merge 3 commits into
base: gh-pages
Choose a base branch
from
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1752,7 +1752,7 @@ <h2>
[Exposed=Window]

interface GamepadEvent: Event {
constructor(DOMString type, GamepadEventInit eventInitDict);
constructor(DOMString type, optional GamepadEventInit eventInitDict = {});
Copy link
Member

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.

Copy link
Collaborator Author

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

[SameObject] readonly attribute Gamepad gamepad;
};
</pre>
Expand Down
Loading