g = navigator.getGamepads()
returns an empty array until you move the gamepad/joystick. If anyone wants to see my crap tester I'll clean it up and post it somewhere. Let me know.
Before moving the joystick:
After moving the joystick, you get an array of gamepads:
So I figured, what online emulators could use a joystick?
I tried scullinsteel's online apple // jse emulator and amazingly it supports the joystick. Until you move the joystick, the mouse controls PDL(0) and PDL(1) but after movement, it returns values from the gamepad api.
pulling the joystick into the lower right for 255,255
(note that here you see two different firefox windows reading the same gamepad. Even though the gamepad was active in one firefox window, it wasn't active in the other freshly opened window until there was gamepad activity)
Ahhh, yes! Choplifter plays great with a joystick!
Then I thought, didn't I hear that you can run mame in a browser?
So I went to archive and tried Total Replay and it amazed me: It's mame in a browser, and it blew my mind when I saw you can access the UI and everything.
but too bad, the joystick didn't work, one possible reason is that -gameio joy wasn't specified, and if you enable the joy from the UI and reset, it hangs. But I see the potential there, and it's awesome.