scrollIntoView

fun scrollIntoView(options: ScrollIntoViewOptions = definedExternally)(source)

The Element interface's scrollIntoView() method scrolls the element's ancestor containers such that the element on which scrollIntoView() is called is visible to the user.

MDN Reference