mirror of https://github.com/sveltejs/svelte
fix: ensure use directives execute in the correct sequence (#13384)
Fixes #13382. This PR ensures that action directives are now executed in the same sequence as Svelte 4, so child element before parent element.pull/13394/head
parent
d4230049da
commit
2531658046
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: ensure use directives execute in the correct sequence
|
@ -0,0 +1,7 @@
|
||||
import { test } from '../../test';
|
||||
|
||||
export default test({
|
||||
async test({ assert, logs }) {
|
||||
assert.deepEqual(logs, ['1', '2', '3', '4', '5', '6']);
|
||||
}
|
||||
});
|
@ -0,0 +1,18 @@
|
||||
<script>
|
||||
const action = (element) => {
|
||||
console.log(element.id);
|
||||
};
|
||||
</script>
|
||||
|
||||
<div use:action id="5">
|
||||
<div use:action id="3">
|
||||
<div use:action id="1">
|
||||
</div>
|
||||
<div use:action id="2">
|
||||
</div>
|
||||
</div>
|
||||
<div use:action id="4">
|
||||
</div>
|
||||
</div>
|
||||
<div use:action id="6">
|
||||
</div>
|
Loading…
Reference in new issue