simply spec
This commit is contained in:
parent
e936143da2
commit
90885d1d8c
1 changed files with 2 additions and 13 deletions
|
@ -307,18 +307,7 @@ ipcMain.on('handle-unhandled-rejection', (event, message) => {
|
||||||
ipcMain.on('navigate-with-pending-entry', (event, id) => {
|
ipcMain.on('navigate-with-pending-entry', (event, id) => {
|
||||||
const w = BrowserWindow.fromId(id)
|
const w = BrowserWindow.fromId(id)
|
||||||
|
|
||||||
const source = `
|
w.webContents.on('did-start-loading', () => {
|
||||||
<body>
|
|
||||||
<a href='http://host'>Link</a>
|
|
||||||
</body>
|
|
||||||
<script>
|
|
||||||
setInterval(function () {
|
|
||||||
document.getElementsByTagName('a')[0].click();
|
|
||||||
}, 100)
|
|
||||||
</script>
|
|
||||||
`
|
|
||||||
|
|
||||||
w.webContents.on('did-fail-load', () => {
|
|
||||||
w.loadURL('about:blank')
|
w.loadURL('about:blank')
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -329,7 +318,7 @@ ipcMain.on('navigate-with-pending-entry', (event, id) => {
|
||||||
})
|
})
|
||||||
|
|
||||||
w.webContents.session.clearHostResolverCache(() => {
|
w.webContents.session.clearHostResolverCache(() => {
|
||||||
w.loadURL(`data:text/html,${source}`)
|
w.loadURL('http://host')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue