feat: add content-visibility: auto state change event (#14373)

* add contentvisibilityautostatechange event

* changeset

* Update .changeset/kind-horses-lay.md

* Update .changeset/kind-horses-lay.md

---------

Co-authored-by: Rich Harris <hello@rich-harris.dev>
pull/14366/head
Frédéric Crozatier 2 months ago committed by GitHub
parent 4dfa0e31fe
commit 7bd1cdf427
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -0,0 +1,5 @@
---
'svelte': patch
---
add `contentvisibilityautostatechange` event to element definitions

@ -60,6 +60,10 @@ export type AnimationEventHandler<T extends EventTarget> = EventHandler<Animatio
export type TransitionEventHandler<T extends EventTarget> = EventHandler<TransitionEvent, T>; export type TransitionEventHandler<T extends EventTarget> = EventHandler<TransitionEvent, T>;
export type MessageEventHandler<T extends EventTarget> = EventHandler<MessageEvent, T>; export type MessageEventHandler<T extends EventTarget> = EventHandler<MessageEvent, T>;
export type ToggleEventHandler<T extends EventTarget> = EventHandler<ToggleEvent, T>; export type ToggleEventHandler<T extends EventTarget> = EventHandler<ToggleEvent, T>;
export type ContentVisibilityAutoStateChangeEventHandler<T extends EventTarget> = EventHandler<
ContentVisibilityAutoStateChangeEvent,
T
>;
export type FullAutoFill = export type FullAutoFill =
| AutoFill | AutoFill
@ -157,6 +161,20 @@ export interface DOMAttributes<T extends EventTarget> {
ontoggle?: ToggleEventHandler<T> | undefined | null; ontoggle?: ToggleEventHandler<T> | undefined | null;
ontogglecapture?: ToggleEventHandler<T> | undefined | null; ontogglecapture?: ToggleEventHandler<T> | undefined | null;
// Content visibility Events
'on:contentvisibilityautostatechange'?:
| ContentVisibilityAutoStateChangeEventHandler<T>
| undefined
| null;
oncontentvisibilityautostatechange?:
| ContentVisibilityAutoStateChangeEventHandler<T>
| undefined
| null;
oncontentvisibilityautostatechangecapture?:
| ContentVisibilityAutoStateChangeEventHandler<T>
| undefined
| null;
// Keyboard Events // Keyboard Events
'on:keydown'?: KeyboardEventHandler<T> | undefined | null; 'on:keydown'?: KeyboardEventHandler<T> | undefined | null;
onkeydown?: KeyboardEventHandler<T> | undefined | null; onkeydown?: KeyboardEventHandler<T> | undefined | null;

Loading…
Cancel
Save