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

Conversation

nondebug
Copy link
Collaborator

@nondebug nondebug commented Oct 10, 2024

Closes #216

The following tasks have been completed:

  • Modified Web platform tests (link to pull request)

Implementation commitment:


Preview | Diff

@@ -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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

eventInitDict parameter in GamepadEvent constructor should be optional
2 participants