Per this suggestion from a Microsoft employee, I tested that the following code in Home.js
file successfully opens a URL (html page) in a default browser if URL is defined. But if url is left blank, it gives following message by my Windows 10 desktop. I was expecting it to instead display a default about:blank
page as demonstrated in this W3schools.com online tutorial page.
Following two work in Home.js
:
window.open('https://www.google.com/','test title');
or
window.open('http://localhost/myWordWebAddIn1Project/SomeHtmlFile.html','test title');
But following in Home.js
instead displays the regular Windows 10 message (shown below) asking you to choose an app/program to open the following page:
window.open('','test title');
Message that popups up by Windows 10 when you use the above line in your add-in:
Question: How can we make the window.open('','test title');
work in the add-in as well?
NOTE: Please note again, the above line of code works fine in W3Schools online tutorial linked above.