You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that Svelte behaves differently when it comes to setting properties to a custom element.
When the custom element is autonomous (eg <my-element>), it behaves correctly, passing the attributes as properties.
If instead the custom element extends a builtin element (eg <a is="my-link">) Svelte does not pass the attributes as properties.
The problem I guess comes from this check that checks only the name tag of the node:
Describe the bug
I noticed that Svelte behaves differently when it comes to setting properties to a custom element.
When the custom element is autonomous (eg
<my-element>
), it behaves correctly, passing the attributes as properties.If instead the custom element extends a builtin element (eg
<a is="my-link">
) Svelte does not pass the attributes as properties.The problem I guess comes from this check that checks only the name tag of the node:
svelte/packages/svelte/src/compiler/phases/nodes.js
Line 28 in 09510c8
Reproduction
https://svelte.dev/playground/hello-world?version=5.19.1#H4sIAAAAAAAAE62NsY7CMBBEf2W1DU1IeitEQjRX3B8QpGxgkQyObXk3XFCUfz_5Du4aSqqRnmbmzehpYDS4G0XDAOx4YK8CyqJY4Nk6FjT7GfUecy8DLJ6rbYyl3NhpZj0Jv-LH4DV_osF6Wj8MEPoLH3Uzzz8qA6sPdi7AV0jutIJlaT5DuAIpDHcg1WT7UVlK6H6HHViBSCJ8AhIgiCnEsq7-BE3r6z5BlZPAyqbFae2sv7b4brf_L5V1RU3rsUDlSdFoGnk5LN_Mqu7kZwEAAA==
Logs
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: