Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
DOM.scrollIntoViewIfNeeded = (el) => scrollIntoViewIfNeeded(el, { block: 'nearest', });
Ponyfill for upcoming Element.scrollIntoView() APIs like scrollMode: if-needed, behavior: smooth and block: center