This commit is contained in:
Liang Ding 2022-12-07 10:22:22 +08:00
parent 95e2ee3aeb
commit d1995bda5c
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
6 changed files with 144 additions and 74 deletions

View file

@ -778,11 +778,6 @@ app.on('activate', () => {
// 在编辑器内打开链接的处理,比如 iframe 上的打开链接。
app.on('web-contents-created', (webContentsCreatedEvent, contents) => {
contents.on('new-window', (newWindowEvent, url) => {
newWindowEvent.preventDefault()
shell.openExternal(url)
})
contents.setWindowOpenHandler((details) => {
shell.openExternal(details.url)
return {action: 'deny'}