Use will-finish-launching event to set open-url event listener

This commit is contained in:
Yuya Ochiai
2018-01-18 22:55:32 +09:00
parent 78ffa6466f
commit 71989b9c37

View File

@@ -356,6 +356,7 @@ function setDeeplinkingUrl(url) {
}
}
app.on('will-finish-launching', () => {
// Protocol handler for osx
app.on('open-url', (event, url) => {
event.preventDefault();
@@ -365,6 +366,7 @@ app.on('open-url', (event, url) => {
mainWindow.show();
}
});
});
// This method will be called when Electron has finished
// initialization and is ready to create browser windows.