UNPKG

overscroll

Version:
23 lines (21 loc) 586 B
"use strict"; exports.__esModule = true; exports["default"] = function (_ref) { var html = _ref.html, target = _ref.target, isPageScroll = _ref.isPageScroll; return function () { var width = void 0; var height = void 0; if (isPageScroll) { width = html.clientWidth; height = html.clientHeight; // width = win.innerWidth || html.clientWidth; // height = win.innerHeight || html.clientHeight; } else { width = target.clientWidth; height = target.clientHeight; } return { width: width, height: height }; }; };