i am trying to open url when user clicks on a button in plugin view. But web addin is throwing error.
My code to open url :
let a = document.createElement("a");
a.setAttribute('target', '_blank');
a.setAttribute("style", "display: none");
document.body.appendChild(a);
a.href = finalUrl;
a.click();
document.body.removeChild(a);
Error message :
App is rejected from store because of this error. How can i overcome this error?
I don't want to use Dialogue API which doesnot open url in the browser.