scrollIntoViewIfNeeded method
- bool? centerIfNeeded
Nonstandard version of scrollIntoView
that scrolls the current element
into the visible area of the browser window if it's not already within the
visible area of the browser window. If the element is already within the
visible area of the browser window, then no scrolling takes place.
Other resources
- Element.scrollIntoViewIfNeeded from MDN.
Implementation
void scrollIntoViewIfNeeded([bool? centerIfNeeded]) native;