From 3d70962ca09feb6e980dbc31327ac65e2699af9a Mon Sep 17 00:00:00 2001
From: Matt Reynolds
Date: Fri, 10 May 2024 11:18:10 -0700
Subject: [PATCH] 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 8ca6304..6376806 100644
--- a/index.html
+++ b/index.html
@@ -1681,8 +1681,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=].
@@ -1697,6 +1697,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]]}}:
@@ -1709,6 +1711,8 @@
+ [=list/Append=] |gamepad| to |gamepads|.
+
Return |gamepads|.