mirror of https://github.com/sveltejs/svelte
parent
8983ff817d
commit
7bb43eb529
@ -1,15 +1,22 @@
|
|||||||
<script>
|
<script>
|
||||||
function handleTouchstart() {
|
function handleTouchstart() {
|
||||||
// ...
|
// ...
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleClick() {
|
function handleClick() {
|
||||||
// ...
|
// ...
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div on:touchstart={handleTouchstart}>
|
<div on:touchstart={handleTouchstart}>
|
||||||
<button on:click|stopPropagation|preventDefault={handleClick}>click me</button>
|
<button on:click|stopPropagation|preventDefault={handleClick}>
|
||||||
<button on:click|once|capture={handleClick}>or me</button>
|
click me
|
||||||
<button on:click|capture={handleClick}>or me!</button>
|
</button>
|
||||||
|
<button on:click|once|capture={handleClick}>or me</button>
|
||||||
|
<button on:click|capture={handleClick}>or me!</button>
|
||||||
|
<button
|
||||||
|
on:click|stopImmediatePropagation={handleClick}
|
||||||
|
on:click={handleTouchstart}>
|
||||||
|
or me!
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
Loading…
Reference in new issue