Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves #147
Adds a block to the Gamepad extension that allows you to get information about connected gamepads.
At some point, I'd like to add a way to get the model (like is this an Xbox One controller or a PlayStation DualShock or...?) so you don't ever have to write your own code to use the vendor or product to tell what kind of controller it is, you just leave it up to the block and it'll tell you. I've already done some work on such a function, I just need to find more information so it works on more controllers.
It'd also be nice to add cross-browser compatibility. Currently, the vendor and product matching functions only work properly on Chromium-based browsers. For Firefox, see Gamepad: id property.
Tested in Edge 115.