- From: Philip Jägenstedt <notifications@github.com>
- Date: Wed, 16 Oct 2019 00:33:03 -0700
- To: w3c/gamepad <gamepad@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Wednesday, 16 October 2019 07:33:05 UTC
From what I can tell this can be made sensible in terms of not changing state while script is running and `FrozenArray<T>` can be used. I think any remaining warts after this might be with `navigator.getGamepads()` itself. It currently returns an array of fixed length where all entries can be null, presumably because originally the index was to be kept stable when the `Gamepad` instance might be replaced. If a `Gamepad` object is connected to the underlying gamepad and updated at well defined times, it seems to me that `navigator.getGamepads()` could just return an empty array if there are no gamepads. But there's some chance that's not web compatible. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/w3c/gamepad/issues/8#issuecomment-542565084
Received on Wednesday, 16 October 2019 07:33:05 UTC