mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-22 02:09:24 +00:00
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 :^)
This commit is contained in:
parent
661dd32432
commit
f952db1a1f
Notes:
sideshowbarker
2024-07-18 02:49:10 +09:00
Author: https://github.com/linusg
Commit: f952db1a1f
Pull-request: https://github.com/SerenityOS/serenity/pull/10437
Reviewed-by: https://github.com/awesomekling ✅
6 changed files with 75 additions and 0 deletions
14
Userland/Libraries/LibWeb/HTML/PromiseRejectionEvent.idl
Normal file
14
Userland/Libraries/LibWeb/HTML/PromiseRejectionEvent.idl
Normal file
|
@ -0,0 +1,14 @@
|
|||
#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;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue