The Scroll Behavior specification has been introduced as an extension of the Window
interface to allow for the developer to opt in to native smooth scrolling. To date this has only been implemented in Chrome, Firefox and Opera.
There's a complete polyfill here (3.3KB minified). But most of the times, the following is enough for me (641 bytes minified):
smooth-scrolling-poyfill.js
Use as: scrollToElem('#elem-selector');
arrow function expression in IE11:
const nativeSmoothScrollTo = elem => {
... and other
replaced by:
const nativeSmoothScrollTo = function(elem) {
and it works.
TNX!