diff --git a/index.html b/index.html index 9bf1746..01e9e83 100644 --- a/index.html +++ b/index.html @@ -441,6 +441,171 @@
+ User agents implementing this specification must provide a new DOM
+ event, named gamepadconnected
. The corresponding
+ event MUST be of type
+ GamepadEvent
and
+ MUST fire on the window
object. Registration for and
+ firing of the gamepadconnected
event MUST follow
+ the usual behavior of DOM4 Events. [[!DOM4]]
+
+ A user agent MUST dispatch this event type to indicate the
+ user has connected a gamepad. If a gamepad was already connected
+ when the page was loaded, the gamepadconnected
+ event SHOULD be dispatched when the user presses a button or moves
+ an axis.
+
+ User agents implementing this specification must provide a new DOM
+ event, named gamepaddisconnected
. The
+ corresponding event MUST be of type
+ GamepadEvent
+ and MUST fire on the window
object. Registration for
+ and firing of the gamepaddisconnected
event MUST
+ follow the usual behavior of DOM4 Events. [[!DOM4]]
+
+ When a gamepad is disconnected from the user agent, if the
+ user agent has previously dispatched a
+ gamepadconnected
+ event for that gamepad to a window, a
+ gamepaddisconnected
event MUST be dispatched to
+ that same window.
+
+ User agents implementing this specification must provide a new DOM
+ event, named gamepadbuttondown
. The
+ corresponding event MUST be of type
+ GamepadEvent
+ and MUST fire on the window
object. Registration for
+ and firing of the gamepadbuttondown
event MUST
+ follow the usual behavior of DOM4 Events. [[!DOM4]]
+
+ A user agent MUST dispatch this event type to indicate the + user has pressed down an individual button on a gamepad. +
+ +
+ If a gamepad was already connected when the page was loaded but the
+ user agent has not yet dispatched a
+ gamepadconnected
+ to a window, the
+ gamepadconnected
+ event MUST be dispatched before dispatching the
+ gamepadbuttondown
event to that same window.
+
+ The gamepadbuttondown
event type must be
+ dispatched before the
+ gamepadbuttonup
+ event associated with the same key.
+
+ User agents implementing this specification must provide a new DOM
+ event, named gamepadbuttonup
. The corresponding
+ event MUST be of type
+ GamepadButtonEvent
+ and MUST fire on the window
object. Registration for
+ and firing of the gamepadbuttonup
event MUST
+ follow the usual behavior of DOM4 Events. [[!DOM4]]
+
+ A user agent MUST dispatch this event type to indicate the + user has released an individual button on a gamepad. +
+ +
+ The gamepadbuttonup
event type must be
+ dispatched after the
+ gamepadbuttondown
+ event associated with the same key.
+
+
+ More discussion is needed on whether to include events for axis
+ changes (e.g., gamepadaxismove
for whenever the value of
+ an axis changes, or gamepadaxischange
for whenever the
+ active axis changes), etc.
+
+
- User agents implementing this specification must provide a new DOM
- event, named gamepadconnected
. The corresponding event
- MUST be of type GamepadEvent
and MUST fire on the
- window
object. Registration for and firing of the
- gamepadconnected
event MUST follow the usual behavior
- of DOM4 Events. [[!DOM4]]
-
- A user agent MUST dispatch this event type to indicate the - user has connected a gamepad. If a gamepad was already connected - when the page was loaded, the gamepadconnected event SHOULD be - dispatched when the user presses a button or moves an axis. -
- -
- User agents implementing this specification must provide a new DOM
- event, named gamepaddisconnected
. The corresponding event
- MUST be of type GamepadEvent
and MUST fire on the
- window
object. Registration for and firing of the
- gamepaddisconnected
event MUST follow the usual behavior
- of DOM4 Events. [[!DOM4]]
-
- When a gamepad is disconnected from the user agent, if the - user agent has previously dispatched a - gamepadconnected event for that gamepad to a window, a - gamepaddisconnected event MUST be dispatched to that same - window. -
- -
-
- More discussion needed, on whether to include or exclude axis and button
- changed events, and whether to roll them more together
- (gamepadchanged
?), separate somewhat
- (gamepadaxischanged
?), or separate by individual axis
- and button.
-
-