Options pages enable you to define preferences for your WebExtension that your users can change. Users can access the options page for an add-on from the browser's add-ons manager:
The way users access the page, and the way it is integrated into the browser's user interface, will vary from one browser to another.
You can open the page programmatically by calling
Options pages have a Content Security Policy that restricts the sources from which they can load resources, and disallows some unsafe practices such as the use of
eval(). See Content Security Policy for more details on this.
Specifying the options page
To create an options page:
storageAPI to persist preferences.
- package these files in your add-on
- include an
options_uikey in manifest.json, giving it the URL to the page.
The favourite-colour example WebExtension uses an options page.