Connect Javascript API in Forge Apps

Hi!

I would like to use Connect Javascript API (https://developer.atlassian.com/cloud/jira/platform/about-the-connect-javascript-api/ ) in my Custom UI Forge app.
When I add metatag with https://connect-cdn.atl-paas.net/all.js
I receive the next error:
Refused to load the script 'https://connect-cdn.atl-paas.net/all.js' because it violates the following Content Security Policy directive: "script-src 'self' https://forge.cdn.prod.atlassian-dev.net 'unsafe-inline' 'sha256-bOtzk1dUloN05g/LIFdqemUqePLDBuIpdj71nJ6aExc=' 'unsafe-inline' https://www.google-analytics.com/analytics.js". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.

As I read from the docs, I can not use inline styles/scripts
https://developer.atlassian.com/platform/forge/custom-ui/#inline-styles

So what should I do to deal with it?

You can’t use connect JavaScript in forge - you’ll need to use the custom ui bridge - Custom UI bridge

1 Like

Thanks, @danielwester :slightly_smiling_face:

Do you know any ways to navigate from my forge project page to the other Jira page? Or getting the current base URL of the instance?
I might be missed something, but from the context parameters in the Custom UI bridge, I can not invoke that…