mirror of https://github.com/sveltejs/svelte
parent
f1986da755
commit
3f5616c141
@ -0,0 +1,14 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"code": "mixed_event_handler_syntaxes",
|
||||||
|
"message": "Mixing old (on:click) and new syntaxes for event handling is not allowed. Use only the onclick syntax.",
|
||||||
|
"start": {
|
||||||
|
"line": 11,
|
||||||
|
"column": 8
|
||||||
|
},
|
||||||
|
"end": {
|
||||||
|
"line": 11,
|
||||||
|
"column": 22
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
@ -0,0 +1,11 @@
|
|||||||
|
<script>
|
||||||
|
let { foo } = $props();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!-- ok -->
|
||||||
|
<button onclick={foo}>click me</button>
|
||||||
|
<Button on:click={foo}>click me</Button>
|
||||||
|
<Button on:click={foo}>click me</Button>
|
||||||
|
|
||||||
|
<!-- error -->
|
||||||
|
<button on:click={foo}>click me</button>
|
||||||
Loading…
Reference in new issue