[Webkit-unassigned] [Bug 78365] New: window.opener.location can't be set in beforeunload handler

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Feb 10 10:56:37 PST 2012


           Summary: window.opener.location can't be set in beforeunload
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: New Bugs
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: sreeram at chromium.org

Setting the window.opener.location object (or its href property) doesn't work when performed inside an onbeforeunload event handler. Calling opener.location.reload() works, as does inspecting opener.location or opener.location.href. Setting the object or its href property works during normal page action (i.e., non-page-dismissal event) as well as during the onunload event. It's just during beforeunload that setting doesn't work.

Here's a simple test case:

<!-- main.html -->
<a href="#" onclick="window.open('popup.html')">popup</a>

<!-- popup.html -->
<script>onbeforeunload = function() { opener.location += "?foo" }</script>

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