PromiseRejectionEvent Class

https://html.spec.whatwg.org/multipage/webappapis.html#promiserejectionevent

public sealed class PromiseRejectionEvent : Event
Inheritance
Event PromiseRejectionEvent

Constructors

NameDescription
PromiseRejectionEvent(string, PromiseRejectionEventInit)Creates a promise rejection event with the given type and initialization dictionary.

PromiseRejectionEvent(string, PromiseRejectionEventInit)

HtmlEvents.cs

Creates a promise rejection event with the given type and initialization dictionary.

public PromiseRejectionEvent(string type, PromiseRejectionEventInit eventInitDict)

Properties

NameDescription
Promisehttps://html.spec.whatwg.org/multipage/webappapis.html#dom-promiserejectionevent-promise: a value of the script engine.
ReasonGets the reason the promise was rejected.

https://html.spec.whatwg.org/multipage/webappapis.html#dom-promiserejectionevent-promise: a value of the script engine.

public object Promise { get; }

Gets the reason the promise was rejected.

public object? Reason { get; }