MDN self-hosted library · e01.org

Command

Information about the settings for the commands specified in the commands manifest.json key.

no runnable cells webextension-api-type upstream source

Information about the settings for the commands specified in the commands manifest.json key.

An array of these objects is returned from commands.getAll().

Type

A value of this type is an object containing these properties for the commands:

  • name
  • : string. Name of the command. This is passed into the commands.onCommand event listener.
  • description
  • : string. Description of the command. This is used to explain to the user what this command does.
  • shortcut
  • : string. Keys used to execute the command, specified as a string. See the shortcut values section of the commands manifest key documentation for more details.

description and shortcut reflect the values given in the commands manifest.json key unless they have been updated with commands.update() or, in the case of the shortcut, customized by the user.

Browser compatibility

[!NOTE] This API is based on Chromium's chrome.commands API.