feat: add app.commandLine.hasSwitch() / app.commandLine.getSwitchValue() (#16282)
* feat: add app.commandLine.hasSwitch() / app.commandLine.getSwitchValue() * add more tests * refactor: move appendSwitch / appendArgument to command_line module * replace AppendSwitchASCII with AppendSwitchNative * remove castArgs
This commit is contained in:
parent
5957ede41a
commit
6f117b8e0c
7 changed files with 135 additions and 38 deletions
|
@ -1159,6 +1159,20 @@ correctly.
|
|||
|
||||
**Note:** This will not affect `process.argv`.
|
||||
|
||||
### `app.commandLine.hasSwitch(switch)`
|
||||
|
||||
* `switch` String - A command-line switch
|
||||
|
||||
Returns `Boolean` - Whether the command-line switch is present.
|
||||
|
||||
### `app.commandLine.getSwitchValue(switch)`
|
||||
|
||||
* `switch` String - A command-line switch
|
||||
|
||||
Returns `String` - The command-line switch value.
|
||||
|
||||
**Note:** When the switch is not present, it returns empty string.
|
||||
|
||||
### `app.enableSandbox()` _Experimental_ _macOS_ _Windows_
|
||||
|
||||
Enables full sandbox mode on the app.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue