Add items to the browser's menu system.
This API is modeled on Chrome's "contextMenus" API, which enables Chrome extensions to add items to the browser's context menu. The browser.menus
API adds a few features to Chrome's API.
Before Firefox 55 this API was also originally named contextMenus
, and that name has been retained as an alias, so you can use contextMenus
to write code that works in Firefox and also in other browsers.
To use this API you need to have the menus
permission. You may also use the contextMenus
alias instead of menus
, but if you do, the APIs must be accessed as browser.contextMenus
instead.
Except for menus.getTargetElement()
, this API cannot be used from content scripts.