fires before the moment when a context menu appears by the right mouse click
zoneId | string|number | id of the context menu zone |
ev | Event | native window event object |
myMenu.attachEvent("onBeforeContextMenu", function(zoneId,ev){
// your code here
// returning "true" allows a context menu to be shown, "false" - cancels showing
return true;
});
The event is cancellable: to show a context menu you need to "return true"
Back to top