From 3488c7c3a91203d261b5fc822590624d59f79bcd Mon Sep 17 00:00:00 2001
From: Matt Reynolds
Date: Fri, 10 May 2024 14:10:25 -0700
Subject: [PATCH 1/6] Require system focus for gamepad user gesture
Closes #206
---
index.html | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/index.html b/index.html
index 8ca6304..62809d9 100644
--- a/index.html
+++ b/index.html
@@ -511,7 +511,9 @@
object=]'s {{Navigator}} object.
If |navigator|.{{Navigator/[[hasGamepadGesture]]}} is `false` and
- |gamepad| [=contains a gamepad user gesture=]:
+ |navigator|'s [=top-level traversable=] has [=top-level
+ traversable/system focus=] and |gamepad| [=contains a gamepad user
+ gesture=]:
- Set |navigator|.{{Navigator/[[hasGamepadGesture]]}} to
`true`.
From 9c81ec471d7163ea4b669875bfbe3dff06fe035d Mon Sep 17 00:00:00 2001
From: Matt Reynolds
Date: Fri, 10 May 2024 11:18:10 -0700
Subject: [PATCH 2/6] Add missing steps in getGamepads
Fixes #204
---
index.html | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/index.html b/index.html
index 62809d9..a13ace9 100644
--- a/index.html
+++ b/index.html
@@ -1683,8 +1683,8 @@
The {{Navigator/getGamepads()}} method steps are:
- - Let |doc| be the [=current global object=]'s [=associated
- `Document`=].
+
- Let |doc:Document?| be the [=current global object=]'s
+ [=associated `Document`=].
- If |doc| is `null` or |doc| is not [=Document/fully active=],
then return an empty [=list=].
@@ -1699,6 +1699,8 @@
- Let |now:DOMHighResTimeStamp| be the [=current high resolution
time=].
+ - Let |gamepads:sequence<Gamepad?>| be an empty [=list=].
+
- [=list/For each=] |gamepad:Gamepad| of
[=this=].{{Navigator/[[gamepads]]}}:
@@ -1711,6 +1713,8 @@
+ [=list/Append=] |gamepad| to |gamepads|.
+
Return |gamepads|.
From cc058cde27a12d72044e5cc74212fc616a06fbd9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marcos=20C=C3=A1ceres?=
Date: Fri, 9 Aug 2024 10:24:50 +1000
Subject: [PATCH 3/6] Chore(README.md): remove link to old features (#208)
---
README.md | 2 --
1 file changed, 2 deletions(-)
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).
From 3b8d37e39058bb5e8df44507d3346ec85f29fc8b Mon Sep 17 00:00:00 2001
From: Matt Reynolds
Date: Fri, 10 May 2024 14:10:25 -0700
Subject: [PATCH 4/6] Require system focus for gamepad user gesture
Closes #206
---
index.html | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/index.html b/index.html
index a13ace9..433782b 100644
--- a/index.html
+++ b/index.html
@@ -510,10 +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
- |navigator|'s [=top-level traversable=] has [=top-level
- traversable/system focus=] 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=]:
- Set |navigator|.{{Navigator/[[hasGamepadGesture]]}} to
`true`.
@@ -529,10 +532,6 @@
- Set |connectedGamepad|.{{Gamepad/[[timestamp]]}} to
|now|.
- - Let |document:Document?| be |gamepad|'s [=relevant
- global object=]'s [=associated `Document`=]; otherwise
- `null`.
-
- 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}}
From 6903dc6296db11810a6f710bc54cafc18355abd5 Mon Sep 17 00:00:00 2001
From: Matt Reynolds
Date: Fri, 10 Apr 2026 17:40:24 -0700
Subject: [PATCH 5/6] Add null check, remove duplicate step
---
index.html | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/index.html b/index.html
index 39a6386..a586dac 100644
--- a/index.html
+++ b/index.html
@@ -804,6 +804,8 @@
- Let |document:Document?| be |gamepad|'s [=relevant global
object=]'s [=associated `Document`=]; otherwise `null`.
+ - If |document| is `null`, abort these steps.
+
- If |navigator|.{{Navigator/[[hasGamepadGesture]]}} is `false` and
|document| is a [=Document/fully active descendant of a top-level
traversable with user attention=] and |gamepad| [=contains a gamepad
@@ -2113,8 +2115,6 @@
- Let |gamepads:sequence<Gamepad?>| be an empty [=list=].
- - Let |gamepads:sequence<Gamepad?>| be an empty [=list=].
-
- [=list/For each=] |gamepad:Gamepad| of
[=this=].{{Navigator/[[gamepads]]}}:
From 5ba33c8e5409d969d4ae64e54302d1e08fe74e30 Mon Sep 17 00:00:00 2001
From: Marcos Caceres
Date: Fri, 15 May 2026 09:38:19 +1000
Subject: [PATCH 6/6] ci: re-run