en.javascript.info
en.javascript.info copied to clipboard
Added information about smooth scrolling (`options` object)
Window sizes and scrolling
The article is missing information regarding the optional options object, which can be used in scrollTo/scrollBy/scrollIntoView methods, for example, to make scrolling smooth:
window.scrollBy({
top: 500,
left: 0,
behavior: "smooth" // smooth page scrolling animation
});