diff --git a/.changeset/late-crabs-lay.md b/.changeset/late-crabs-lay.md new file mode 100644 index 0000000000..26a2504a37 --- /dev/null +++ b/.changeset/late-crabs-lay.md @@ -0,0 +1,5 @@ +--- +'svelte': patch +--- + +feat: add `gamepadconnected` and `gamepaddisconnected` events diff --git a/packages/svelte/elements.d.ts b/packages/svelte/elements.d.ts index a456340283..09df6ddbc8 100644 --- a/packages/svelte/elements.d.ts +++ b/packages/svelte/elements.d.ts @@ -53,6 +53,7 @@ export type KeyboardEventHandler = EventHandler = EventHandler; export type TouchEventHandler = EventHandler; export type PointerEventHandler = EventHandler; +export type GamepadEventHandler = EventHandler; export type UIEventHandler = EventHandler; export type WheelEventHandler = EventHandler; export type AnimationEventHandler = EventHandler; @@ -336,6 +337,12 @@ export interface DOMAttributes { onlostpointercapture?: PointerEventHandler | undefined | null; onlostpointercapturecapture?: PointerEventHandler | undefined | null; + // Gamepad Events + 'on:gamepadconnected'?: GamepadEventHandler | undefined | null; + ongamepadconnected?: GamepadEventHandler | undefined | null; + 'on:gamepaddisconnected'?: GamepadEventHandler | undefined | null; + ongamepaddisconnected?: GamepadEventHandler | undefined | null; + // UI Events 'on:scroll'?: UIEventHandler | undefined | null; onscroll?: UIEventHandler | undefined | null;