Basically, I would like to do preprocessing before scrolling through the DOM elements. The problem is that the scroll event is fired AFTER the DOM elements scroll. I know that when you use the mouse wheel to scroll, the mouse scroll event is fired until the DOM elements scroll, although it does not provide you with the expected scroll position, and this is only one type of scroll. I am wondering if there is any event that fires for each scroll method (e.g. mousewheel, dragging the scroll bar, pressing the down arrow, etc.) BEFORE scrolling the DOM elements. This should not be an event. I am not trying to move to a specific position, so scrollTo will not apply.
Scrolling event chain: Custom scrolls β DOM elements physically scroll β onScroll event fires β process material
Target chain of events: Custom scrolls β some event is captured and does what I want to do β DOM elements are physically scrolled β onScroll event is fired β process the material
Chris hong
source share