mirror of https://github.com/sveltejs/svelte
fix: correctly handle ssr for `reactivity/window` (#14681)
parent
1d7f0fe313
commit
edfc0a9c6a
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: correctly handle ssr for `reactivity/window`
|
@ -0,0 +1 @@
|
||||
<!--[--><p>devicePixelRatio: </p> <p>innerHeight: </p> <p>innerWidth: </p> <p>online: </p> <p>outerHeight: </p> <p>outerWidth: </p> <p>screenLeft: </p> <p>screenTop: </p> <p>scrollX: </p> <p>scrollY: </p><!--]-->
|
@ -0,0 +1,14 @@
|
||||
<script>
|
||||
import { devicePixelRatio, innerHeight, innerWidth, online, outerHeight, outerWidth, screenLeft, screenTop, scrollX, scrollY } from "svelte/reactivity/window";
|
||||
</script>
|
||||
|
||||
<p>devicePixelRatio: {devicePixelRatio.current}</p>
|
||||
<p>innerHeight: {innerHeight.current}</p>
|
||||
<p>innerWidth: {innerWidth.current}</p>
|
||||
<p>online: {online.current}</p>
|
||||
<p>outerHeight: {outerHeight.current}</p>
|
||||
<p>outerWidth: {outerWidth.current}</p>
|
||||
<p>screenLeft: {screenLeft.current}</p>
|
||||
<p>screenTop: {screenTop.current}</p>
|
||||
<p>scrollX: {scrollX.current}</p>
|
||||
<p>scrollY: {scrollY.current}</p>
|
Loading…
Reference in new issue