lib/core/utils/scroll-state.js
function getScroll(elm) {
	const style = window.getComputedStyle(elm);
	const visibleOverflowY = style.getPropertyValue('overflow-y') === 'visible';
	const visibleOverflowX = style.getPropertyValue('overflow-x') === 'visible';

	if (
		// See if the element hides overflowing content
		(!visibleOverflowY && elm.scrollHeight > elm.clientHeight) ||
		(!visibleOverflowX && elm.scrollWidth > elm.clientWidth)
	) {
		return { elm, top: elm.scrollTop, left: elm.scrollLeft };
	}
}
function getScroll(elm) {
	const style = window.getComputedStyle(elm);
	const visibleOverflowY = style.getPropertyValue('overflow-y') === 'visible';
	const visibleOverflowX = style.getPropertyValue('overflow-x') === 'visible';

	if (
		// See if the element hides overflowing content
		(!visibleOverflowY && elm.scrollHeight > elm.clientHeight) ||
		(!visibleOverflowX && elm.scrollWidth > elm.clientWidth)
	) {
		return { elm, top: elm.scrollTop, left: elm.scrollLeft };
	}
}
function getScroll ( elm ) { const style = window . getComputedStyle ( elm ) ; const visibleOverflowY = style . getPropertyValue ( 'overflow-y' ) === 'visible' ; const visibleOverflowX = style . getPropertyValue ( 'overflow-x' ) === 'visible' ; if ( // See if the element hides overflowing content ( ! visibleOverflowY && elm . scrollHeight > elm . clientHeight ) || ( ! visibleOverflowX && elm . scrollWidth > elm . clientWidth ) ) { return { elm , top : elm . scrollTop , left : elm . scrollLeft } ; } }
Return the scroll position of scrollable elements
Return the scroll position of scrollable elements