Command
有关命令的信息。这包含在 commands
manifest.json 键中指定的命令信息。
调用 commands.getAll()
将返回包含这些对象的数组。
类型
这些类型的值是对象。它们包含以下属性:
name
可选-
string
。命令的名称。这将传递给commands.onCommand
事件监听器。 description
可选-
string
。命令的描述。主要用于向用户解释该命令的作用。 shortcut
可选-
string
。用于执行此命令的键,指定为类似“Ctrl+Shift+Y”的字符串。
浏览器兼容性
Report problems with this compatibility data on GitHubdesktop | mobile | ||||||
---|---|---|---|---|---|---|---|
Command | |||||||
description | |||||||
name | |||||||
shortcut |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
备注:
此 API 基于 Chromium 的 chrome.commands
API。