In my app, when a user clicks a button I open a window:
myWindow = window.open('http://www.google.com')
When I'm done processing myWindow
, I clean-up the environment so that subsequent clicks on the same button will open a new window (if I do not do this, subsequent clicks do nothing):
myWindow.close();
delete window.myWindow;
Is it possible to close then remove myWindow
from the environment if the user manually exits the window? If they do so now, subsequent clicks do nothing unless the page is refreshed.