Ponyfill for upcoming Element.scrollIntoView() APIs like scrollMode: if-needed, behavior: smooth and block: center. When deciding if scrolling is needed the visibility of the target element is checked. If it's less than 100% it will be scrolled.