ProperJS // ScrollController
Overkill scroll handling for professionals.
Installation
npm i properjs-scrollcontroller --save-dev
Usage
ScrollController doesn't use any native window or document event binding for scroll handling. Rather, it uses requestAnimationFrame and supplies extra nifty scroll events for more control.
; // Window scroll handling (RAF)const winScroll = ; winScroll; winScroll; winScroll; winScroll; winScroll; winScroll; // Inline element scroll handling (RAF)const divScroll = document ; // All the same evens apply for inline elements as document (window) scrolldivScroll;