Hello,
I’m building a web extension that allows you to select a base64 certificate text and it will spit out all the useful data inside it. The heavy lifting is done by forge.
I added 2 scripts in my manifest: background script and forge script. Forge seems to load first. In theory any global object defined by the first script can be seen by the second one. I should be able to see the forge
object from my background script but this is not true.
It works fine in my unit tests and actually calls forge.
Here is an unlisted version so you can test it out. I basically get undefined for forge in background.js.
In order to reproduce the issue, install the extension, open an about:debugging page and start debugging “Base64 Certificate Viewer”, then open this page or any other certificate, select all the text, right click and call the menu action to view. The console of the debugger will show this error.
What am I doing wrong? Is this a webextension issue or a forge issue?
Thank you!