Revision a39e0345491427d036bae69488b72661e11057f6 authored by Simon Pieters on 24 April 2018, 20:32:47 UTC, committed by L. David Baron on 24 April 2018, 20:32:47 UTC
1 parent ff863cd
getgamepads-polling-manual.html
<!doctype html>
<html>
<head>
<title>Manual Gamepad getGamepads polling tests</title>
<link rel="help" href="https://w3c.github.io/gamepad/#navigator-interface-extension">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<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];
break;
}
}
if (found) {
clearInterval(id);
done();
}
}, 15);
</script>
</head>
<body>
<p>This test requires a gamepad. Connect one and press any button to start the test.</p>
</body>
</html>
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...