refactor: make name a prop on app (#17701)

Update app.name to be a property on app.
This commit is contained in:
Shelley Vohr 2019-04-30 13:55:33 -07:00 committed by GitHub
parent f2d41b7812
commit 8d83518f9a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 57 additions and 25 deletions

View file

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