W3C home > Mailing lists > Public > whatwg@whatwg.org > January 2010

[whatwg] question about the popstate event

From: Justin Lebar <justin.lebar@gmail.com>
Date: Tue, 5 Jan 2010 18:55:13 -0800
Message-ID: <c84706c71001051855x35410e25o35b321bb792996e7@mail.gmail.com>
> From my reading of the spec, I would expect the following steps:
> 5. Page A is loaded.
> 6. The load event for Page A is dispatched.
> 7. The popstate event for Page A is dispatched.

I think this is correct.  A popstate event is always dispatched
whenever a new session history entry is activated (6.10.3).

-Justin

On Tue, Jan 5, 2010 at 4:53 PM, Darin Fisher <darin at chromium.org> wrote:
> I'd like to make sure that I'm understanding the spec for pushState and the
> popstate event properly.
> Suppose, I have the following sequence of events:
> 1. Page A is loaded.
> 2. Page A calls pushState("foo", null).
> 3. The user navigates to Page B.
> 4. The user navigates back to Page A (clicks the back button once).
> Assuming the document of Page A was disposed upon navigation to Page B
> (i.e., that it was not preserved in a page cache), should a popstate event
> be generated as a result of step 4?
> From my reading of the spec, I would expect the following steps:
> 5. Page A is loaded.
> 6. The load event for Page A is dispatched.
> 7. The popstate event for Page A is dispatched.
> Do I understand correctly?
> Thanks,
> -Darin
Received on Tuesday, 5 January 2010 18:55:13 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:20 UTC