danBhentschel
danBhentschel

Reputation: 883

Is there a URL that I can use to programmatically navigate to a WebExtensions options screen?

In a Chrome extension I can do:

chrome.tabs.create({ url: 'chrome://extensions/?options=' + chrome.runtime.id });

Is there some similar action that I can do in a Firefox WebExtensions add-on to navigate to the options screen for my add-on?

Upvotes: 0

Views: 164

Answers (1)

Daniel Herr
Daniel Herr

Reputation: 20438

Use the runtime.openOptionsPage() function after defining the options page in the manifest. It will return a promise for the creation of the options page.

https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/runtime/openOptionsPage

Upvotes: 1

Related Questions