mirror of https://github.com/sveltejs/svelte
parent
769e03296f
commit
aa203973e0
@ -0,0 +1,16 @@
|
|||||||
|
<button on:click|passive="handleClick()"></button>
|
||||||
|
<div on:touchstart|passive="handleTouchstart()"></div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
methods: {
|
||||||
|
handleTouchstart() {
|
||||||
|
// ...
|
||||||
|
},
|
||||||
|
|
||||||
|
handleClick() {
|
||||||
|
// ...
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
@ -0,0 +1,32 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"message": "The passive modifier only works with wheel and touch events",
|
||||||
|
"code": "redundant-event-modifier",
|
||||||
|
"start": {
|
||||||
|
"line": 1,
|
||||||
|
"column": 8,
|
||||||
|
"character": 8
|
||||||
|
},
|
||||||
|
"end": {
|
||||||
|
"line": 1,
|
||||||
|
"column": 40,
|
||||||
|
"character": 40
|
||||||
|
},
|
||||||
|
"pos": 8
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"message": "Touch event handlers that don't use the 'event' object are passive by default",
|
||||||
|
"code": "redundant-event-modifier",
|
||||||
|
"start": {
|
||||||
|
"line": 2,
|
||||||
|
"column": 5,
|
||||||
|
"character": 56
|
||||||
|
},
|
||||||
|
"end": {
|
||||||
|
"line": 2,
|
||||||
|
"column": 47,
|
||||||
|
"character": 98
|
||||||
|
},
|
||||||
|
"pos": 56
|
||||||
|
}
|
||||||
|
]
|
Loading…
Reference in new issue