Skip to content

Commit a71f359

Browse files
fix: Add data-* to svg attributes (#9036)
* Add data-* to svg attributes * Create twelve-suits-drive.md
1 parent 5cd4f77 commit a71f359

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

.changeset/twelve-suits-drive.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"svelte": patch
3+
---
4+
5+
fix: Add data-* to svg attributes

packages/svelte/elements.d.ts

+3
Original file line numberDiff line numberDiff line change
@@ -1451,6 +1451,9 @@ export interface SVGAttributes<T extends EventTarget> extends AriaAttributes, DO
14511451
yChannelSelector?: string | undefined | null;
14521452
z?: number | string | undefined | null;
14531453
zoomAndPan?: string | undefined | null;
1454+
1455+
// allow any data- attribute
1456+
[key: `data-${string}`]: any;
14541457
}
14551458

14561459
export interface HTMLWebViewAttributes extends HTMLAttributes<HTMLElement> {

0 commit comments

Comments
 (0)