mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:37:36 +00:00
LibWeb: Provide a default DOM::EventTarget::dispatch_event()
All EventTarget subclasses except Window do the same exact thing in their overrides, so let's just share an implementation in the base.
This commit is contained in:
parent
8dcf4e0346
commit
0ee457dfdf
16 changed files with 8 additions and 43 deletions
|
@ -41,11 +41,6 @@ void Performance::unref_event_target()
|
|||
m_window.unref();
|
||||
}
|
||||
|
||||
bool Performance::dispatch_event(NonnullRefPtr<DOM::Event> event)
|
||||
{
|
||||
return DOM::EventDispatcher::dispatch(*this, event);
|
||||
}
|
||||
|
||||
JS::Object* Performance::create_wrapper(JS::GlobalObject& global_object)
|
||||
{
|
||||
return Bindings::wrap(global_object, *this);
|
||||
|
|
|
@ -32,7 +32,6 @@ public:
|
|||
virtual void ref_event_target() override;
|
||||
virtual void unref_event_target() override;
|
||||
|
||||
virtual bool dispatch_event(NonnullRefPtr<DOM::Event>) override;
|
||||
virtual JS::Object* create_wrapper(JS::GlobalObject&) override;
|
||||
|
||||
private:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue