Skip to content

Instantly share code, notes, and snippets.

@rockiger
Created August 9, 2019 09:07
Show Gist options
  • Save rockiger/c39c75e163e702ca3a9d8145ef6b152a to your computer and use it in GitHub Desktop.
Save rockiger/c39c75e163e702ca3a9d8145ef6b152a to your computer and use it in GitHub Desktop.
const menu = new remote.Menu();
menu.append(new remote.MenuItem({ role: 'cut' }));
menu.append(new remote.MenuItem({ role: 'copy' }));
menu.append(new remote.MenuItem({ role: 'paste' }));
menu.append(new remote.MenuItem({ role: 'delete' }));
menu.append(new remote.MenuItem({ type: 'separator' }));
menu.append(new remote.MenuItem({ role: 'selectall' }));
this.menu = menu;
...
this.onContextMenu = this.onContextMenu.bind(this);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment