You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In pseudo code, we could add something like this at the beginning of function
if element isdocument.bodythenanimatedScrollTo(document.documentElement, samePosition, sameTime)
With that change we will be animating both properties at same time for compatibility and user of library will be still using just document.body to initialize animation (just like in the example)
That means calling everything twice, including requestAnimationFrame. In my head, it makes more sense to also accept an array of values and in that case iterate the values. Change the recommendation to use [ document.body, document.documentElement ] and it's done.
Activity
[-]Does not work on Firefox[/-][+]Scrolling is not working on Firefox[/+]marekhrabe commentedon Sep 2, 2014
In pseudo code, we could add something like this at the beginning of function
With that change we will be animating both properties at same time for compatibility and user of library will be still using just
document.bodyto initialize animation (just like in the example)icoloma commentedon Sep 2, 2014
That means calling everything twice, including
requestAnimationFrame. In my head, it makes more sense to also accept an array of values and in that case iterate the values. Change the recommendation to use [ document.body, document.documentElement ] and it's done.gijsroge commentedon May 22, 2015
Added a pull request that detects document.body & document.documentElement
So it adds support for Firefox and IE.
PR: #9
nikoloza commentedon Jul 31, 2017
+1