- From: Jonas Sicking <jonas@sicking.cc>
- Date: Wed, 25 Mar 2015 13:31:51 -0700
- To: Anne van Kesteren <annevk@annevk.nl>
- Cc: WHATWG <whatwg@whatwg.org>, Majid Valipour <majidvp@chromium.org>, Rick Byers <rbyers@chromium.org>, japhet@chromium.org
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 <annevk@annevk.nl> wrote:
> On Thu, Mar 19, 2015 at 6:31 PM, Majid Valipour <majidvp@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/
Received on Wednesday, 25 March 2015 20:32:45 UTC