Part 1/3 of crrev.com/
225043005: Fire "contextmenu" event on
webview upon showing context menu.
Fire an event "contextmenu" on <webview> when context menu is
about to be shown.
This CL only fires the event with menu items' info, doesn't do
anything else.
The doc (for the complete API) is here:
https://docs.google.com/a/chromium.org/document/d/11pE2PRGSyLbZGVVP1pspViK_xLWv_A-1dJDY2kjjbgc/edit
BUG=140315
Test=
In a chrome app, create a <webview> element.
Add contextmenu event listener to the element:
var w = document.querySelector('webview');
w.addEventListener('contextmenu', function(e) {
// e.items is an array of objects that represent menu items.
// object = struct of .commandId = the id of the item, .label = the label of the itme.
});
The event fires when you right-click on the <webview> to bring up context menu.
Review URL: https://codereview.chromium.org/
258533002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@268007 0039d316-1c4b-4281-b951-d872f2087c98