mirror of https://github.com/sveltejs/svelte
fix actions having no access to parent nodes (#4252)
parent
3d9655a2a1
commit
a422d2aba5
@ -0,0 +1,8 @@
|
||||
const result = {};
|
||||
|
||||
export default {
|
||||
props: { result },
|
||||
async test({ assert, component, target, window }) {
|
||||
assert.notEqual(result.parentElement, null);
|
||||
}
|
||||
};
|
@ -0,0 +1,8 @@
|
||||
<script>
|
||||
export let result;
|
||||
function onMountAction(node) {
|
||||
result.parentElement = node.parentElement;
|
||||
}
|
||||
</script>
|
||||
|
||||
<h1 use:onMountAction>Hello!</h1>
|
Loading…
Reference in new issue