UNPKG

overscroll

Version:
19 lines (18 loc) 512 B
export default (function (_ref) { var body = _ref.body, html = _ref.html, target = _ref.target, isPageScroll = _ref.isPageScroll; return function () { var width = void 0; var height = void 0; if (isPageScroll) { width = Math.max(html.scrollWidth, body.scrollWidth); height = Math.max(html.scrollHeight, body.scrollHeight); } else { width = target.scrollWidth; height = target.scrollHeight; } return { width: width, height: height }; }; });