This user interface option adds one or more items to a browser context menu. This is the context menu available when a user right-clicks on a web page. Tabs can have context menus also, available through the browser.menus API.
You would use this option to expose features that are relevant to specific browser or web page contexts. For example, you could show features to open a graphic editor when the user clicks on an image or offer a feature to save page content when part of a page is selected. You can add plain menu items, checkbox items, radio button groups, and separators to menus. Once a context menu item has been added using contextMenus.create
it's displayed in all browser tabs, but you can hide it by removing it with contextMenus.remove
.
The full list of supported contexts is available at menus.ContextType
and includes contexts outside of a web page, such as bookmark items in the browser UI. For example, the "Open bookmark in Container Tab" extension adds a menu item that allows the user to open a bookmark URL in a new container tab: