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

Gamepad API - secure_context_required #11771

Merged
merged 4 commits into from
Jul 27, 2021

Conversation

hamishwillee
Copy link
Contributor

@hamishwillee hamishwillee commented Jul 26, 2021

FF91 requires gamepad has secure context: https://bugzilla.mozilla.org/show_bug.cgi?id=1704005. Further, Chrome also puts gamepad in secure context from v86, though I read this as being behind a flag: https://bugs.chromium.org/p/chromium/issues/detail?id=1099544

This updates theMDN listed GamePad APIs:
Gamepad, GamepadButton, GamepadEvent, GamepadHapticActuator, GamepadPose.

I did a check on Navigator.getGamepads() and that also requires a secure context. Since not everything in Navigator does, do I need to do add secure_context_required as a subfeature of the method??
I can't tell if Window.ongamepadconnected event and disconnected would require secure context - I get null on both secure and insecure contexts.

Related docs work can be tracked in mdn/content#6723. This is associated with the change in #11770

@github-actions github-actions bot added the data:api Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API label Jul 26, 2021
@queengooborg
Copy link
Contributor

If Navigator.getGamepads() also requires secure contexts, then yes, we should add secure_context_required as a subfeature to the method! (So we'll have a api.Navigator.getGamepads.secure_context_required feature.)

So far, this is LGTM!

@hamishwillee
Copy link
Contributor Author

Thanks @vinyldarkscratch . I've added api.Navigator.getGamepads.secure_context_required along with the same thing for the connected/disconnected event handlers. Mirroring the other cases and setting as false if the parent is false.

I think this is now ready for re-review.

Copy link
Contributor

@queengooborg queengooborg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the quick response, this looks all good to go now!

@queengooborg queengooborg merged commit 500e657 into mdn:main Jul 27, 2021
@hamishwillee hamishwillee deleted the ff91_gamepad_secure branch July 30, 2021 02:29
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.

2 participants