title | slug |
---|---|
commands |
Mozilla/Add-ons/WebExtensions/API/commands |
{{AddonSidebar}}
commands
manifest.json キーを使って、登録したコマンドをユーザーが実行するのをリッスンします。
- {{WebExtAPIRef("commands.Command")}}
- : コマンドを表す型。これは manifest.json の
commands
キーのコマンドで指定された情報が入っています。
- : コマンドを表す型。これは manifest.json の
- {{WebExtAPIRef("commands.getAll")}}
- : 拡張機能用のすべての登録済みコマンドを取得します。
- {{WebExtAPIRef("commands.onCommand")}}
- : 関連付けされたキーボードショートカットを使ってコマンドが実行された時に発火します。
{{Compat}} {{WebExtExamples("h2")}}
Note
この API は Chromium の chrome.commands
API に基づいています。Microsoft Edge での実装状況は Microsoft Corporation から提供されたものであり、ここでは Creative Commons Attribution 3.0 United States License に従っています。