1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 22:17:44 +00:00

LibWeb: Implement the EventTarget constructor

This is typically used as `class A extends EventTarget`. It's usage can
be found on websites such as https://loadout.tf/

This has the quirk that we don't do set the EventTarget prototype for
HTML::Window, as it would cause a null deref on startup. However, given
it wasn't doing this before, I don't think it should cause any issues.
This commit is contained in:
Luke Wilde 2023-05-03 21:10:26 +01:00 committed by Andreas Kling
parent 1127bdb65c
commit 344785ae3a
3 changed files with 24 additions and 0 deletions

View file

@ -4,6 +4,8 @@
[Exposed=*, UseNewAKString]
interface EventTarget {
constructor();
undefined addEventListener(DOMString type, EventListener? callback, optional (AddEventListenerOptions or boolean) options = {});
undefined removeEventListener(DOMString type, EventListener? callback, optional (EventListenerOptions or boolean) options = {});