You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte/test/custom-elements/samples/action/main.svelte

21 lines
319 B

<svelte:options customElement="custom-element" />
<script>
export let name;
export let events = [];
function action(_node, name) {
events.push(name);
return {
update(name) {
events.push(name);
},
destroy() {
events.push("destroy");
},
};
}
</script>
<div use:action={name}>action</div>