0

I'm working on creating a Firefox add-on to show SSL certificate information. I only need to read the certificate, I don't want to change it in any way. I'm trying to use this example to get the code, but the javascript stops running at const {Cc, Ci} = require("chrome");. The javascript code is ran from a <script> tag in the HTML file.

Can Firefox add-ons still access the chrome module? Am I missing something, like a permission?

Note: I asked a similar question yesterday, but with FireFox Extensions.

Community
  • 1
  • 1
  • 1
    `const {Cc, Ci} = require("chrome");` works just fine in Firefox Add-on SDK based extensions. The problem is probably the context in which you are attempting to run the code. The sentence: "The javascript code is ran from a – Makyen Oct 02 '16 at 21:36

1 Answers1

0

This code can only be run from the index.js file.

What you will need to do to make the code accessible to the '' on the HTML page is, run the code in index.js and then send that data to the script using one of the techniques described here.

Kaspar Lee
  • 5,446
  • 4
  • 31
  • 54