mirror of https://github.com/sveltejs/svelte
use anchor.parentNode as target instead of slot document fragment - fixes #850
parent
40df1c64ac
commit
0a0f474e43
@ -0,0 +1 @@
|
|||||||
|
<slot/>
|
@ -0,0 +1,13 @@
|
|||||||
|
export default {
|
||||||
|
html: `
|
||||||
|
<p>disabled</p>
|
||||||
|
<p>unconditional</p>`,
|
||||||
|
|
||||||
|
test(assert, component, target) {
|
||||||
|
component.set({ enabled: true });
|
||||||
|
assert.htmlEqual(target.innerHTML, `
|
||||||
|
<p>enabled</p>
|
||||||
|
<p>unconditional</p>
|
||||||
|
`);
|
||||||
|
}
|
||||||
|
};
|
@ -0,0 +1,19 @@
|
|||||||
|
<Nested>
|
||||||
|
{{#if !enabled}}
|
||||||
|
<p>disabled</p>
|
||||||
|
{{else}}
|
||||||
|
<p>enabled</p>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
<p>unconditional</p>
|
||||||
|
</Nested>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import Nested from './Nested.html';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
Nested
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
Loading…
Reference in new issue