title: Is it possible for parent window to notice if child window has been closed?
body: <p>I have <code>parent window (opener)</code> and <code>child (popup)</code></p>
  
  <pre><code>----------                      --------------
  |         |                     |            |
  | parent  | -----&gt; opens popup  |  child     |
  |         |                     |            |
  -----------                     --------------
  </code></pre>
  
  <p>Let's say, in parent page, I have js function <code>hello()</code></p>
  
  <p>In order for child to call parent's hello() when the child window is closed and also pass an argument, I can do,</p>
  
  <pre><code>window.close();
  window.opener.hello(someArgument);
  </code></pre>
  
  <p>This will close the window and also call parent's hello();</p>
  
  <p><strong>But what if I don't want to have the code window.opener.hello() in child page? I mean I want the code to be in parent page only</strong></p>
  
  <p>One thing I can think of is:</p>
  
  <p><strong>Somewhat parent knows when the child is closed (event listenr??? not sure in js)
      But in such case how to receive the argument? (i.e. some data back from the child)</strong></p>