Add support for notification actions on macOS
This commit is contained in:
parent
873a315538
commit
4f0d48f164
16 changed files with 136 additions and 13 deletions
|
@ -36,6 +36,7 @@ Returns `Boolean` - Whether or not desktop notifications are supported on the cu
|
|||
* `icon` [NativeImage](native-image.md) - (optional) An icon to use in the notification
|
||||
* `hasReply` Boolean - (optional) Whether or not to add an inline reply option to the notification. _macOS_
|
||||
* `replyPlaceholder` String - (optional) The placeholder to write in the inline reply input field. _macOS_
|
||||
* `actions` [NotificationAction[]](structures/notification-action.md) - Actions to add to the notification. Please read the available actions and limitations in the `NotificationAction` documentation _macOS_
|
||||
|
||||
|
||||
### Instance Events
|
||||
|
@ -83,6 +84,13 @@ Returns:
|
|||
|
||||
Emitted when the user clicks the "Reply" button on a notification with `hasReply: true`.
|
||||
|
||||
#### Event: 'action' _macOS_
|
||||
|
||||
Returns:
|
||||
|
||||
* `event` Event
|
||||
* `index` Number - The index of the action that was activated
|
||||
|
||||
### Instance Methods
|
||||
|
||||
Objects created with `new Notification` have the following instance methods:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue