Skip to content

xmlns attribute not present in HTMLAttributes type #16079

Closed
@christophsanz

Description

@christophsanz

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueA small, encapsulated issue, ideal for a new contributor to Svelte to tackle.types / typescript

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions