You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<script>
let clientWidth;
</script>
<svelte:windowbind:clientWidth />
It will throw the following error which is very descriptive:
'clientWidth' is not a valid binding on svelte:window — valid bindings are innerWidth, innerHeight, outerWidth, outerHeight, scrollX, scrollY, devicePixelRatio or online (5:15)
If I do the equivalent in Svelte 5:
<script>
let clientWidth =$state();
</script>
<svelte:windowbind:clientWidth />
It will throw the following error:
'Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element'
Svelte 4:
'clientWidth' is not a valid binding on <svelte:window>; — valid bindings are innerWidth, innerHeight, outerWidth, outerHeight, scrollX, scrollY, devicePixelRatio or online (5:15)
Svelte 5:
Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type'Element'. in App.svelte
System Info
Svelte 4 (REPL)
Svelte 5 (REPL)
Severity
annoyance
The text was updated successfully, but these errors were encountered:
Describe the bug
On Svelte 4 if i try to do something like this:
It will throw the following error which is very descriptive:
'clientWidth' is not a valid binding on svelte:window — valid bindings are innerWidth, innerHeight, outerWidth, outerHeight, scrollX, scrollY, devicePixelRatio or online (5:15)
If I do the equivalent in Svelte 5:
It will throw the following error:
'Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element'
Reproduction
Svelte 4: REPL
Svelte 5: REPL
Logs
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: