mirror of
https://github.com/electron/electron.git
synced 2026-01-26 07:48:08 -05:00
simply spec
This commit is contained in:
@@ -307,18 +307,7 @@ ipcMain.on('handle-unhandled-rejection', (event, message) => {
|
||||
ipcMain.on('navigate-with-pending-entry', (event, id) => {
|
||||
const w = BrowserWindow.fromId(id)
|
||||
|
||||
const source = `
|
||||
<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.webContents.on('did-start-loading', () => {
|
||||
w.loadURL('about:blank')
|
||||
})
|
||||
|
||||
@@ -329,7 +318,7 @@ ipcMain.on('navigate-with-pending-entry', (event, id) => {
|
||||
})
|
||||
|
||||
w.webContents.session.clearHostResolverCache(() => {
|
||||
w.loadURL(`data:text/html,${source}`)
|
||||
w.loadURL('http://host')
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user