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-event-methods/main.html

13 lines
308 B

<script>
export let foo = false;
export let bar = false;
</script>
<div on:click='{() => foo = true}'>
<button class='allow-propagation'>click me</button>
</div>
<div on:click='{() => bar = true}'>
<button class='stop-propagation' on:click='{event => event.stopPropagation()}'>click me</button>
</div>