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/runtime/samples/event-handler-modifier-stop.../main.svelte

23 lines
331 B

<script>
export let logs = [];
export let click_1 = () => {
logs.push('click_1');
}
export let click_2 = () => {
logs.push('click_2');
}
export let click_3 = () => {
logs.push('click_3');
}
</script>
<button
on:click={click_1}
on:click|stopImmediatePropagation={click_2}
on:click={click_3}>
click me
</button>