diff --git a/README.md b/README.md index 9a3e9fa..9223076 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,4 @@ The Gamepad specification defines a low-level interface that represents gamepad This repository is for editing drafts and discussion of the [Gamepad](https://w3c.github.io/gamepad/) specification (and [extensions](https://w3c.github.io/gamepad/extensions.html) to it). -See [FeatureRequests.md](FeatureRequests.md) for feature requests beyond the first version of this spec. - This specification is part of the [Web Apps WG](https://github.com/w3c/webappswg). diff --git a/index.html b/index.html index 8ca6304..433782b 100644 --- a/index.html +++ b/index.html @@ -510,8 +510,13 @@

  • Let |navigator:Navigator| be |gamepad|'s [=relevant global object=]'s {{Navigator}} object.
  • +
  • Let |document:Document?| be |gamepad|'s [=relevant global + object=]'s [=associated `Document`=]; otherwise `null`. +
  • If |navigator|.{{Navigator/[[hasGamepadGesture]]}} is `false` and - |gamepad| [=contains a gamepad user gesture=]: + |document| is a [=Document/fully active descendant of a top-level + traversable with user attention=] and |gamepad| [=contains a gamepad + user gesture=]:
    1. Set |navigator|.{{Navigator/[[hasGamepadGesture]]}} to `true`. @@ -527,10 +532,6 @@

    2. Set |connectedGamepad|.{{Gamepad/[[timestamp]]}} to |now|.
    3. -
    4. Let |document:Document?| be |gamepad|'s [=relevant - global object=]'s [=associated `Document`=]; otherwise - `null`. -
    5. If |document| is not `null` and is [=Document/fully active=], then [=queue a task=] on the [=gamepad task source=] to [=fire an event=] named {{gamepadconnected}} @@ -1681,8 +1682,8 @@

      The {{Navigator/getGamepads()}} method steps are:

        -
      1. Let |doc| be the [=current global object=]'s [=associated - `Document`=]. +
      2. Let |doc:Document?| be the [=current global object=]'s + [=associated `Document`=].
      3. If |doc| is `null` or |doc| is not [=Document/fully active=], then return an empty [=list=]. @@ -1697,6 +1698,8 @@

      4. Let |now:DOMHighResTimeStamp| be the [=current high resolution time=].
      5. +
      6. Let |gamepads:sequence<Gamepad?>| be an empty [=list=]. +
      7. [=list/For each=] |gamepad:Gamepad| of [=this=].{{Navigator/[[gamepads]]}}:
          @@ -1709,6 +1712,8 @@

      8. +
      9. [=list/Append=] |gamepad| to |gamepads|. +

    6. Return |gamepads|.