Using Firefox with a joystick
Work on the JoystickAPI is progressing: the first special build of the Firefox web browser that has a rudimentary set of DOM joystick events has now been released. This means that web content in the browser can receive input from a joystick or gamepad. Together with with the Bocoup web development agency, Ted Mielczarek and David Humphrey from Mozilla have developed two early prototypes to demonstrate the possible applications.
The new API can be used to control a video or, in conjunction with graphics framework Paper.js, move a point around the screen using the joystick. Supported hardware is a little limited – the current implementation is only suitable for Microsoft's Xbox 360 controller.
Mozilla's JoystickAPI currently defines three events:
MozJoyAxisMove. They share a JoystickID property, which enables the API to distinguish between connected devices. In contrast to the polling-based approaches which Google has chosen to use for its Joystick API, Mozilla's method for status updates is managed through receiving DOM events.