Programmatic scrolling APIs gained a Promise completion signal in 2026. Code can wait for smooth scrolling to finish before highlighting a target or starting the next action, instead of guessing with a timer.
The demo scrolls to a target row and only then highlights it. Where promise return values are unavailable, use `scrollend` or another completion signal.
When to use
Use it when a guided highlight must start only after a target has been scrolled into view.