title: Notification before confirmation window
body: <p>Here is my scenario:</p>
  
  <ul>
  <li>a client has opened a tab with my web app in it<br></li>
  <li>whenever there is an incoming connection I would like to notify him via Notifications API<br></li>
  <li>after clicking notification he should be redirected to this page / opened tab<br></li>
  <li>there he should see confirmation popup where he can decide if he wants to accept connection</li>
  </ul>
  
  <p>I know how to do each part, but I do have problems with the correct order. I believe it has something to do with JS call stack. In the following code confirmation window is always first. Only after confirming it (or not) notification displays. </p>
  
  <pre><code>let n = new Notification("Incomming call");
  let c = confirm('Do you accept?')
  
  if(c) {
    return this.peer;
  }
  </code></pre>
  
  <p>How can I switch order? First notification, then confirmation prompt. </p>