Skip to content

Commit ebe803f

Browse files
committed
fix: never set custom element props as attributes
1 parent 0f41689 commit ebe803f

File tree

2 files changed

+2
-2
lines changed
  • packages/svelte
    • src/compiler/phases/3-transform/client/visitors
    • tests/runtime-legacy/samples/attribute-custom-element-inheritance

2 files changed

+2
-2
lines changed

packages/svelte/src/compiler/phases/3-transform/client/visitors/template.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2152,6 +2152,7 @@ export const template_visitors = {
21522152
}
21532153

21542154
if (
2155+
!is_custom_element &&
21552156
attribute.name !== 'autofocus' &&
21562157
(attribute.value === true || is_text_attribute(attribute))
21572158
) {

packages/svelte/tests/runtime-legacy/samples/attribute-custom-element-inheritance/_config.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import { test } from '../../test';
22

33
export default test({
4-
skip: true, // TODO: needs fixing
5-
4+
mode: ['client'],
65
html: `
76
<my-custom-inheritance-element>Hello World!</my-custom-inheritance-element>
87
`

0 commit comments

Comments
 (0)