scrollIntoViewIfNeeded method

void scrollIntoViewIfNeeded([
  1. 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

Implementation

void scrollIntoViewIfNeeded([bool? centerIfNeeded]) native;