ladybird/Userland/Libraries/LibWeb/HTML/PromiseRejectionEvent.idl
Linus Groh f952db1a1f LibWeb: Implement PromiseRejectionEvent
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 :^)
2021-10-11 13:30:17 +01:00

15 lines
357 B
Plaintext

#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;
};