Skip to content

Commit

Permalink
commands.onCommand add tab (mdn#30387)
Browse files Browse the repository at this point in the history
  • Loading branch information
rebloor authored Nov 20, 2023
1 parent bc8c3da commit b531f31
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,8 @@ Events have three functions:

- `name`
- : `string`. Name of the command. This matches the name given to the command in its [manifest.json entry](/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/commands).

## Browser compatibility

{{Compat}}
- `tab`
- : {{WebExtAPIRef('tabs.Tab')}}. The tab that was active when the command shortcut was entered.

## Examples

Expand Down Expand Up @@ -70,4 +68,8 @@ browser.commands.onCommand.addListener((command) => {

{{WebExtExamples}}

## Browser compatibility

{{Compat}}

> **Note:** This API is based on Chromium's [`chrome.commands`](https://developer.chrome.com/docs/extensions/reference/commands/) API.

0 comments on commit b531f31

Please sign in to comment.