For some time I have been using the following script to close child windows when the parent window disappears. It worked fine in Moz 0.9 and various IE versions.
Code: Select all
function checkParent()
{
if (window.opener)
{
if (window.opener.closed)
{
window.close();
}
}
}
var checkParentIntervalID = window.setInterval("checkParent()", 500);It seems that when the parent window is closed is destroying the properties it's window object. Formerly the boolean value window.closed was preserved and set to true.
Q1. Is this a genuine bug? I searched Bugzilla (horrible form) but could not any reference.
Q2. Is there a work arround? I have tried
Code: Select all
if (typeof(window.opener.closed) == undefined) ...Many Thanks,