The callback to run when the scroll position changes.
ProtectedOn each animation frame, as long as the listener is active, run the
update method.
ProtectedloopProtectedOn each animation frame, as long as the listener is active, run the
update method.
Start listening to and handling the window's scroll position.
Stop listening to and handling the window's scroll position.
Run the callback, whether there was a scroll event or not.
The
ScrollListenerclass sets up a listener that handles window scroll events.