@exadel/esl
Version:
Exadel Smart Library (ESL) is the lightweight custom elements library that provide a set of super-flexible components
28 lines (27 loc) • 1.29 kB
TypeScript
/**
* Get the list of all scroll parents, up the list of ancestors until we get to the top window object.
* @param element - element for which you want to get the list of all scroll parents
* @param root - element which element considered a final scrollable parent target (optional, defaults to element.ownerDocument?.body)
*/
export declare function getListScrollParents(element: Element, root?: Element): Element[];
/**
* Get the scroll parent of the specified element in the DOM tree.
* @param node - element for which to get the scroll parent
* @param root - element which element considered a final scrollable parent
*/
export declare function getScrollParent(node: Element, root: Element): Element | undefined;
/**
* Get the scroll parent of the specified element in the DOM tree.
* @param node - element for which to get the scroll parent
*/
export declare function getScrollParent(node: Element): Element;
/**
* Check that element is scroll parent.
* @param element - element for checking
* */
export declare function isScrollable(element: Element): boolean;
/**
* Get the element that is the viewport for the specified element.
* @param node - element for which to get the viewport
*/
export declare function getViewportForEl(node: Element): Element | undefined;