Check if popup is closed in phone-friendly way (Checking value of .closed doesn't work)
<p>If I have created a popup window using <code>newWindow = window.open(url, name, dimensions)</code>, how can I check whether the window is closed in a way that will work on mobile browsers?</p>

<p>I tried using <code>if(newWindow.closed)</code>, and this works in Chrome on a PC and works on iPhone. However, on the Android phones I have tested on, this doesn't work; the popup closes but newWindow.closed is not true. <strong>What test should I use instead that will work on any platform to check if a popup is closed?</strong></p>

<p>Extra info:
I used <a href="http://jsconsole.com/?%3Alisten" rel="nofollow">jsconsole</a> to log newWindow (with <code>console.log(newWindow)</code>) before and after the popup was closed when visiting my page on an Android phone. While the popup window is open, it shows up in the console as <code>[object DOMWindow]</code>, and once the window is closed <code>console.log(newWindow)</code> just prints a blank line to the jsconsole. Note that printing a blank line is distinct from how jsconsole displays <code>null</code>, <code>undefined</code> or <code>false</code>, which show up exactly as I just typed them. Furthermore, trying <code>if(newWindow.closed || !newWindow)</code> works no better than just <code>if(newWindow.closed)</code> did; it seems that whatever kind of object <code>newWindow</code> becomes after the popup is closed, it is still truthy.</p>
