mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 14:37:45 +00:00
LibWeb: Add initial support for CustomEvent
This is used surprisingly often. For example, it is used by a core YouTube library called Structured Page Fragments. It allows you to manually dispatch an event with arbitrary data attached to it. The only thing missing from this implementation is the constructor. This is because WrapperGenerator is currently missing dictionary capabilities.
This commit is contained in:
parent
b04fafee74
commit
f7ac3545cc
8 changed files with 99 additions and 1 deletions
8
Userland/Libraries/LibWeb/DOM/CustomEvent.idl
Normal file
8
Userland/Libraries/LibWeb/DOM/CustomEvent.idl
Normal file
|
@ -0,0 +1,8 @@
|
|||
[Exposed=(Window,Worker), CustomVisit]
|
||||
interface CustomEvent : Event {
|
||||
// FIXME: constructor(DOMString type, optional CustomEventInit eventInitDict = {});
|
||||
|
||||
readonly attribute any detail;
|
||||
|
||||
undefined initCustomEvent(DOMString type, optional boolean bubbles = false, optional boolean cancelable = false, optional any detail = null);
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue