The Element.scrollIntoView() method scrolls the current element into the visible area of the browser window.
Syntax
element.scrollIntoView(); // Equivalent to element.scrollIntoView(true)
element.scrollIntoView(alignToTop); // Boolean arguments
element.scrollIntoView(scrollIntoViewOptions); // Object argument
MDN
https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView
Can I use?
Demo