code: function (event) {
      // Add the new gamepad on the list of gamepads to look after.
      gamepadSupport.gamepads.push(event.gamepad);
  
      // Ask the tester to update the screen to show more gamepads.
      window.tester.updateGamepads(gamepadSupport.gamepads);
  
      // Start the polling loop to monitor button changes.
      gamepadSupport.startPolling();
    }
docs: React to the gamepad being connected.