Replace webview tag to iframe (#554)

Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
Roman authored and GitHub committed 2020-07-02 17:31:59 +03:00
1 parent d90be46a1f
commit 5f4e1253a9
6 files changed
+19 -12

No files matched your search

+7 -1
View File
@@ -55,7 +55,13 @@ export class WindowManager {
// handle close event
this.mainWindow.on("close", () => {
this.mainWindow = null;
})
});
// open external links in default browser (target=_blank, window.open)
this.mainWindow.webContents.on("new-window", (event, url) => {
event.preventDefault();
shell.openExternal(url);
});
// handle external links
this.mainWindow.webContents.on("will-navigate", (event, link) => {