UNPKG

overscroll

Version:
22 lines (20 loc) 558 B
"use strict"; exports.__esModule = true; exports["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 }; }; };