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.
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
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.