Last active
March 17, 2017 20:53
-
-
Save scripting/b7a12552935e8454bf8e99babd4988f3 to your computer and use it in GitHub Desktop.
Create a new window with an icon in Electron on Linux
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
app.on ("ready", function () { | |
var nativeIcon = NativeImage.createFromPath (__dirname + "/" + "pork.png"); | |
mainWindow = new BrowserWindow ({ | |
width: 1100, | |
height: 1000, | |
icon: nativeIcon | |
}); | |
mainWindow.loadURL('file://' + __dirname + '/index.html'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment