Closed Bug 658157 Opened 15 years ago Closed 15 years ago

window.onpopstate should be called on page load

Categories

(Core :: DOM: Navigation, defect)

x86
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: zhouyanming, Unassigned)

References

()

Details

User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/534.36 (KHTML, like Gecko) Chrome/13.0.767.1 Safari/534.36 Build Identifier: 4.0.1 http://code.google.com/p/chromium/issues/detail?id=63040 Reproducible: Always
Component: General → Document Navigation
Product: Firefox → Core
QA Contact: general → docshell
Version: unspecified → Trunk
This behavior is intentional; see [1] (which came after the bug you cited): > Don’t always fire a popstate event right after the load event. > Instead, only fire it during real session history transitions (i.e., when the > user clicks Back or Forward or when history.back()/forward()/go() is called) The spec may not have been updated to reflect this change, although my understanding was that we all agreed to adopt this convention. [1] http://hacks.mozilla.org/2011/03/history-api-changes-in-firefox-4/
Jonas, did you ever write to whatwg about not firing popstate onload? I see history.state in the spec, but not the onload business.
I did write to get the spec changed. However it appears that hixie missed parts of it if the spec still calls for popstate to fire "during onload".
Well, as I read it, it says to unconditionally fire popstate when traversing the history to a specified entry.
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.