NotificationEvent Class
The notificationclick and notificationclose events of a service worker (https://notifications.spec.whatwg.org/#notificationevent): the user activated (Notification.Click) or closed (Notification.Dismiss) a persistent notification of its registration.
public sealed class NotificationEvent : ExtendableEvent- Inheritance
ExtendableEventNotificationEvent
Constructors
| Name | Description |
|---|---|
| NotificationEvent(string, NotificationEventInit) | Creates a notification event. |
NotificationEvent(string, NotificationEventInit)
Notification.csCreates a notification event.
public NotificationEvent(string type, NotificationEventInit eventInitDict)Properties
| Name | Description |
|---|---|
| Action | Gets the name of the activated action, or the empty string when the notification itself was activated (or closed). |
| Notification | Gets the notification: a new object that represents the persistent notification. |
Action
Notification.csGets the name of the activated action, or the empty string when the notification itself was activated (or closed).
public string Action { get; }Notification
Notification.csGets the notification: a new object that represents the persistent notification.
public Notification Notification { get; }