mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 14:57:35 +00:00
LibWeb: Make document.createEvent("UIEvent") actually create a UIEvent
There were two things preventing this from working right: - UIEvents::UIEvent::create() was actually just DOM::Event::create() - We didn't return the right JavaScript wrapper type for UIEvent
This commit is contained in:
parent
31508b2788
commit
093e66afc0
2 changed files with 8 additions and 1 deletions
|
@ -21,6 +21,11 @@ class UIEvent : public DOM::Event {
|
|||
public:
|
||||
using WrapperType = Bindings::UIEventWrapper;
|
||||
|
||||
static NonnullRefPtr<UIEvent> create(FlyString const& type)
|
||||
{
|
||||
return adopt_ref(*new UIEvent(type));
|
||||
}
|
||||
|
||||
static NonnullRefPtr<UIEvent> create_with_global_object(Bindings::WindowObject&, FlyString const& event_name, UIEventInit const& event_init)
|
||||
{
|
||||
return adopt_ref(*new UIEvent(event_name, event_init));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue