fix: register webview in main world when using contextIsolation (#16067)
This commit is contained in:
parent
dbda1a1b05
commit
8584c2f14b
11 changed files with 56 additions and 20 deletions
|
@ -70,6 +70,18 @@ describe('<webview> tag', function () {
|
|||
await emittedOnce(ipcMain, 'pong')
|
||||
})
|
||||
|
||||
it('works with contextIsolation', async () => {
|
||||
const w = await openTheWindow({
|
||||
show: false,
|
||||
webPreferences: {
|
||||
webviewTag: true,
|
||||
contextIsolation: true
|
||||
}
|
||||
})
|
||||
w.loadFile(path.join(fixtures, 'pages', 'webview-isolated.html'))
|
||||
await emittedOnce(ipcMain, 'pong')
|
||||
})
|
||||
|
||||
it('is disabled when nodeIntegration is disabled', async () => {
|
||||
const w = await openTheWindow({
|
||||
show: false,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue