
This paves the way for the rejectionhandled and unhandledrejection events. It's also used by core-js (in browsers, at least) to check whether Promise needs to be polyfilled, so adding it should allow more websites to leverage LibJS's native Promise implementation :^)
14 lines
357 B
Text
14 lines
357 B
Text
#import <DOM/Event.idl>
|
|
|
|
[Exposed=(Window,Worker)]
|
|
interface PromiseRejectionEvent : Event {
|
|
constructor(DOMString type, PromiseRejectionEventInit eventInitDict);
|
|
|
|
readonly attribute Promise<any> promise;
|
|
readonly attribute any reason;
|
|
};
|
|
|
|
dictionary PromiseRejectionEventInit : EventInit {
|
|
required Promise<any> promise;
|
|
any reason;
|
|
};
|