Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
lobsterthief
· 2y ago · 0 comments
Won’t you still need some smooth-scrolling JS for cases where you’re scrolling to an element dynamically? Like when updating a route without a full page load or click.
Comments
[–]
Vorh
2y ago
Nope!
Element.scrollIntoView({ behavior: 'smooth' });
https://developer.mozilla.org/en-US/docs/Web/API/Element/scr...