Search code examples
firefox-addonfirefox-addon-sdk

Creating a chrome:// page for my Firefox add-on


I am building a simple Firefox add-on using the Add-on SDK, and I need it to display some information when first ran.

I don't want to rely on an external URL for this, so I figured that my best option is to use the chrome:// scheme.

I have two questions

  1. How to create said page?
  2. Is it possible to pass a value to it (something along the lines of welcome.html?key=abc)?

Solution

  • You need to register a content or resource url scheme in chrome.manifest. You will be able to use window.location object there as usual.