Skip to content

Fix for issue #587: remove some deprecated on:click #589

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Instead of laboriously copying, pasting and editing, we can get rid of all but t
style="background: red"
aria-label="red"
aria-current={selected === 'red'}
on:click={() => selected = 'red'}
onclick={() => selected = 'red'}
></button>
+++{/each}+++
</div>
Expand All @@ -32,7 +32,7 @@ Now we need to use the `color` variable in place of `"red"`:
style="background: +++{color}+++"
aria-label=+++{color}+++
aria-current={selected === +++color+++}
on:click={() => selected = +++color+++}
onclick={() => selected = +++color+++}
></button>
{/each}
</div>
Expand All @@ -48,7 +48,7 @@ You can get the current _index_ as a second argument, like so:
style="background: {color}"
aria-label={color}
aria-current={selected === color}
on:click={() => selected = color}
onclick={() => selected = color}
>+++{i + 1}+++</button>
{/each}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ We can now import `stopAll` in `App.svelte`...
<AudioPlayer {...track} />
{/each}

+++ <button on:click={stopAll}>
+++ <button onclick={stopAll}>
stop all
</button>+++
</div>
Expand Down