mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
fix: will-attach-webview handler modifying params.instanceId does not break <webview> (#32386)
This commit is contained in:
@@ -138,6 +138,12 @@ ipcMain.on('prevent-next-will-attach-webview', (event) => {
|
||||
event.sender.once('will-attach-webview', event => event.preventDefault());
|
||||
});
|
||||
|
||||
ipcMain.on('break-next-will-attach-webview', (event, id) => {
|
||||
event.sender.once('will-attach-webview', (event, webPreferences, params) => {
|
||||
params.instanceId = null;
|
||||
});
|
||||
});
|
||||
|
||||
ipcMain.on('disable-node-on-next-will-attach-webview', (event, id) => {
|
||||
event.sender.once('will-attach-webview', (event, webPreferences, params) => {
|
||||
params.src = `file://${path.join(__dirname, '..', 'fixtures', 'pages', 'c.html')}`;
|
||||
|
||||
Reference in New Issue
Block a user