I'm want to use the window.scrollTo function with smooth behaviour. For example:
window.scrollTo({ top: 0, behavior: 'smooth' })
Parallel I want to change an elements color. For this I could use the scroll event to calculate the color for the current scroll position. But this would result in a bad performance because the scroll callback will called to often. The better solution would be to start a transition at the same time. But for this I have to know the scroll duration. Since it's not possible to define it manually, I need to know which duration the browsers uses.
