[Webkit-unassigned] [Bug 94265] New: popstate is fired at the wrong time on load

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Aug 16 16:34:11 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=94265

           Summary: popstate is fired at the wrong time on load
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: History
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: glenn at zewt.org


Created an attachment (id=158938)
 --> (https://bugs.webkit.org/attachment.cgi?id=158938&action=review)
test

When loading a page, the following should not alert:

<!doctype html><script>window.onpopstate = function(event) { alert("onpopstate"); }</script>

because the spec path that leads to the event being fired (http://www.whatwg.org/specs/web-apps/current-work/#read-html "update the session history with the new page") happens before any script execution, so when it's fired, window.onpopstate has not been set yet.  Firefox doesn't alert.

It's less clear to me whether <body onpopstate="alert('test')"> should alert.  I don't think it's intended to, but I have an open question about this (http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2012-August/036926.html).

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list