code: 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 };
  	}
  }
docs: Return the scroll position of scrollable elements