This proposal extends the Gamepad API with a new event-driven model that enables applications to receive gamepad input with lower latency. Instead of relying on frequent polling via navigator.getGamepads(), developers can now listen for a rawgamepadinputchange event, which fires whenever new input data is available from the device. This allows for more responsive input handling, particularly in latency-sensitive applications.
The current Gamepad API relies on a polling-based model, where applications must repeatedly call navigator.getGamepads() and compare the entire gamepad state to detect changes such as button presses or axis movements. Introducing an event-driven alternative would allow applications to respond directly to meaningful input changes without relying on a polling loop. This approach not only simplifies input handling but may also help reduce average input latency.
Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?
None
N/A
Web platform tests will be added with the prototype implementation.
No milestones specified