From 10a908ee787645648eeae2a563a56314d1b93ea5 Mon Sep 17 00:00:00 2001 From: Simon Holthausen Date: Sat, 16 Mar 2024 22:19:06 +0100 Subject: [PATCH] this is a breaking change, strictly speaking --- .../routes/docs/content/03-appendix/02-breaking-changes.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sites/svelte-5-preview/src/routes/docs/content/03-appendix/02-breaking-changes.md b/sites/svelte-5-preview/src/routes/docs/content/03-appendix/02-breaking-changes.md index 205bdd2bf2..ae913c72b1 100644 --- a/sites/svelte-5-preview/src/routes/docs/content/03-appendix/02-breaking-changes.md +++ b/sites/svelte-5-preview/src/routes/docs/content/03-appendix/02-breaking-changes.md @@ -179,3 +179,7 @@ In Svelte 4, `null` and `undefined` were printed as the corresponding string. In ### `bind:files` values can only be `null`, `undefined` or `FileList` `bind:files` is now a two-way binding. As such, when setting a value, it needs to be either falsy (`null` or `undefined`) or of type `FileList`. + +### Bindings now react to form resets + +Previously, calling `form.reset()` wasn't notified by bindings, as such values could get out of sync with the DOM. Svelte 5 fixes this by placing a `reset` listener on the document and invoking bindings where necessary.