commands

commands manifest.json キーを使って、登録したコマンドをユーザーが実行するのをリッスンします。

commands.Command

コマンドを表す型。これは manifest.json の commands キーのコマンドで指定された情報が入っています。

関数

commands.getAll

拡張機能用のすべての登録済みコマンドを取得します。

イベント

commands.onCommand

関連付けされたキーボードショートカットを使ってコマンドが実行された時に発火します。

ブラウザーの互換性

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Firefox for Android
Safari on iOS
commands
Command
Command.description
Command.name
Command.shortcut
getAll
onChanged
onCommand
onCommand.name
onCommand.tab
reset
update
update.description
update.name
update.shortcut

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support
See implementation notes.

Example extensions

メモ: この API は Chromium の chrome.commands API に基づいています。Microsoft Edge での実装状況は Microsoft Corporation から提供されたものであり、ここでは Creative Commons Attribution 3.0 United States License に従っています。