diff --git a/.changeset/kind-horses-lay.md b/.changeset/kind-horses-lay.md new file mode 100644 index 000000000000..d08bdde6c415 --- /dev/null +++ b/.changeset/kind-horses-lay.md @@ -0,0 +1,5 @@ +--- +'svelte': patch +--- + +add `contentvisibilityautostatechange` event to element definitions diff --git a/packages/svelte/elements.d.ts b/packages/svelte/elements.d.ts index 8746b29e250a..8b2d388bf81c 100644 --- a/packages/svelte/elements.d.ts +++ b/packages/svelte/elements.d.ts @@ -60,6 +60,10 @@ export type AnimationEventHandler = EventHandler = EventHandler; export type MessageEventHandler = EventHandler; export type ToggleEventHandler = EventHandler; +export type ContentVisibilityAutoStateChangeEventHandler = EventHandler< + ContentVisibilityAutoStateChangeEvent, + T +>; export type FullAutoFill = | AutoFill @@ -157,6 +161,20 @@ export interface DOMAttributes { ontoggle?: ToggleEventHandler | undefined | null; ontogglecapture?: ToggleEventHandler | undefined | null; + // Content visibility Events + 'on:contentvisibilityautostatechange'?: + | ContentVisibilityAutoStateChangeEventHandler + | undefined + | null; + oncontentvisibilityautostatechange?: + | ContentVisibilityAutoStateChangeEventHandler + | undefined + | null; + oncontentvisibilityautostatechangecapture?: + | ContentVisibilityAutoStateChangeEventHandler + | undefined + | null; + // Keyboard Events 'on:keydown'?: KeyboardEventHandler | undefined | null; onkeydown?: KeyboardEventHandler | undefined | null;