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

Remove the Gamepad() constructor subfeature #6664

Merged
merged 1 commit into from
Sep 10, 2020

Conversation

foolip
Copy link
Contributor

@foolip foolip commented Sep 9, 2020

This was added in #1760.

However, there's no constructor in https://w3c.github.io/gamepad/#gamepad-interface
and it appears there never was from the spec repo's history. One gets
Gamepad objects from navigator.getGamepads() and can't create them.

That browsers also don't support the constructor was verified by their
absense in source code:

Additionally, new Gamepad() was tested in Chrome 85, Edge 18, Firefox
80 and Safari 13.1, and found to throw the same error as for another
non-constructor, new MediaError():
https://software.hixie.ch/utilities/js/live-dom-viewer/saved/8445

This was added in mdn#1760.

However, there's no constructor in https://w3c.github.io/gamepad/#gamepad-interface
and it appears there never was from the spec repo's history. One gets
Gamepad objects from `navigator.getGamepads()` and can't create them.

That browsers also don't support the constructor was verified by their
absense in source code:
 - Chromium: https://chromium.googlesource.com/chromium/src/+/9b50996d6e44f8b5140c33758be20d5a687a8eae/third_party/blink/renderer/modules/gamepad/gamepad.idl
 - Gecko: https://hg.mozilla.org/mozilla-central/file/f22c20641704d783097b1b128d826c8460de7354/dom/webidl/Gamepad.webidl
 - WebKit: https://trac.webkit.org/browser/webkit/trunk/Source/WebCore/Modules/gamepad/Gamepad.idl?rev=266799

Additionally, `new Gamepad()` was tested in Chrome 85, Edge 18, Firefox
80 and Safari 13.1, and found to throw the same error as for another
non-constructor, `new MediaError()`:
https://software.hixie.ch/utilities/js/live-dom-viewer/saved/8445
@github-actions github-actions bot added the data:api Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API label Sep 9, 2020
@foolip
Copy link
Contributor Author

foolip commented Sep 9, 2020

@jpmedley can you review, given that you added this in #1760?

@ddbeck I've added the needs-release-note since this is removing an entry. Is that enough, or would you also like to review changes like these before they land?

@ddbeck
Copy link
Collaborator

ddbeck commented Sep 10, 2020

@foolip the needs-release-note label is enough. Thank you!

@jpmedley jpmedley merged commit 1a70741 into mdn:master Sep 10, 2020
@foolip foolip deleted the rm-Gamepad-constructor branch September 10, 2020 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data:api Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants