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
ExtendableEvent NotificationEvent

Constructors

NameDescription
NotificationEvent(string, NotificationEventInit)Creates a notification event.

NotificationEvent(string, NotificationEventInit)

Notification.cs

Creates a notification event.

public NotificationEvent(string type, NotificationEventInit eventInitDict)

Properties

NameDescription
ActionGets the name of the activated action, or the empty string when the notification itself was activated (or closed).
NotificationGets the notification: a new object that represents the persistent notification.

Gets the name of the activated action, or the empty string when the notification itself was activated (or closed).

public string Action { get; }

Notification

Notification.cs

Gets the notification: a new object that represents the persistent notification.

public Notification Notification { get; }