Add isolated world web preference option
This commit is contained in:
parent
cdf33ff3dc
commit
4bca6fe672
3 changed files with 7 additions and 0 deletions
|
@ -119,6 +119,11 @@ void WebContentsPreferences::AppendExtraCommandLineSwitches(
|
|||
LOG(ERROR) << "preload url must be file:// protocol.";
|
||||
}
|
||||
|
||||
// Run Electron APIs and preload script in isolated world
|
||||
bool isolated;
|
||||
if (web_preferences.GetBoolean("isolated", &isolated) && isolated)
|
||||
command_line->AppendSwitch(switches::kIsolatedWorld);
|
||||
|
||||
// --background-color.
|
||||
std::string color;
|
||||
if (web_preferences.GetString(options::kBackgroundColor, &color))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue