Utilities
windowScroll
Scrolling position of window.
Usage
Demo
ScrollX: undefined
ScrollY: undefined
Utilities
Scrolling position of window.
<script>
import { onMount } from "svelte";
import { windowScroll } from "sveltronics";
let { x, y } = {};
onMount(() => {
({ x, y } = windowScroll());
})
</script>
<div>
<div>ScrollX: {$x}</div>
<div>ScrollY: {$y}</div>
</div>