mirror of https://github.com/sveltejs/svelte
Merge pull request #3350 from sveltejs/gh-2711
correctly set mount anchor for HTML tagspull/3351/head
commit
8e62bd0b27
@ -0,0 +1,14 @@
|
||||
export default {
|
||||
html: `
|
||||
<div><span>hello</span> John</div>
|
||||
<div><span>hello</span> Jill</div>
|
||||
`,
|
||||
|
||||
test({ assert, component, target }) {
|
||||
component.names = component.names.reverse();
|
||||
assert.htmlEqual(target.innerHTML, `
|
||||
<div><span>hello</span> Jill</div>
|
||||
<div><span>hello</span> John</div>
|
||||
`);
|
||||
}
|
||||
};
|
@ -0,0 +1,11 @@
|
||||
<script>
|
||||
export let names = ['John', 'Jill'];
|
||||
</script>
|
||||
|
||||
{#each names as name (name)}
|
||||
<div>
|
||||
<span>hello</span>
|
||||
{@html name}
|
||||
</div>
|
||||
{/each}
|
||||
|
Loading…
Reference in new issue