Skip to content

<svelte:element> behavior differs from using a tag literal #17164

@michael

Description

@michael

Describe the bug

I wanted to create a reproduction of a browser bug in isolation, but then realized the problem only occurs when using <svelte:element this={"h3"}> instead of <h3>.

Could this potentially be due to a Svelte bug?

More context: https://discord.com/channels/457912077277855764/1023340103071965194/threads/1439669856977813656

Reproduction

https://svelte.dev/playground/4ef986b42c134728a92755d152eb86c2?version=5.43.7

Logs

System Info

System:
    OS: macOS 26.1
    CPU: (8) arm64 Apple M2
    Memory: 176.28 MB / 8.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 24.11.1 - /Users/michael/.nvm/versions/node/v24.11.1/bin/node
    npm: 11.6.2 - /Users/michael/.nvm/versions/node/v24.11.1/bin/npm
  Browsers:
    Chrome: 142.0.7444.162
    Firefox: 145.0
    Safari: 26.1
  npmPackages:
    svelte: ^5.43.4 => 5.39.8

Severity

annoyance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions