Get Cookie of another Domain Javascript
<p>can someone take a look on my snippet and correct me if he know whats i made false. Thank you in advance. </p>

<p>I need to get cookies from a url in javascript.. 
My approach was to open the url in a new tab and set the cookies to the local storage but theres nothing in the storage</p>

<p>btw this is about a chrome extension </p>

<pre><code>var w = window.open('urlWithCookies');
w.focus();

localStorage.setItem('allCookies', document.cookie);

w.close(); 
</code></pre>