Information sent when a context menu item is clicked.


Values of this type are objects. They contain the following properties:

integer or string. The ID of the menu item that was clicked.
integer or string. The parent ID, if any, for the item clicked.
string. One of "image", "video", or "audio" if the context menu was activated on one of these types of elements.
string. If the element is a link, the URL it points to.
string. Will be present for elements with a "src" URL.
string. The URL of the page in which the menu item was clicked. This property is not present if the click occured in a context where there is no current page, such as on a browser action.
string. The URL of the frame of the element where the context menu was clicked, if it was in a frame.
string. If some text was selected in the page, this contains the selected text.
boolean. A flag indicating whether the element is editable: for example, if it is a textarea.
boolean. A flag indicating whether a checkbox or radio item was checked before it was clicked.
boolean. A flag indicating whether a checkbox or radio item was checked after it was clicked.

Browser compatibility

Chrome Edge Firefox Firefox for Android Opera
Basic Support Yes Yes 48.0 No 33


This API is based on Chromium's chrome.contextMenus API. This documentation is derived from context_menus.json in the Chromium code.

Microsoft Edge compatibility data is supplied by Microsoft Corporation and is included here under the Creative Commons Attribution 3.0 United States License.

Document Tags and Contributors

 Contributors to this page: wbamberg
 Last updated by: wbamberg,