title: How to attach events on window.opener
body: <p>I have a window that is opened by</p>
  
  <pre><code>var myWindow = window.open(
                    'popupManager.htm', 
                    'myWindow', 
                    'status=0,toolbar=0,width=500,height=100');
  </code></pre>
  
  <p>and it will act as a debug window.</p>
  
  <p>inside I want to hook up to windows events on the <code>window.opener</code> and I'm not getting this to work. Both URL's are in the same domain/same website.</p>
  
  <p>I can hook up to DOM elements fine using, for example</p>
  
  <pre><code>$("input[soid=DlgButtonBar_cancelButton]", window.opener.document).bind("click", function() {
      alert('Cancel button was pressed!');
      window.close();
  });
  </code></pre>
  
  <p>but I want to hook up to the <code>move</code> event (<code>window.onMove</code>) and <code>close</code> event.</p>
  
  <p>tried </p>
  
  <pre><code>window.opener.addEventListener('move', function() { console.log('moving...'); });
  </code></pre>
  
  <p>with no luck.</p>
  
  <p><strong>what is the trick?</strong> using jQuery or simple javascript...</p>