scrollIntoView

open external fun scrollIntoView(options: ScrollIntoViewOptions = definedExternally): Promise<Void>?(source)

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

MDN Reference