[w3c/gamepad] eventInitDict parameter in GamepadEvent constructor should be optional (Issue #216)

The [GamepadEvent constructor](https://w3c.github.io/gamepad/#dom-gamepadevent-constructor) is defined with two required parameters:

```
constructor(DOMString type, GamepadEventInit eventInitDict);
```

This differs from the signature in implementations which define the second parameter as optional ([blink](https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/modules/gamepad/gamepad_event.idl;drc=047c7dc4ee1ce908d7fea38ca063fa2f80f92c77), [Gecko](https://github.com/WebKit/WebKit/blob/main/Source/WebCore/Modules/gamepad/GamepadEvent.idl), [WebKit](https://searchfox.org/mozilla-central/source/dom/webidl/GamepadEvent.webidl)):

```
  constructor(DOMString type, optional GamepadEventInit eventInitDict = {}); // blink
  constructor(DOMString type, optional GamepadEventInit eventInitDict = {});  // Gecko
  constructor([AtomString] DOMString type, optional GamepadEventInit eventInitDict);  // WebKit
````

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/gamepad/issues/216
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/gamepad/issues/216@github.com>

Received on Thursday, 10 October 2024 22:14:01 UTC