webContents: handle POST navigation for new windows
This commit is contained in:
parent
7cfe1dd0af
commit
0410a184ce
10 changed files with 187 additions and 49 deletions
|
@ -18,13 +18,17 @@ BrowserWindow.prototype._init = function () {
|
|||
}
|
||||
|
||||
// Make new windows requested by links behave like "window.open"
|
||||
this.webContents.on('-new-window', (event, url, frameName, disposition, additionalFeatures) => {
|
||||
this.webContents.on('-new-window', (event, url, frameName,
|
||||
disposition, additionalFeatures,
|
||||
postData) => {
|
||||
const options = {
|
||||
show: true,
|
||||
width: 800,
|
||||
height: 600
|
||||
}
|
||||
ipcMain.emit('ELECTRON_GUEST_WINDOW_MANAGER_WINDOW_OPEN', event, url, frameName, disposition, options, additionalFeatures)
|
||||
ipcMain.emit('ELECTRON_GUEST_WINDOW_MANAGER_WINDOW_OPEN',
|
||||
event, url, frameName, disposition,
|
||||
options, additionalFeatures, postData)
|
||||
})
|
||||
|
||||
this.webContents.on('-web-contents-created', (event, webContents, url,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue