diff --git a/index.html b/index.html index 9587de4..4c903ae 100644 --- a/index.html +++ b/index.html @@ -650,8 +650,9 @@

Constructing a `Gamepad`

- A new `Gamepad` representing a connected gamepad device is - constructed by performing the following steps: + A new `Gamepad` with optional |index:long| representing a + connected gamepad device is constructed by performing the following + steps:

  1. Let |gamepad:Gamepad| be a newly created {{Gamepad}} instance: @@ -659,8 +660,14 @@

  2. Initialize |gamepad|'s {{Gamepad/id}} attribute to an identification string for the gamepad.
  3. -
  4. Initialize |gamepad|'s {{Gamepad/index}} attribute to the - result of [=selecting an unused gamepad index=] for |gamepad|. +
  5. Initialize |gamepad|'s {{Gamepad/index}} attribute to: +
      +
    • |index|, if |index| is provided, or +
    • +
    • The result of [=selecting an unused gamepad index=] for + |gamepad|. +
    • +
  6. Initialize |gamepad|'s {{Gamepad/mapping}} attribute to the result of [=selecting a mapping=] for the gamepad device.