Skip to content

xmlns attribute not present in HTMLAttributes type #16079

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
christophsanz opened this issue Jun 4, 2025 · 1 comment · Fixed by #16080
Closed

xmlns attribute not present in HTMLAttributes type #16079

christophsanz opened this issue Jun 4, 2025 · 1 comment · Fixed by #16080
Labels
good first issue A small, encapsulated issue, ideal for a new contributor to Svelte to tackle. types / typescript

Comments

@christophsanz
Copy link
Contributor

Describe the bug

When using <svelte:element> with an xmlns attribute, we get a type error, even though the attribute should be allowed.

https://www.w3schools.com/xml/xml_namespaces.asp

Reproduction

Create a <svelte:element this="div"> that is not a svg element, and add the xmlns attribute to it and notice the type error.

Logs

System Info

System:
    OS: Windows 11 10.0.22631
    CPU: (12) x64 12th Gen Intel(R) Core(TM) i7-1255U
    Memory: 11.70 GB / 31.58 GB
  Binaries:
    Node: 22.11.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 10.9.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Chromium (127.0.2651.86)
    Internet Explorer: 11.0.22621.1

Severity

annoyance

@dummdidumm dummdidumm added good first issue A small, encapsulated issue, ideal for a new contributor to Svelte to tackle. types / typescript labels Jun 4, 2025
@dummdidumm
Copy link
Member

Should be an easy fix within elements.d.ts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue A small, encapsulated issue, ideal for a new contributor to Svelte to tackle. types / typescript
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants