w3c / gamepad

Gamepad
https://w3c.github.io/gamepad/
Other
142 stars 48 forks source link

eventInitDict parameter in GamepadEvent constructor should be optional #216

Open nondebug opened 1 month ago

nondebug commented 1 month ago

The 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, Gecko, WebKit):

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