1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-17 22:15:07 +00:00
serenity/Libraries/LibWeb/DOM/Event.h
2020-03-22 19:53:22 +01:00

35 lines
644 B
C++

#pragma once
#include <AK/FlyString.h>
#include <LibWeb/Bindings/Wrappable.h>
namespace Web {
class Event
: public RefCounted<Event>
, public Bindings::Wrappable {
public:
using WrapperType = Bindings::EventWrapper;
static NonnullRefPtr<Event> create(const FlyString& event_name)
{
return adopt(*new Event(event_name));
}
virtual ~Event() {}
const FlyString& name() const { return m_event_name; }
virtual bool is_mouse_event() const { return false; }
protected:
Event(const FlyString& event_name)
: m_event_name(event_name)
{
}
private:
FlyString m_event_name;
};
}