openOptionsPage method

Future<void> openOptionsPage()

Open your Extension's options page, if possible.

The precise behavior may depend on your manifest's [options_ui](optionsV2) or [options_page](options) key, or what Chrome happens to support at the time. For example, the page may be opened in a new tab, within chrome://extensions, within an App, or it may just focus an open options page. It will never cause the caller page to reload.

If your Extension does not declare an options page, or Chrome failed to create one for some other reason, the callback will set lastError.

Implementation

Future<void> openOptionsPage() async {
  await promiseToFuture<void>($js.chrome.runtime.openOptionsPage());
}