Rename option to webviewTag and default to nodeIntegration value
This commit is contained in:
parent
837ea884de
commit
bde13353fb
6 changed files with 26 additions and 23 deletions
|
@ -57,7 +57,7 @@ let nodeIntegration = 'false'
|
|||
let preloadScript = null
|
||||
let isBackgroundPage = false
|
||||
let appPath = null
|
||||
let overrideWebViewSecurity = false
|
||||
let webviewTag = 'true'
|
||||
for (let arg of process.argv) {
|
||||
if (arg.indexOf('--guest-instance-id=') === 0) {
|
||||
// This is a guest web view.
|
||||
|
@ -73,8 +73,8 @@ for (let arg of process.argv) {
|
|||
isBackgroundPage = true
|
||||
} else if (arg.indexOf('--app-path=') === 0) {
|
||||
appPath = arg.substr(arg.indexOf('=') + 1)
|
||||
} else if (arg.indexOf('--override-webview-security=') === 0) {
|
||||
overrideWebViewSecurity = arg.substr(arg.indexOf('=') + 1)
|
||||
} else if (arg.indexOf('--webview-tag=') === 0) {
|
||||
webviewTag = arg.substr(arg.indexOf('=') + 1)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -97,7 +97,7 @@ if (window.location.protocol === 'chrome-devtools:') {
|
|||
require('./content-scripts-injector')
|
||||
|
||||
// Load webview tag implementation.
|
||||
if ((nodeIntegration === 'true' || overrideWebViewSecurity === 'true') && process.guestInstanceId == null) {
|
||||
if (webviewTag === 'true' && process.guestInstanceId == null) {
|
||||
require('./web-view/web-view')
|
||||
require('./web-view/web-view-attributes')
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue