capricorn86 / happy-dom

A JavaScript implementation of a web browser without its graphical user interface
MIT License
3.08k stars 185 forks source link

Missing window.PromiseRejectionEvent API #1454

Open chenxinyanc opened 1 month ago

chenxinyanc commented 1 month ago

Describe the bug While there is ErrorEvent provided by happy-dom, there seems to be a lack of PromiseRejectionEvent from window.

To Reproduce Use the following code in vitest with environment: "happy-dom" as vitest config.

console.log(window.ErrorEvent);
console.log(window.PromiseRejectionEvent);

Expected behavior I should see both logs to be non-undefined.

Screenshots image

[class ErrorEvent extends UIEvent]
undefined

Device:

Additional context Add any other context about the problem here.