0

I am following the documentation for the banno-plugin-framework-bridge, to add a button that opens a link in a new tab.

I installed the package: "@jack-henry/banno-plugin-framework-bridge": "^1.0.0"

In my .ejs code (where I render my extension), I include in the head tag:

<script type="module">
    import { enableRouter } from "/js/banno-plugin-framework-bridge.js";
    enableRouter();
</script>

However, I continue to get "Blocked opening 'xyz.com' in a new window because the request was made in a sandboxed frame whose 'allow-popups' permission is not set."

In the Chrome inspector, I cannot find this file in the js folder.

The path of the node module is: .../simple-plugin/node_modules/@jack-henry/banno-plugin-framework-bridge/dist/banno-plugin-framework-bridge.js

I tried directly referencing the package from the ejs file, but that did not work. I then created my own "js" folder relative to the ejs file and copied the banno-plugin-framework-bridge.js and banno-plugin-framework-bridge.js.map but that also had no effect.

I then copied the js folder into root and added in my server.js file app.use(express.static('js')) but still receive GET http://localhost:8080/js/banno-plugin-framework-bridge.js net::ERR_ABORTED 404 (Not Found)

My output in the .ejs file is not being logged, and debug fails. Any guidance would be greatly appreciated. Thank you.

  • Depending on your build process (i.e. do you have one? or are you copying files to a specific location on your server?), you'll need to follow the basic steps from https://jackhenry.dev/open-api-docs/plugins/architecture/userinterface/banno-plugin-framework-bridge/#installation. I _think_ your main problem is the _location_ and (therefore, referencing) of the JavaScript module's path. – Jaime Lopez Jr. Aug 07 '23 at 15:25
  • In EJS, it's fairly typical to have statically served files set up using something like `app.use(express.static('public'))` so a `/js/banno-plugin-framework-bridge.js` would work if you had a `/js` folder under the `/public` folder i.e. `/public/js`. – Jaime Lopez Jr. Aug 07 '23 at 15:26
  • ...so if you have used `app.use(express.static('js'))` for serving up static files, then I would expect that your files would be sitting right at the top level of that `/js` folder and therefore be referenceable as `banno-plugin-framework-bridge.js` (without the `/js` prefix). At least that's what I understand based on your described file layout and usage. – Jaime Lopez Jr. Aug 07 '23 at 15:28
  • That fixed it! Thank you Jaime for the detailed assistance. – Jared Haltrecht Aug 07 '23 at 17:07
  • Glad to hear! Do you mind taking a moment to self-answer your own question? It sounds like you know the specific steps which helped you (and which may help others in the future). – Jaime Lopez Jr. Aug 07 '23 at 18:53
  • Sure! I had to add "app.use(express.static('public'));" in the server.js file. I then created a folder at root for public with an inner folder of js, then added the banno-plugin-framework-bridge.js and banno-plugin-framework-bridge.js.map files in that js folder. – Jared Haltrecht Aug 08 '23 at 20:07
  • @JaimeLopezJr. aside from opening in a new tab (discussed above), are we able to open in a new browser window and adjust the size of this window that opens in desktop? In the documentation, it discusses embedded browser windows for mobile. When attempting to open in a new window, we face the same iFrame obstacles. – Jared Haltrecht Aug 11 '23 at 23:54
  • The [Embedded web browser links](https://jackhenry.dev/open-api-docs/plugins/architecture/userinterface/banno-plugin-framework-bridge/#embedded-web-browser-links) for the Plugin Bridge will open a new browser tab in Banno Online, but you can't adjust the _size_. (Banno Mobile opens SFSafariViewController on iOS or a Chrome Custom Tab on Android, and neither size can be adjusted). – Jaime Lopez Jr. Aug 14 '23 at 14:54
  • @JaimeLopezJr. understood. Do we have the capability to open in a new browser window in Banno Online instead of tab within the Plugin Bridge? Is there another tool that will allow us to adjust the size and/or open in a new browser window. – Jared Haltrecht Aug 15 '23 at 18:36
  • No to both questions. – Jaime Lopez Jr. Aug 15 '23 at 21:10

0 Answers0