Enable webview in sandbox renderer Security: Inherit embedder prefs onto webview

This commit is contained in:
Hari Juturu 2018-06-25 15:08:00 -07:00 committed by Electron Bot
parent 8585372e11
commit 32e40cb4c3
4 changed files with 50 additions and 1 deletions

View file

@ -78,6 +78,16 @@ if (window.location.protocol === 'chrome-devtools:') {
require('../renderer/inspector')
}
if (binding.guestInstanceId) {
process.guestInstanceId = parseInt(binding.guestInstanceId)
}
if (!process.guestInstanceId && preloadProcess.argv.indexOf('--webview-tag=true') !== -1) {
// don't allow recursive `<webview>`
require('../renderer/web-view/web-view')
require('../renderer/web-view/web-view-attributes')
}
// Wrap the script into a function executed in global scope. It won't have
// access to the current scope, so we'll expose a few objects as arguments:
//