Bug 78365
Summary: | window.opener.location can't be set in beforeunload handler | ||
---|---|---|---|
Product: | WebKit | Reporter: | Sreeram Ramachandran <sreeram> |
Component: | New Bugs | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW | ||
Severity: | Normal | CC: | ap, mkrp87 |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | All | ||
OS: | All |
Sreeram Ramachandran
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>
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |