UNPKG

vanillajs-browser-helpers

Version:

Collection of convenience code snippets (helpers) that aims to make it a little easier to work with vanilla JS in the browser

8 lines (7 loc) 252 B
/** * Get the parent element that has scrolling * * @param elm - The element whose scroll parent is determined * @return The scroll parent or the viewport */ export default function scrollParent(elm: Element): Element | HTMLElement | null;