summaryrefslogtreecommitdiffstats
path: root/dom/tests/mochitest/gamepad/gamepad_frame.html
blob: dae1e92b1b22c8d1a7491c1ad0e737e7a65bf6b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<!-- Any copyright is dedicated to the Public Domain.
   - http://creativecommons.org/publicdomain/zero/1.0/ -->
<!DOCTYPE HTML>
<html>
<head>
  <title>frame</title>
  <script type="text/javascript">
    var connectedEvents = 0;
    var buttonPresses = 0;
    var idlConnected = 0;
    window.addEventListener("gamepadconnected", function() {
      connectedEvents++;
    });
    window.addEventListener("gamepadbuttondown", function() {
      buttonPresses++;
    });
    window.ongamepadconnected = () => ++idlConnected;
  </script>
</head>
<body>
</body>
</html>