Use will-finish-launching event to set open-url event listener
This commit is contained in:
@@ -356,6 +356,7 @@ function setDeeplinkingUrl(url) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
app.on('will-finish-launching', () => {
|
||||||
// Protocol handler for osx
|
// Protocol handler for osx
|
||||||
app.on('open-url', (event, url) => {
|
app.on('open-url', (event, url) => {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
@@ -365,6 +366,7 @@ app.on('open-url', (event, url) => {
|
|||||||
mainWindow.show();
|
mainWindow.show();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
|
||||||
// This method will be called when Electron has finished
|
// This method will be called when Electron has finished
|
||||||
// initialization and is ready to create browser windows.
|
// initialization and is ready to create browser windows.
|
||||||
|
Reference in New Issue
Block a user