<!DOCTYPE html>
<body onload="document.querySelector('a').click();">
<a href="javascript:opener.document.getElementById('result').textContent = document.cookie;" target="_blank">test</a>
<div id="result">not tested yet</div>
</body>