From 2680e16f948be620dbb147977d5523b57caddcf2 Mon Sep 17 00:00:00 2001 From: Matt Reynolds Date: Thu, 10 Oct 2024 15:15:35 -0700 Subject: [PATCH 1/3] Make eventInitDict param optional in GamepadEvent constructor Closes #216 --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 6376806..a5d074a 100644 --- a/index.html +++ b/index.html @@ -1752,7 +1752,7 @@

[Exposed=Window] interface GamepadEvent: Event { - constructor(DOMString type, GamepadEventInit eventInitDict); + constructor(DOMString type, optional GamepadEventInit eventInitDict); [SameObject] readonly attribute Gamepad gamepad; }; From b89a0e5ba12315d5f4dee479e7d5bed72e40f4ce Mon Sep 17 00:00:00 2001 From: Matt Reynolds Date: Thu, 10 Oct 2024 15:34:08 -0700 Subject: [PATCH 2/3] Default value --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index a5d074a..e0b0eb0 100644 --- a/index.html +++ b/index.html @@ -1752,7 +1752,7 @@

[Exposed=Window] interface GamepadEvent: Event { - constructor(DOMString type, optional GamepadEventInit eventInitDict); + constructor(DOMString type, optional GamepadEventInit eventInitDict = {}); [SameObject] readonly attribute Gamepad gamepad; }; From 5cac8aac6d78465e08b8a63dddd2147a9c9a2d73 Mon Sep 17 00:00:00 2001 From: Matt Reynolds Date: Thu, 10 Oct 2024 17:52:10 -0700 Subject: [PATCH 3/3] Make gamepad member optional and nullable in GamepadEventInit --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index e0b0eb0..a84ed31 100644 --- a/index.html +++ b/index.html @@ -1771,7 +1771,7 @@

         dictionary GamepadEventInit : EventInit {
-          required Gamepad gamepad;
+          Gamepad? gamepad = null;
         };