Skip to content

Commit ccbb0b1

Browse files
authored
docs: note event attributes in breaking changes (#13217)
closes #13213
1 parent 3d5702a commit ccbb0b1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

sites/svelte-5-preview/src/routes/docs/content/03-appendix/02-breaking-changes.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,3 +398,9 @@ Since these mismatches are extremely rare, Svelte 5 assumes that the values are
398398
### Hydration works differently
399399

400400
Svelte 5 makes use of comments during server side rendering which are used for more robust and efficient hydration on the client. As such, you shouldn't remove comments from your HTML output if you intend to hydrate it, and if you manually authored HTML to be hydrated by a Svelte component, you need to adjust that HTML to include said comments at the correct positions.
401+
402+
### `onevent` attributes are delegated
403+
404+
Event attributes replace event directives: Instead of `on:click={handler}` you write `onclick={handler}`. For backwards compatibility the `on:event` syntax is still supported and behaves the same as in Svelte 4. Some of the `onevent` attributes however are delegated, which means you need to take care to not stop event propagation on those manually, as they then might never reach the listener for this event type at the root.
405+
406+
<!-- TODO in final docs, add link to corresponding section for more details -->

0 commit comments

Comments
 (0)