Add disable-javascript command-line flag to match documentation (issue #1848)

This commit is contained in:
Marshall Greenblatt
2018-09-25 14:01:59 +02:00
parent b9c10cb46e
commit 64cd460c73
3 changed files with 6 additions and 0 deletions

View File

@@ -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 =