Update dependency electron to v22 (#480)
* Update dependency electron to v22 * Switch from new-window event to setWindowOpenHandler * Stop recommending libappindicator3-1, Electron 22 stops using it Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
@@ -263,7 +263,11 @@ ipcMain.on('userDownloadAction', function(ev: IpcMainEvent, { id, open = false }
|
||||
});
|
||||
|
||||
export default (webContents: WebContents): void => {
|
||||
webContents.on('new-window', onWindowOrNavigate);
|
||||
webContents.setWindowOpenHandler((details) => {
|
||||
safeOpenURL(details.url);
|
||||
return { action: "deny" };
|
||||
});
|
||||
|
||||
webContents.on('will-navigate', (ev: Event, target: string): void => {
|
||||
if (target.startsWith("vector://")) return;
|
||||
return onWindowOrNavigate(ev, target);
|
||||
|
||||
Reference in New Issue
Block a user