NotificationOptions Class

The options of a notification (https://notifications.spec.whatwg.org/#dictdef-notificationoptions).

public sealed class NotificationOptions

Constructors

NameDescription
NotificationOptions()

NotificationOptions()

Notification.cs
public NotificationOptions()

No documentation is available.

Properties

NameDescription
ActionsGets the actions of the notification. The library does not support the actions: the list must be empty.
BadgeGets the URL of the badge of the notification.
BodyGets the body of the notification.
DataGets the data of the notification (a value that can be serialized by the structured clone algorithm).
DirGets the direction of the text.
IconGets the URL of the icon of the notification.
ImageGets the URL of the image of the notification.
LangGets the language of the text (a BCP 47 language tag, or the empty string).
NavigateGets the URL to navigate to when the notification is activated.
RenotifyGets whether the user is alerted again when the notification replaces another one.
RequireInteractionGets whether the notification stays until the user activates or closes it.
SilentGets whether the notification is silent (no sound nor vibration), or null for the default of the device.
TagGets the tag of the notification: a notification replaces the notification of the same origin with the same tag.
TimestampGets the time of the notification, in milliseconds since the Unix epoch (the current time by default).

Gets the actions of the notification. The library does not support the actions: the list must be empty.

public IReadOnlyList<NotificationAction> Actions { get; init; }

Gets the URL of the badge of the notification.

public string? Badge { get; init; }

Gets the body of the notification.

public string Body { get; init; }

Gets the data of the notification (a value that can be serialized by the structured clone algorithm).

public object? Data { get; init; }

Gets the direction of the text.

public NotificationDirection Dir { get; init; }

Gets the URL of the icon of the notification.

public string? Icon { get; init; }

Gets the URL of the image of the notification.

public string? Image { get; init; }

Gets the language of the text (a BCP 47 language tag, or the empty string).

public string Lang { get; init; }

Gets whether the user is alerted again when the notification replaces another one.

public bool Renotify { get; init; }

RequireInteraction

Notification.cs

Gets whether the notification stays until the user activates or closes it.

public bool RequireInteraction { get; init; }

Gets whether the notification is silent (no sound nor vibration), or null for the default of the device.

public bool? Silent { get; init; }

Gets the tag of the notification: a notification replaces the notification of the same origin with the same tag.

public string Tag { get; init; }

Gets the time of the notification, in milliseconds since the Unix epoch (the current time by default).

public ulong? Timestamp { get; init; }