title: window.open within electron webview
body: <p>I have a webview inside my app that I primarily use to access external websites.</p>
  
  <p>One particular <strong>external website</strong> has some JS in its page:</p>
  
  <pre><code>newWin = window.open("https://google.com");
  settimer = setInterval(counting, 500);
  function counting() {
    if (newWin.closed) {
      clearInterval(settimer);
      console.log('closed')
    } else {
      console.log('still open')
    }
  </code></pre>
  
  <p>I have the <code>allowpopups</code> attribute on so this code opens a new window, but I would like to get control of this window. I am not sure how to do that.</p>
  
  <p>Specifically I would like to mute the window and hide the window as well as be able to close it.</p>
  
  <p><strong>How can I get control of a popup opened through a webview?</strong></p>
  
  <p>Thanks!</p>