> 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 <da...@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