@lynx-js/lynxtron / Notification
Notification
继承
unknown
构造函数
new Notification()
参数
返回
重写了
EventEmitter.constructor
定义于
apis/api/notification.d.ts:148
属性
actions
A NotificationAction[] property representing the actions of the notification.
定义于
body
A string property representing the body of the notification.
定义于
apis/api/notification.d.ts:102
closeButtonText
A string property representing the close button text of the notification.
定义于
apis/api/notification.d.ts:106
hasReply
A boolean property representing whether the notification has a reply action.
定义于
apis/api/notification.d.ts:110
replyPlaceholder
A string property representing the reply placeholder of the notification.
定义于
apis/api/notification.d.ts:114
silent
A boolean property representing whether the notification is silent.
定义于
apis/api/notification.d.ts:118
sound
A string property representing the sound of the notification.
定义于
apis/api/notification.d.ts:122
subtitle
A string property representing the subtitle of the notification.
定义于
apis/api/notification.d.ts:126
timeoutType Windows
A string property representing the type of timeout duration for the
notification. Can be 'default' or 'never'.
If timeoutType is set to 'never', the notification never expires. It stays
open until closed by the calling API or the user.
定义于
apis/api/notification.d.ts:136
title
A string property representing the title of the notification.
定义于
apis/api/notification.d.ts:140
toastXml Windows
A string property representing the custom Toast XML of the notification.
定义于
apis/api/notification.d.ts:146
方法
addListener()
event: "show"
参数
返回
this
定义于
apis/api/notification.d.ts:171
event: "click"
参数
返回
this
定义于
apis/api/notification.d.ts:180
event: "close"
参数
返回
this
定义于
apis/api/notification.d.ts:189
event: "reply"
参数
返回
this
定义于
apis/api/notification.d.ts:200
event: "action"
参数
返回
this
定义于
apis/api/notification.d.ts:217
event: "failed"
参数
返回
this
定义于
apis/api/notification.d.ts:234
close()
Dismisses the notification.
返回
void
定义于
apis/api/notification.d.ts:158
isSupported()
Whether or not desktop notifications are supported on the current system.
返回
boolean
定义于
apis/api/notification.d.ts:163
off()
event: "show"
参数
返回
this
定义于
apis/api/notification.d.ts:169
event: "click"
参数
返回
this
定义于
apis/api/notification.d.ts:178
event: "close"
参数
返回
this
定义于
apis/api/notification.d.ts:187
event: "reply"
参数
返回
this
定义于
apis/api/notification.d.ts:198
event: "action"
参数
返回
this
定义于
apis/api/notification.d.ts:215
event: "failed"
参数
返回
this
定义于
apis/api/notification.d.ts:232
on()
event: "show"
Emitted when the notification is shown to the user.
参数
返回
this
定义于
apis/api/notification.d.ts:168
event: "click"
Emitted when the notification is clicked by the user.
参数
返回
this
定义于
apis/api/notification.d.ts:177
event: "close"
Emitted when the notification is closed by manual intervention from the user.
参数
返回
this
定义于
apis/api/notification.d.ts:186
event: "reply" macOS
Emitted when the user clicks the "Reply" button on a notification with hasReply: true.
参数
返回
this
定义于
apis/api/notification.d.ts:197
event: "action" macOS
Emitted when the user clicks one of the actions on a notification.
参数
返回
this
定义于
apis/api/notification.d.ts:214
event: "failed" Windows
Emitted when an error is encountered while showing the notification.
参数
返回
this
定义于
apis/api/notification.d.ts:231
once()
event: "show"
参数
返回
this
定义于
apis/api/notification.d.ts:170
event: "click"
参数
返回
this
定义于
apis/api/notification.d.ts:179
event: "close"
参数
返回
this
定义于
apis/api/notification.d.ts:188
event: "reply"
参数
返回
this
定义于
apis/api/notification.d.ts:199
event: "action"
参数
返回
this
定义于
apis/api/notification.d.ts:216
event: "failed"
参数
返回
this
定义于
apis/api/notification.d.ts:233
removeListener()
event: "show"
参数
返回
this
定义于
apis/api/notification.d.ts:172
event: "click"
参数
返回
this
定义于
apis/api/notification.d.ts:181
event: "close"
参数
返回
this
定义于
apis/api/notification.d.ts:190
event: "reply"
参数
返回
this
定义于
apis/api/notification.d.ts:204
event: "action"
参数
返回
this
定义于
apis/api/notification.d.ts:221
event: "failed"
参数
返回
this
定义于
apis/api/notification.d.ts:238
show()
Immediately shows the notification to the user.
返回
void
定义于