ICommandDefinition interface
Used by ICommandSetExtensionManifest, this defines a command to be displayed by a UI surface such as a menu, tool bar, etc.
Properties
aria |
Custom accessibility text for the browser's "aria-label" attribute. If omitted, the title property will be used by default. Example: "Show information. Press ENTER to select." |
icon |
An optional URL for an image to be displayed next to the command. The requirements for this image are defined by the type of extension; some extension types may not display the image at all. |
title | A short label to be displayed by the associated button, menu item, etc. Example: "Show information" |
type | Type of the item. Currently only "command" is allowed. |
Property Details
ariaLabel
Custom accessibility text for the browser's "aria-label" attribute. If omitted, the title property will be used by default. Example: "Show information. Press ENTER to select."
ariaLabel?: ILocalizedString;
Property Value
iconImageUrl
An optional URL for an image to be displayed next to the command. The requirements for this image are defined by the type of extension; some extension types may not display the image at all.
iconImageUrl?: string;
Property Value
string
Remarks
This value can be an absolute URL (e.g. "http://example.com/icons/my-icon.png") or a relative file path (e.g. "./icons/my-icon.png"). In the latter case, the path will be resolved relative to the folder containing the input manifest. The icon file will be copied to the deployment folder like an asset, and the output manifest's iconImageUrl will be replaced with a URL relative to the URL used to load all other assets (the loaderConfig.internalModuleBaseUrls property).
title
A short label to be displayed by the associated button, menu item, etc. Example: "Show information"
title: ILocalizedString;
Property Value
type
Type of the item. Currently only "command" is allowed.
type: 'command';
Property Value
'command'