This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
<script>
import { onMount } from 'svelte';
onMount(resize);
function resize() {
let vh = window.innerHeight * 0.01;
document.documentElement.style.setProperty('--vh', `${vh}px`);
}
</script>
<svelte:window on:resize />
view raw
VhObserver.svelte
hosted with ❤ by
GitHub