mirror of https://github.com/sveltejs/svelte
fix: run render functions for dynamic void elements (#11258)
* fix: run render functions for dynamic void elements * Update packages/svelte/src/internal/client/dom/blocks/svelte-element.jspull/11260/head
parent
521d124267
commit
5ef1fdf7cc
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: run render functions for dynamic void elements
|
@ -0,0 +1,11 @@
|
||||
import { test } from '../../test';
|
||||
|
||||
export default test({
|
||||
html: `<input><input>`,
|
||||
|
||||
async test({ assert, target }) {
|
||||
const inputs = target.querySelectorAll('input');
|
||||
assert.equal(inputs[0].value, 'set from action');
|
||||
assert.equal(inputs[1].value, 'set from action');
|
||||
}
|
||||
});
|
@ -0,0 +1,9 @@
|
||||
<script>
|
||||
/** @param {HTMLInputElement} node */
|
||||
function action(node) {
|
||||
node.value = 'set from action';
|
||||
}
|
||||
</script>
|
||||
|
||||
<input use:action>
|
||||
<svelte:element this={'input'} use:action />
|
Loading…
Reference in new issue