[whatwg] question about the popstate event

Darin Fisher darin at chromium.org
Tue Jan 5 16:53:09 PST 2010


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20100105/a9cdc029/attachment-0002.htm>


More information about the whatwg mailing list