title: Open window inside promise
body: <p>We are using a promise lib Q and we encounter the following issue.
  <a href="https://stackoverflow.com/questions/23287940/window-open-is-blocked-by-browser-when-is-called-from-promise">window.open() is blocked by browser when is called from promise</a></p>
  <p>We try to open the window before the promise mechanism  has started and this is working but the issue is that when a new tab is opened (and get the focus) all the browser resources are refer to the new tab and the logic is still done in the first tab which cause to bad performance.</p>
  <p>There is other way to handle this maybe with event when the promise finished and then catch this event and open new window.</p>
  <p><strong>Update</strong></p>
  <p>What does it mean &quot;all the browser resources are refer to the new tab&quot;
  we found interesting behavior :)
  We are running application when user click on button, in this case we are open new tab and the focus is changed to the new tab and we are waiting to the app to start, this takes about 15 second (until the application actually running).
  We did the following test (which is very interesting :) ) and when we click on run application and the new tab is opens we are <strong>immediately</strong> click back to the first tab (which have the buttons)  and by doing this the time is reduce to 4.5 seconds! It seems that the focus change the way that the resources is handled by the browsers.</p>
  <p>I'm searching for alternative solutions!</p>