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))
|
||||
|
|
|
@ -163,6 +163,7 @@ const char kZoomFactor[] = "zoom-factor";
|
|||
const char kPreloadScript[] = "preload";
|
||||
const char kPreloadURL[] = "preload-url";
|
||||
const char kNodeIntegration[] = "node-integration";
|
||||
const char kIsolatedWorld[] = "isolated-world";
|
||||
const char kGuestInstanceID[] = "guest-instance-id";
|
||||
const char kOpenerID[] = "opener-id";
|
||||
const char kScrollBounce[] = "scroll-bounce";
|
||||
|
|
|
@ -86,6 +86,7 @@ extern const char kZoomFactor[];
|
|||
extern const char kPreloadScript[];
|
||||
extern const char kPreloadURL[];
|
||||
extern const char kNodeIntegration[];
|
||||
extern const char kIsolatedWorld[];
|
||||
extern const char kGuestInstanceID[];
|
||||
extern const char kOpenerID[];
|
||||
extern const char kScrollBounce[];
|
||||
|
|
Loading…
Reference in a new issue