Trying to implement HTML5 gamepad api using the following code:
window.addEventListener("gamepadconnected", function(e) {
console.log(e.gamepad);
});
I have my wireless Xbox 360 controller connected. When I load my webpage, nothing shows up in the console. However, when I switch tabs and come back to the page, the console log appears. The same exact thing happens with this site. I load the site, it's blank, then I switch tabs and come back to it and there's information about my pad on the screen.
Chrome Version: 54.0.2840.71 (Official Build) m (64-bit)