If I test to see if a window's opening window still exists by testing window.opener.closed, and the opening window is already closed, this command will hang the current window.
What build IDs have you tested this against?
Browser, not engine ---> DOM Level 0 We need a reduced testcase. Bud, if there is a small testcase, could you paste the HTML here via the Additional Comments box? The alternative would be to attach the parent and child HTML files separately via the "Create a New Attachment" link above. But I'm guessing your testcase is small enough to paste the HTML for both right here, in-line.
Assignee: rogerl → jst
QA Contact: pschwartau → desale
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: window.opener.closed hangs if the window's opener is already closed → |window.opener.closed| errors if the window's opener is already closed
typo above: supposed to use the test the |closed| property should be supposed to test the |closed| property
So... why the use of .closed? This lives on nsIDOMWindowInternal, so it's very definitely not for public consumption...
window.closed is a DOM0 property, so it *is* intended for public usage, at least from JS (not sure why it lives in the _internal_ interface though, but so does a lot of other DOM0 properties).
Mass-reassigning bugs to email@example.com
Assignee: jst → dom_bugs
If, as Phil states, window.opener is evaluating to 'null' when the parent window is closed, why does (typeof window.opener) still evaluate to 'object'? This is a most inconvenient bug. How else can we test if the opener is closed? Is (!window.opener) a reliable alternative? What is (!null) anyway? I'm using 7.02 on Windows XP.
typeof(null) is "object" in ECMAScript, as you could check directly in any browser. (!null) tests true in ECMAScript (again, in all browsers).
not sure if it's related, but if the parent window changes location (eg. goes to a new webpage), the child window loses all permissions to access (even read permissions) the parent window's properties. Is it possible to grant access to properties that don't threaten security? (namely window.closed)
this seems the be the same problem i'm having atm. see the URL i added ( http://www.tqsoft.de/playground/ ). (when reloading the page you get the opener object alerted, when closing the browser window a popup should appear that checks if the main window exists, which fails in mozilla) i tried to check window.opener.closed, but i get an error because the window.opener object is killed when closing the window.
Assignee: general → nobody
QA Contact: desale → general
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046 Move all DOM bugs that haven’t been updated in more than 3 years and has no one currently assigned to P5. If you have questions, please contact :mdaly.
Priority: -- → P5
You need to log in before you can comment on or make changes to this bug.