Tweakr
    Preparing search index...

    Function getScrollPosition

    • Returns the current scroll position of the window.

      Returns { x: number; y: number }

      An object containing x (horizontal) and y (vertical) scroll coordinates.

      const { x, y } = getScrollPosition();
      console.log(`Scroll X: ${x}, Scroll Y: ${y}`);

      1.1.0