mirror of https://github.com/sveltejs/svelte
feat: add window bind devicePixelRatio support (#8534)
closes: #8285 add window bind devicePixelRatio support, change devicePixelRatio on window resize. --------- Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>pull/8550/head
parent
f064c39d5f
commit
b7359c8361
@ -1,8 +1,10 @@
|
||||
<script>
|
||||
export let width;
|
||||
export let height;
|
||||
export let devicePixelRatio;
|
||||
</script>
|
||||
|
||||
<svelte:window bind:innerWidth={width} bind:innerHeight={height}/>
|
||||
<svelte:window bind:innerWidth={width} bind:innerHeight={height} bind:devicePixelRatio={devicePixelRatio}/>
|
||||
|
||||
<div>{width}x{height}</div>
|
||||
<div>{width}x{height}</div>
|
||||
<div>{devicePixelRatio}</div>
|
||||
|
Loading…
Reference in new issue