element.scrollIntoViewIfNeeded Polyfill for everyone This gist provides a simple JavaScript implementation of the non-standard WebKit method scrollIntoViewIfNeeded that can be called on DOM elements. Install npm install element.scrollintoviewifneeded-polyfill Usage