mirror of
https://github.com/electron/electron.git
synced 2026-02-01 02:35:27 -05:00
Emit 'execute' event when menu item is clicked.
This commit is contained in:
@@ -106,6 +106,11 @@ string16 Menu::GetSublabelForCommandId(int command_id) const {
|
||||
}
|
||||
|
||||
void Menu::ExecuteCommand(int command_id, int event_flags) {
|
||||
v8::Handle<v8::Value> args[] = {
|
||||
v8::String::New("execute"),
|
||||
v8::Integer::New(command_id)
|
||||
};
|
||||
node::MakeCallback(handle(), "emit", 2, args);
|
||||
}
|
||||
|
||||
// static
|
||||
|
||||
Reference in New Issue
Block a user