Skip to content

Commit 9a67ab1

Browse files
authored
docs: fix section on browser requirements (#12804)
* docs: fix section on browser requirements * link
1 parent 5094cb9 commit 9a67ab1

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

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

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,15 @@ Previously, Svelte employed a very complicated algorithm to determine if whitesp
144144

145145
As before, you can disable whitespace trimming by setting the `preserveWhitespace` option in your compiler settings or on a per-component basis in `<svelte:options>`.
146146

147-
## More recent browser required
147+
## Modern browser required
148148

149-
Svelte now use Mutation Observers instead of IFrames to measure dimensions for `bind:clientWidth/clientHeight/offsetWidth/offsetHeight`. It also no longer listens to the `change` event on range inputs. Lastly, the `legacy` option was removed (or rather, replaced with a different set of settings).
149+
Svelte 5 requires a modern browser (in other words, not Internet Explorer) for various reasons:
150+
151+
- it uses [`Proxies`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy)
152+
- elements with `clientWidth`/`clientHeight`/`offsetWidth`/`offsetHeight` bindings use a [`ResizeObserver`](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver) rather than a convoluted `<iframe>` hack
153+
- `<input type="range" bind:value={...} />` only uses an `input` event listener, rather than also listening for `change` events as a fallback
154+
155+
The `legacy` compiler option, which generated bulkier but IE-friendly code, no longer exists.
150156

151157
## Changes to compiler options
152158

0 commit comments

Comments
 (0)