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

19 lines
334 B

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