Requires Firefox (Specific Nightly Build).
Note: If this doesn't appear to be working, try pressing ALL the buttons - not just the d-pad and face buttons.
From An Introduction to the HTML5 Gamepad API on Activetuts+.