Last active
October 27, 2016 03:41
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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