fix: register webview in main world when using contextIsolation (#16067)

This commit is contained in:
Cheng Zhao 2018-12-14 15:38:35 +09:00 committed by GitHub
parent dbda1a1b05
commit 8584c2f14b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 56 additions and 20 deletions

View file

@ -98,8 +98,12 @@ if (window.location.protocol === 'chrome-devtools:') {
// Load webview tag implementation.
if (webviewTag && guestInstanceId == null) {
require('@electron/internal/renderer/web-view/web-view')
require('@electron/internal/renderer/web-view/web-view-attributes')
const { setupWebView } = require('@electron/internal/renderer/web-view/web-view')
if (contextIsolation) {
v8Util.setHiddenValue(window, 'setup-webview', setupWebView)
} else {
setupWebView(window)
}
}
}