docs: specify use case for the 'services' role (#18484)

* docs: specify use case for the 'services' role

* update based on @caesar's recommendation

Co-Authored-By: Caesar Schinas <caesar@caesarschinas.com>
This commit is contained in:
Shelley Vohr 2019-05-30 14:33:48 -07:00 committed by GitHub
parent 02dc1b266c
commit 554ee92b39
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

View file

@ -108,7 +108,7 @@ The following additional roles are available on _macOS_:
* `moveTabToNewWindow` - Map to the `moveTabToNewWindow` action.
* `window` - The submenu is a "Window" menu.
* `help` - The submenu is a "Help" menu.
* `services` - The submenu is a "Services" menu.
* `services` - The submenu is a ["Services"](https://developer.apple.com/documentation/appkit/nsapplication/1428608-servicesmenu?language=objc) menu. This is only intended for use in the Application Menu and is *not* the same as the "Services" submenu used in context menus in macOS apps, which is not implemented in Electron.
* `recentDocuments` - The submenu is an "Open Recent" menu.
* `clearRecentDocuments` - Map to the `clearRecentDocuments` action.

View file

@ -277,7 +277,6 @@ window.addEventListener('contextmenu', (e) => {
</script>
```
## Notes on macOS Application Menu
macOS has a completely different style of application menu from Windows and
@ -285,7 +284,7 @@ Linux. Here are some notes on making your app's menu more native-like.
### Standard Menus
On macOS there are many system-defined standard menus, like the `Services` and
On macOS there are many system-defined standard menus, like the [`Services`](https://developer.apple.com/documentation/appkit/nsapplication/1428608-servicesmenu?language=objc) and
`Windows` menus. To make your menu a standard menu, you should set your menu's
`role` to one of the following and Electron will recognize them and make them
become standard menus: