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/js/samples/event-modifiers/input.svelte

15 lines
344 B

<script>
function handleTouchstart() {
// ...
}
function handleClick() {
// ...
}
</script>
<div on:touchstart={handleTouchstart}>
<button on:click|stopPropagation|preventDefault={handleClick}>click me</button>
<button on:click|once|capture={handleClick}>or me</button>
<button on:click|capture={handleClick}>or me!</button>
</div>