title: Access to w.location.href in popup window, in background page, in chrome extension
body: <p>In background page:</p>
  
  <pre><code>var w = window.open(URL,'Example','width=675,height=350');
  temp.page=setInterval(function(){
    if (w.location.href!=URL) {
      clearInterval(temp.page);
      alert(w.location.href); //undefined
      w.close();
    }
  },1000);
  </code></pre>
  
  <p>So, why <code>w.location.href</code> is undefined and why I can't access to do any scripts in w (<code>w.document.write('qweqwe');//document==undefined</code>)?</p>
  
  <p>I need to:
   1. Open page with URL.
   2. Detect redirect.
   3. Get URL whereto page have redirected me.
   4. Do something with the second URL.</p>