Outlook Javascript API - window.open not working from Outlook 2016 Desktop/Windows
<p>I have an Office Add-In written in the new JavaScript API, inside of it, I have a JS function which after some logic opens a web app in a new window using <code>window.open(url, '_blank')</code> </p>

<p>It works when called from the add-in pane in Outlook Web in both, <code>localhost</code> hosted add-in, as well as after deployment on heroku.</p>

<p>However when called from a command (add-in button on ribbon) it works <strong>only</strong> when the add-in is hosted on localhost, after I deploy it on heroku, the add-in works, shows commands in the ribbon, performs the JS logic, but <code>window.open</code> does nothing.</p>

<p>Looks like the only way to open a new window is by using <code>Office.context.ui.displayDialogAsync</code> but even then it works only if the page is on the same origin as the add-in code. </p>

<p>I would think that there are some security restrictions, but why then it worked when hosted on localhost? Is there any way, to open a browser window from a command in Outlook using the new Javascript API?</p>