Skip to content

Instantly share code, notes, and snippets.

@ccnokes
Last active October 27, 2016 03:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ccnokes/5c4b1c3b47ba91336a15e9debddc542b to your computer and use it in GitHub Desktop.
Save ccnokes/5c4b1c3b47ba91336a15e9debddc542b to your computer and use it in GitHub Desktop.
Basic pattern for using an main process only API in either the main or renderer in Electron
const electron = require('electron');
const Menu = electron.Menu || electron.remote.Menu;
//now you can use it seamlessly in either main or renderer
console.log(Menu);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment