The side effects of calling this function are asynchronous: the page's scroll will always update no sooner than the next animation frame, and maybe later than that. Because of this, it would be nice to have a callback invoked after it's done. The user might want to do something only after the attempts to restore scroll have been finished.
The side effects of calling this function are asynchronous: the page's scroll will always update no sooner than the next animation frame, and maybe later than that. Because of this, it would be nice to have a callback invoked after it's done. The user might want to do something only after the attempts to restore scroll have been finished.