Created
June 20, 2017 14:52
-
-
Save SuddenDevelopment/ccbf80dda6990beae5c0253b3f4ed409 to your computer and use it in GitHub Desktop.
electron pass info from a custom protocol url to the main window before it opens
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
// capture any data you need from the url that opened the app | |
app.on('open-url',function(e, strUrl){ | |
var someThingToUse = strUrl; | |
}); | |
const createWindow = () => { | |
// Create the browser window. | |
mainWindow = new BrowserWindow({ | |
width: 1280, | |
height: 800, | |
}); | |
mainWindow.loadURL(`file://${__dirname}/index.html?`+someThingToUse); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment