fix: never set custom element props as attributes (#12622)

* fix: never set custom element props as attributes

* changeset

---------

Co-authored-by: Rich Harris <rich.harris@vercel.com>
pull/12613/head
Simon H 1 year ago committed by GitHub
parent 0f41689916
commit 32af9434bc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -0,0 +1,5 @@
---
"svelte": patch
---
fix: never set custom element props as attributes inside templates

@ -2152,6 +2152,7 @@ export const template_visitors = {
} }
if ( if (
!is_custom_element &&
attribute.name !== 'autofocus' && attribute.name !== 'autofocus' &&
(attribute.value === true || is_text_attribute(attribute)) (attribute.value === true || is_text_attribute(attribute))
) { ) {

@ -1,8 +1,7 @@
import { test } from '../../test'; import { test } from '../../test';
export default test({ export default test({
skip: true, // TODO: needs fixing mode: ['client'],
html: ` html: `
<my-custom-inheritance-element>Hello World!</my-custom-inheritance-element> <my-custom-inheritance-element>Hello World!</my-custom-inheritance-element>
` `

Loading…
Cancel
Save