title: Trigger event on closing of Window.open
body: <p>Hi I have to load an url in window.open, that url save some cookie in my browser, I want to access it after that window.open is closed. I couldn`t find a way to do it. I have tried these codes.</p>
  
  <pre><code> var windowStatus = window.open(returnURL, "Login", "type=fullWindow,toolbar=yes,scrollbars=yes,resizable=yes,fullscreen");
   windowStatus.addEventListener("beforeunload", (event) =&gt;{
        let cookieVaal = this.cookieService.get('QSTID');
        sessionStorage.setItem('QSTID', cookieVaal);
      })
  </code></pre>
  
  <p>This is also not working, Kindly suggest me something. Thanks in advance..</p>