refactor: make name a prop on app (#17701)
Update app.name to be a property on app.
This commit is contained in:
parent
f2d41b7812
commit
8d83518f9a
15 changed files with 57 additions and 25 deletions
|
@ -661,12 +661,16 @@ to the npm modules spec. You should usually also specify a `productName`
|
|||
field, which is your application's full capitalized name, and which will be
|
||||
preferred over `name` by Electron.
|
||||
|
||||
**[Deprecated Soon](modernization/property-updates.md)**
|
||||
|
||||
### `app.setName(name)`
|
||||
|
||||
* `name` String
|
||||
|
||||
Overrides the current application's name.
|
||||
|
||||
**[Deprecated Soon](modernization/property-updates.md)**
|
||||
|
||||
### `app.getLocale()`
|
||||
|
||||
Returns `String` - The current application locale. Possible return values are documented [here](locales.md).
|
||||
|
@ -1366,3 +1370,12 @@ A `Boolean` property that returns `true` if the app is packaged, `false` otherw
|
|||
[Squirrel-Windows]: https://github.com/Squirrel/Squirrel.Windows
|
||||
[JumpListBeginListMSDN]: https://msdn.microsoft.com/en-us/library/windows/desktop/dd378398(v=vs.85).aspx
|
||||
[about-panel-options]: https://developer.apple.com/reference/appkit/nsapplication/1428479-orderfrontstandardaboutpanelwith?language=objc
|
||||
|
||||
### `app.name`
|
||||
|
||||
A `String` property that indicates the current application's name, which is the name in the application's `package.json` file.
|
||||
|
||||
Usually the `name` field of `package.json` is a short lowercased name, according
|
||||
to the npm modules spec. You should usually also specify a `productName`
|
||||
field, which is your application's full capitalized name, and which will be
|
||||
preferred over `name` by Electron.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue