Skip to content
This repository has been archived by the owner on May 9, 2021. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanessa219 committed Feb 16, 2020
2 parents b1a8f1a + 39aa9e0 commit 18622b9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/electron/main.js
Expand Up @@ -137,11 +137,11 @@ app.on('will-quit', () => {
})

// 在编辑器内打开链接的处理
app.on('web-contents-created', function (webContentsCreatedEvent, contents) {
app.on('web-contents-created', (webContentsCreatedEvent, contents) => {
if (contents.getType() === 'webview') {
contents.on('new-window', function (newWindowEvent, url) {
console.log('block');
contents.on('new-window', (newWindowEvent, url) => {
newWindowEvent.preventDefault();
shell.openExternal(url);
});
}
});

0 comments on commit 18622b9

Please sign in to comment.