* Gets the scroll position of the supplied element or window. * * The return values are unbounded, unlike `getScrollPosition`. This means they * may be negative or exceed the element boundaries (which is possible using * inertial scrolling). * * @param {DOMWindow|DOMElement} scrollable * @ret
(scrollable)
| 18767 | */ |
| 18768 | |
| 18769 | function getUnboundedScrollPosition(scrollable) { |
| 18770 | if (scrollable === window) { |
| 18771 | return { |
| 18772 | x: window.pageXOffset || document.documentElement.scrollLeft, |
| 18773 | y: window.pageYOffset || document.documentElement.scrollTop |
| 18774 | }; |
| 18775 | } |
| 18776 | return { |
| 18777 | x: scrollable.scrollLeft, |
| 18778 | y: scrollable.scrollTop |
| 18779 | }; |
| 18780 | } |
| 18781 | |
| 18782 | module.exports = getUnboundedScrollPosition; |
| 18783 | },{}],154:[function(_dereq_,module,exports){ |
no outgoing calls
no test coverage detected
searching dependent graphs…