fix: window.open site instance should belong to same browsing instance (#15216)

This commit is contained in:
Pedro Pontes 2018-11-12 22:01:43 +01:00 committed by Alexey Kuzmin
parent c06f023313
commit 8f35198bfb
10 changed files with 340 additions and 197 deletions

View file

@ -23,7 +23,16 @@
}
} else if (location.href !== 'about:blank') {
addEventListener('DOMContentLoaded', () => {
ipcRenderer.on('touch-the-opener', () => {
let errorMessage = null
try {
const openerDoc = opener.document // eslint-disable-line no-unused-vars
} catch (error) {
errorMessage = error.message
}
ipcRenderer.send('answer', errorMessage)
})
ipcRenderer.send('child-loaded', window.opener == null, document.body.innerHTML, location.href)
}, false)
})
}
})()