T
Tim Streater
I'm getting some crashes with Safari and my web app. Now, it occurs to
me that I'm doing this:
winPtr = window.open (parameter, ...);
I'm saving a reference to the child window, so that on exiting the app I
can do:
if (winPtr!=null) winPtr.close ();
so that, on exit, there are not stray child windows left hanging around
(note: I tried the "dependent" parameter for window.open but this did
not appear to work in Safari).
Of course, if the child window was already closed, then I don't know if
Safari cares that winPtr now refers to a no-longer-existing element (it
shouldn't, IMO. Or at any rate it shouldn't crash).
In the child window I can do:
window.opener.winPtr = null;
just before the window.close(), but I'm not sure whether it's possible
to be informed if the user clicks the red "close" button on the child
window, rather than clicking my "Cancel" button.
Is there a way for an opener window to be informed unambiguously that a
child window has closed or been closed?
Thx,
me that I'm doing this:
winPtr = window.open (parameter, ...);
I'm saving a reference to the child window, so that on exiting the app I
can do:
if (winPtr!=null) winPtr.close ();
so that, on exit, there are not stray child windows left hanging around
(note: I tried the "dependent" parameter for window.open but this did
not appear to work in Safari).
Of course, if the child window was already closed, then I don't know if
Safari cares that winPtr now refers to a no-longer-existing element (it
shouldn't, IMO. Or at any rate it shouldn't crash).
In the child window I can do:
window.opener.winPtr = null;
just before the window.close(), but I'm not sure whether it's possible
to be informed if the user clicks the red "close" button on the child
window, rather than clicking my "Cancel" button.
Is there a way for an opener window to be informed unambiguously that a
child window has closed or been closed?
Thx,