Skip to content

getAllParentScroller ​

Retrieves all scrollable ancestor elements of an element in an array, including the window as the last item.

Usage ​

ts
import { getAllParentScroller } from 'rattail'

const scrollers = getAllParentScroller(document.querySelector('div'))

Arguments ​

ArgTypeDefaults
elHTMLElement

Return ​

Type
Array<HTMLElement | Window>