Sign up (with export icon)

utils/dom/findclosestscrollableancestor

Api-module icon module

Functions

  • Chevron-right icon

    findClosestScrollableAncestor( domElement ) → null | HTMLElement

    Returns the closest scrollable ancestor of a DOM element.

    Parameters

    domElement : HTMLElement

    DOM element.

    Returns

    null | HTMLElement

    First ancestor of domElement that is scrollable or null if such ancestor doesn't exist.