title: Javascript - can I get url of child window?
body: <p>I need such functional - get URL of child window after it loaded</p>
  
  <pre><code>var ref = window.open(link, window_params);  // link - external in other domain
  setTimeout(function(){
      console.log(ref.location.href);
  }, 1000); // 100 ms for example
  </code></pre>
  
  <p>I get error</p>
  
  <pre><code> Error: Permission denied to access property 'href'
  </code></pre>
  
  <p>I know about origin restriction to get url from window in another origin and read FAQ after this article - <a href="https://developer.mozilla.org/en-US/docs/Web/API/window.open?redirectlocale=en-US&amp;redirectslug=DOM%2Fwindow.open" rel="nofollow">https://developer.mozilla.org/en-US/docs/Web/API/window.open?redirectlocale=en-US&amp;redirectslug=DOM%2Fwindow.open</a> </p>
  
  <p>Can i get url of opened window in some way? Any ideas?</p>