WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
78365
window.opener.location can't be set in beforeunload handler
https://bugs.webkit.org/show_bug.cgi?id=78365
Summary
window.opener.location can't be set in beforeunload handler
Sreeram Ramachandran
Reported
2012-02-10 10:56:38 PST
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.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug