mirror of https://github.com/electron/electron
7 lines
286 B
JavaScript
7 lines
286 B
JavaScript
const { ipcRenderer } = require('electron/renderer')
|
|
const webview = document.getElementById('webview')
|
|
ipcRenderer.on('webview-new-window', (e, webContentsId, details) => {
|
|
console.log('webview-new-window', webContentsId, details)
|
|
webview.dispatchEvent(new Event('new-window'))
|
|
})
|