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 element's scroll position.
Stop listening to and handling the element's scroll position.
Run the callback, whether there was a scroll event or not.
The
ScrollListenerclass sets up a listener that handles element scroll events.