Source code

Revision control

Copy as Markdown

Other Tools

<!doctype html>
<title>Manual Gamepad getGamepads polling tests</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
setup({explicit_timeout: true});
// Poll until we see a gamepad.
var id = setInterval(function() {
var gamepads = navigator.getGamepads();
var found = null;
for (var i = 0; i < gamepads.length; i++) {
if (gamepads[i]) {
found = gamepads[i];
if (found) {
}, 15);
<p>This test requires a gamepad. Connect one and press any button to start the test.</p>