Is this really something we should tie to the pushState/replaceState API? It seems like websites that lazily add more content as the user scroll down, like the facebook feed or twitter feed, might not use pushState/replaceState, but would still like to handle restoring scroll position themselves.
/ Jonas On Wed, Mar 25, 2015 at 6:54 AM, Anne van Kesteren <ann...@annevk.nl> wrote: > On Thu, Mar 19, 2015 at 6:31 PM, Majid Valipour <maji...@chromium.org> wrote: >> partial interface History { >> void pushState(in any data, in DOMString title, in optional DOMString >> url, in optional StateOptions options); >> void replaceState(in any data, in DOMString title, in optional DOMString >> url, in optional StateOptions options); >> readonly attribute StateOptions options; >> }; >> >> dictionary StateOptions { >> Boolean restoreScroll = true, >> } > > The only suggestion I have is that instead of having four-argument > methods we might want to consider introducing two new methods that > take a dictionary. E.g. history.push() and history.replace(). Giving > the page more control over the scroll position when navigating makes > sense to me. > > > -- > https://annevankesteren.nl/