Skip to content

Commit 8d8fdb8

Browse files
fix: add xmlns attribute to HTMLAttributes type (#16080)
* Add `xmlns` attribute to HTMLAttributes type The `xmlns` attribute is not only allowed on SVG elements, but on all HTML elements. * move to DOMAttributes --------- Co-authored-by: Rich Harris <[email protected]>
1 parent 8faa178 commit 8d8fdb8

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.changeset/metal-rivers-laugh.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'svelte': patch
3+
---
4+
5+
fix: move xmlns attribute from SVGAttributes to to DOMAttributes

packages/svelte/elements.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,8 @@ export interface DOMAttributes<T extends EventTarget> {
463463
'on:fullscreenerror'?: EventHandler<Event, T> | undefined | null;
464464
onfullscreenerror?: EventHandler<Event, T> | undefined | null;
465465
onfullscreenerrorcapture?: EventHandler<Event, T> | undefined | null;
466+
467+
xmlns?: string | undefined | null;
466468
}
467469

468470
// All the WAI-ARIA 1.1 attributes from https://www.w3.org/TR/wai-aria-1.1/
@@ -1809,7 +1811,6 @@ export interface SVGAttributes<T extends EventTarget> extends AriaAttributes, DO
18091811
'xlink:type'?: string | undefined | null;
18101812
'xml:base'?: string | undefined | null;
18111813
'xml:lang'?: string | undefined | null;
1812-
xmlns?: string | undefined | null;
18131814
'xmlns:xlink'?: string | undefined | null;
18141815
'xml:space'?: string | undefined | null;
18151816
y1?: number | string | undefined | null;

0 commit comments

Comments
 (0)