The different contexts a menu item can appear in.
Values of this type are strings. The item is displayed when the given context applies. Possible values are:
menus.ACTION_MENU_TOP_LEVEL_LIMIT
, but you can add any number of items to submenus.menus.ACTION_MENU_TOP_LEVEL_LIMIT
, but you can add any number of items to submenus.Applies when the user context-clicks on a tab (specifically, this refers to the tab-strip or other user interface element enabling the user to switch from one browser tab to another, not to the page itself).
From Firefox 63, clicking the menu item on a tab grants the activeTab permission for the tab clicked, even if that isn't the currently active tab.
ContextType
through the menus
namespace. It is not available if you access it through the contextMenus
namespace.Note that "launcher" is not supported.
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
ContextType |
Yes |
14 |
55
'The 'editable' context does not include password fields. Use the 'password' context for this.
48
|
? |
Yes |
14 |
? |
? |
No |
? |
? |
? |
bookmark |
No
See bug 825443.
|
No
See bug 825443.
|
59 |
? |
No |
No |
? |
? |
No |
? |
? |
? |
browser_action |
Yes |
14 |
53
'The 'editable' context does not include password fields. Use the 'password' context for this.
|
? |
Yes |
14 |
? |
? |
No |
? |
? |
? |
launcher |
Yes |
79 |
48 |
? |
Yes |
No |
? |
? |
No |
? |
? |
? |
page_action |
Yes |
14 |
53 |
? |
Yes |
14 |
? |
? |
No |
? |
? |
? |
password |
No |
No |
53 |
? |
No |
No |
? |
? |
No |
? |
? |
? |
tab |
No |
No |
53 |
? |
No |
No |
? |
? |
No |
? |
? |
? |
tools_menu |
No |
No |
56
Only available at
menus.ContextType , not at contextMenus.ContextType . |
? |
No |
No |
? |
? |
No |
? |
? |
? |
Note: This API is based on Chromium's chrome.contextMenus
API. This documentation is derived from context_menus.json
in the Chromium code.
© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/menus/ContextType