1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-14 05:27:35 +00:00
serenity/Userland/Libraries/LibWeb/DOM/CustomEvent.idl
Luke Wilde f7ac3545cc 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.
2021-09-27 18:45:45 +02:00

8 lines
345 B
Text

[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);
};