1

So I just realized that the ongamepadconnected event returns a GamepadEvent object

Is it a good idea to just check for this object when trying to see if ongamepadconnected/disconnected is supported on the user's browser?

This way I, or any other developer can check if this event exists and act accordingly.

Kitanga Nday
  • 3,517
  • 2
  • 17
  • 29

1 Answers1

1

Yes, 'GamepadEvent' in window is a viable feature test.

DenverCoder9
  • 2,024
  • 11
  • 32