docs: improve app.commandLine documentation (#16757)
		
	This commit is contained in:
		
					parent
					
						
							
								8946cfd4f1
							
						
					
				
			
			
				commit
				
					
						b7afec0743
					
				
			
		
					 1 changed files with 9 additions and 6 deletions
				
			
		| 
						 | 
					@ -1188,22 +1188,25 @@ Start accessing a security scoped resource. With this method Electron applicatio
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### `app.commandLine.appendSwitch(switch[, value])`
 | 
					### `app.commandLine.appendSwitch(switch[, value])`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
* `switch` String - A command-line switch
 | 
					* `switch` String - A command-line switch, without the leading `--`
 | 
				
			||||||
* `value` String (optional) - A value for the given switch
 | 
					* `value` String (optional) - A value for the given switch
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Append a switch (with optional `value`) to Chromium's command line.
 | 
					Append a switch (with optional `value`) to Chromium's command line.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
**Note:** This will not affect `process.argv`, and is mainly used by developers
 | 
					**Note:** This will not affect `process.argv`. The intended usage of this function is to
 | 
				
			||||||
to control some low-level Chromium behaviors.
 | 
					control Chromium's behavior.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### `app.commandLine.appendArgument(value)`
 | 
					### `app.commandLine.appendArgument(value)`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
* `value` String - The argument to append to the command line
 | 
					* `value` String - The argument to append to the command line
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Append an argument to Chromium's command line. The argument will be quoted
 | 
					Append an argument to Chromium's command line. The argument will be quoted
 | 
				
			||||||
correctly.
 | 
					correctly. Switches will precede arguments regardless of appending order.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
**Note:** This will not affect `process.argv`.
 | 
					If you're appending an argument like `--switch=value`, consider using `appendSwitch('switch', 'value')` instead.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					**Note:** This will not affect `process.argv`. The intended usage of this function is to
 | 
				
			||||||
 | 
					control Chromium's behavior.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### `app.commandLine.hasSwitch(switch)`
 | 
					### `app.commandLine.hasSwitch(switch)`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1217,7 +1220,7 @@ Returns `Boolean` - Whether the command-line switch is present.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Returns `String` - The command-line switch value.
 | 
					Returns `String` - The command-line switch value.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
**Note:** When the switch is not present, it returns empty string.
 | 
					**Note:** When the switch is not present or has no value, it returns empty string.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### `app.enableSandbox()` _Experimental_ _macOS_ _Windows_
 | 
					### `app.enableSandbox()` _Experimental_ _macOS_ _Windows_
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue