Hex Core JS
    Preparing search index...

    Function getScrollContainer

    • Returns the nearest relevant scrolling ancestor (any with an overflow of auto, scroll, or hidden). If none is found, null is returned. In this case the document, body, or window is the scrolling container, depending on context. Instead of returning any of these, null is returned to simplify the return type and allow for customization in the calling context.

      Parameters

      • element: HTMLElement

        The element of which to get the scroll container.

      Returns HTMLElement | null