Skip to content

Commit f18adc8

Browse files
baseballyamadummdidummbenmccannRich-Harris
authored
docs: Update Breaking changes section (#9444)
* update docs * Update sites/svelte-5-preview/src/routes/docs/content/03-appendix/02-breaking-changes.md Co-authored-by: Ben McCann <[email protected]> * Update sites/svelte-5-preview/src/routes/docs/content/03-appendix/02-breaking-changes.md * Update sites/svelte-5-preview/src/routes/docs/content/03-appendix/02-breaking-changes.md --------- Co-authored-by: Simon H <[email protected]> Co-authored-by: Ben McCann <[email protected]> Co-authored-by: Rich Harris <[email protected]>
1 parent 6bba70a commit f18adc8

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,13 @@ Previously Svelte would always insert the CSS hash last. This is no longer guara
7575
### `contenteditable` behavior change
7676

7777
If you have a `contenteditable` node with a corresponding binding _and_ a reactive value inside it (example: `<div contenteditable=true bind:textContent>count is {count}</div>`), then the value inside the contenteditable will not be updated by updates to `count` because the binding takes full control over the content immediately and it should only be updated through it.
78+
79+
### `oneventname` attributes no longer accept string values
80+
81+
In Svelte 4, it was possible to specify event attributes on HTML elements as a string:
82+
83+
```svelte
84+
<button onclick="alert('hello')">...</button>
85+
```
86+
87+
This is not recommended, and is no longer possible in Svelte 5, where properties like `onclick` replace `on:click` as the mechanism for adding [event handlers](/docs/event-handlers).

0 commit comments

Comments
 (0)