title: Is it possible to detect when a JavaScript-opened window's location changes?
body: <p>If I open a window with JavaScript (e.g., with window.open()), is there a way, using the handle on the window I opened, to be notified when the URL of the window I opened changes?  For example, I'd like to be able to do something like this, generally:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  
      function openNewWindowAndNavigateTo(url)
      {
          var w = window.open(url, "myWindow");
          w.addEventListener("locationChange", handleLocationChange);     
      }
  
      function handleLocationChange(e)
      {
          alert(e.sourceWindow.newLocation);  
      }
  
  &lt;/script&gt;
  
  &lt;a onclick="openNewWindowAndNavigateTo('SomeDocumentIAuthored.html')"&gt;Go&lt;/a&gt;
  </code></pre>
  
  <p>Even if it's browser-specific (this is just for demonstrative purposes), is this even possible?  If so, how?  Assuming both documents live on the same domain, etc.  Can it be done?</p>