eligius
    Preparing search index...

    Variable getScrollPositionConst

    Gets the current scroll position of the viewport.

    Returns x (horizontal) and y (vertical) scroll positions in pixels. Uses cross-browser compatible methods to retrieve scroll position.

    Operation data with scrollX and scrollY values

    // Get current scroll position
    const result = getScrollPosition({});
    // result.scrollX = 150
    // result.scrollY = 400