What is the best way to detect when scrolling to an element on the page has finished? The spec says that \"The scrolling box is scrolled in a smooth fashion using a user-agent-d
The only feasible option appears to be to just wait until there aren't any more scroll events:
scroll
let timer; window.addEventListener( 'scroll', () => { clearTimeout( timer ); timer = setTimeout( () => { callback(); }, 300 ); }, { passive: true } );