mirror of https://github.com/sveltejs/svelte
551 B
551 B
title |
---|
svelte/reactivity/window |
This module exports reactive versions of various window
values, each of which has a reactive current
property that you can reference in reactive contexts (templates, deriveds and effects) without using <svelte:window>
bindings or manually creating your own event listeners.
<script>
import { innerWidth, innerHeight } from 'svelte/reactivity/window';
</script>
<p>{innerWidth.current}x{innerHeight.current}</p>
MODULE: svelte/reactivity/window