Skip to content

Commit 2719894

Browse files
Fix for issue #587: remove some deprecated on:click (#589)
1 parent 0f96cdd commit 2719894

File tree

2 files changed

+4
-4
lines changed
  • apps/svelte.dev/content/tutorial
    • 01-svelte/04-logic/04-each-blocks
    • 02-advanced-svelte/08-script-module/02-module-exports

2 files changed

+4
-4
lines changed

apps/svelte.dev/content/tutorial/01-svelte/04-logic/04-each-blocks/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Instead of laboriously copying, pasting and editing, we can get rid of all but t
1414
style="background: red"
1515
aria-label="red"
1616
aria-current={selected === 'red'}
17-
on:click={() => selected = 'red'}
17+
onclick={() => selected = 'red'}
1818
></button>
1919
+++{/each}+++
2020
</div>
@@ -32,7 +32,7 @@ Now we need to use the `color` variable in place of `"red"`:
3232
style="background: +++{color}+++"
3333
aria-label=+++{color}+++
3434
aria-current={selected === +++color+++}
35-
on:click={() => selected = +++color+++}
35+
onclick={() => selected = +++color+++}
3636
></button>
3737
{/each}
3838
</div>
@@ -48,7 +48,7 @@ You can get the current _index_ as a second argument, like so:
4848
style="background: {color}"
4949
aria-label={color}
5050
aria-current={selected === color}
51-
on:click={() => selected = color}
51+
onclick={() => selected = color}
5252
>+++{i + 1}+++</button>
5353
{/each}
5454
</div>

apps/svelte.dev/content/tutorial/02-advanced-svelte/08-script-module/02-module-exports/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ We can now import `stopAll` in `App.svelte`...
3434
<AudioPlayer {...track} />
3535
{/each}
3636
37-
+++ <button on:click={stopAll}>
37+
+++ <button onclick={stopAll}>
3838
stop all
3939
</button>+++
4040
</div>

0 commit comments

Comments
 (0)