diff --git a/.changeset/true-baths-juggle.md b/.changeset/true-baths-juggle.md new file mode 100644 index 0000000000..ccaf4c263c --- /dev/null +++ b/.changeset/true-baths-juggle.md @@ -0,0 +1,5 @@ +--- +'svelte': minor +--- + +feat: add scrollWidth/scrollHeight to the list of bindable properties diff --git a/documentation/docs/03-template-syntax/12-bind.md b/documentation/docs/03-template-syntax/12-bind.md index b93f207e71..24113c1e40 100644 --- a/documentation/docs/03-template-syntax/12-bind.md +++ b/documentation/docs/03-template-syntax/12-bind.md @@ -325,6 +325,8 @@ All visible elements have the following readonly bindings, measured with a `Resi - [`clientHeight`](https://developer.mozilla.org/en-US/docs/Web/API/Element/clientHeight) - [`offsetWidth`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetWidth) - [`offsetHeight`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetHeight) +- [`scrollWidth`](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollWidth) +- [`scrollHeight`](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollHeight) - [`contentRect`](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserverEntry/contentRect) - [`contentBoxSize`](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserverEntry/contentBoxSize) - [`borderBoxSize`](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserverEntry/borderBoxSize) diff --git a/documentation/docs/07-misc/07-v5-migration-guide.md b/documentation/docs/07-misc/07-v5-migration-guide.md index 9b1f2dec63..78fd2ee7cd 100644 --- a/documentation/docs/07-misc/07-v5-migration-guide.md +++ b/documentation/docs/07-misc/07-v5-migration-guide.md @@ -709,7 +709,7 @@ As before, you can disable whitespace trimming by setting the `preserveWhitespac Svelte 5 requires a modern browser (in other words, not Internet Explorer) for various reasons: - it uses [`Proxies`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy) -- elements with `clientWidth`/`clientHeight`/`offsetWidth`/`offsetHeight` bindings use a [`ResizeObserver`](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver) rather than a convoluted `