I am working on a plugin for Outlook Web Access. My plugin is simply a button using tag with target='_blank'
which sends the user to another page. Based on the document from Microsoft:
In supported Web clients, such as Excel Online and Outlook Web App, Office Add-ins are hosted in an iframe that runs using the HTML5 sandbox attribute. ActiveX components or navigating the main page of the web client are not allowed. Office Add-ins support is enabled in the web clients by the integration of the JavaScript API for Office. In a similar way to the desktop client applications, the JavaScript API manages the add-in lifecycle and interoperability between the add-in and the web client. This interoperability is implemented by using a special cross-frame post message communication infrastructure. The same JavaScript library (Office.js) that is used on desktop clients is available to interact with the web client.
Because of the mentioned Sandbox, when the link is clicked, the target page is not shown properly and is shown partially. Surprisingly if I right-click on the same link and select "Open link in new tab", the target page is shown fine without missing its contents.
My question is:
What is the difference between using the attribute target='_blank'
in HTML and selecting the "Open link in new tab" option in the browser? And how I can simulate "Open link in new tab" option to make my plugin work without the user needing to right click on the link.
P.S. I have tried it in both Firefox and Chrome and they have the same behavior.