Forge - window.open(url, _blank) - blocked

Hello everyone! my Forge-app using iframe “allow-popups” my server App!
There is JavaScript code;

button.onclick () => {
window.open(url, “_blank”);
}

code work very well on my server app! But blocked in Forge app!
How can i solve it ?

You’ll need to use router method of the @forge/bridge:
https://developer.atlassian.com/platform/forge/custom-ui-bridge/router/

3 Likes

Daniel, how can i use @forge/bridge in case if window.open() within iframe of other URL!?
I suggested get iframe tag - let iframe = document.getElementsByTagName(“iframe”);
then get tag from iframe and use onclick of button - onclick () => { router.open }
But cross origin - not allowed.
Thank you)