mirror of https://github.com/sveltejs/svelte
fix: mark custom element with virtual class attribute as dynamic (#13435)
Closes #13426pull/13533/head
parent
65ca213f29
commit
3d30067370
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'svelte': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix: mark custom element with virtual class attribute as dynamic
|
@ -0,0 +1,9 @@
|
|||||||
|
import { test } from '../../test';
|
||||||
|
|
||||||
|
export default test({
|
||||||
|
async test({ assert, target, logs }) {
|
||||||
|
const [my_element, my_element_1] = target.querySelectorAll('my-element');
|
||||||
|
assert.equal(my_element.classList.contains('svelte-1koh33s'), true);
|
||||||
|
assert.equal(my_element_1.classList.contains('svelte-1koh33s'), true);
|
||||||
|
}
|
||||||
|
});
|
@ -0,0 +1,11 @@
|
|||||||
|
<div>
|
||||||
|
<my-element></my-element>
|
||||||
|
</div>
|
||||||
|
<my-element></my-element>
|
||||||
|
|
||||||
|
|
||||||
|
<style>
|
||||||
|
my-element{
|
||||||
|
background: red;
|
||||||
|
}
|
||||||
|
</style>
|
Loading…
Reference in new issue