Add disable-javascript command-line flag to match documentation (issue #1848)
This commit is contained in:
parent
b9c10cb46e
commit
64cd460c73
|
@ -49,6 +49,8 @@ void SetDefaultPrefs(content::WebPreferences& web) {
|
|||
const base::CommandLine* command_line =
|
||||
base::CommandLine::ForCurrentProcess();
|
||||
|
||||
web.javascript_enabled =
|
||||
!command_line->HasSwitch(switches::kDisableJavascript);
|
||||
web.allow_scripts_to_close_windows =
|
||||
!command_line->HasSwitch(switches::kDisableJavascriptCloseWindows);
|
||||
web.javascript_can_access_clipboard =
|
||||
|
|
|
@ -29,6 +29,9 @@ const char kUncaughtExceptionStackSize[] = "uncaught-exception-stack-size";
|
|||
// Default encoding.
|
||||
const char kDefaultEncoding[] = "default-encoding";
|
||||
|
||||
// Disable JavaScript.
|
||||
const char kDisableJavascript[] = "disable-javascript";
|
||||
|
||||
// Disable closing of windows via JavaScript.
|
||||
const char kDisableJavascriptCloseWindows[] =
|
||||
"disable-javascript-close-windows";
|
||||
|
|
|
@ -23,6 +23,7 @@ extern const char kLocalesDirPath[];
|
|||
extern const char kDisablePackLoading[];
|
||||
extern const char kUncaughtExceptionStackSize[];
|
||||
extern const char kDefaultEncoding[];
|
||||
extern const char kDisableJavascript[];
|
||||
extern const char kDisableJavascriptCloseWindows[];
|
||||
extern const char kDisableJavascriptAccessClipboard[];
|
||||
extern const char kDisableJavascriptDomPaste[];
|
||||
|
|
Loading…
Reference in New Issue