This is my code:
document.querySelector(#theId).scrollIntoView({
behavior: "smooth",
});
I have gone to the documentation of scrollIntoView and I don't seem to find a way to set the speed of the smooth transition. I would ideally like to set a time in milliseconds to tell the browser the duration the scroll must last (just like it can be done with the transition property in CSS). Do you know if there is a workaround to achieve this? Thank you so much.