mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:07:47 +00:00
LibWeb: Make DOM::Event and all its subclasses GC-allocated
This commit is contained in:
parent
a4ddb0ef87
commit
7c3db526b0
76 changed files with 892 additions and 565 deletions
|
@ -15,30 +15,27 @@ struct PageTransitionEventInit : public DOM::EventInit {
|
|||
};
|
||||
|
||||
class PageTransitionEvent final : public DOM::Event {
|
||||
JS_OBJECT(PageTransitionEvent, DOM::Event);
|
||||
|
||||
public:
|
||||
using WrapperType = Bindings::PageTransitionEventWrapper;
|
||||
static PageTransitionEvent* create(Bindings::WindowObject&, FlyString const& event_name, PageTransitionEventInit const& event_init);
|
||||
static PageTransitionEvent* create_with_global_object(Bindings::WindowObject&, FlyString const& event_name, PageTransitionEventInit const& event_init);
|
||||
|
||||
static NonnullRefPtr<PageTransitionEvent> create(FlyString const& event_name, PageTransitionEventInit const& event_init)
|
||||
{
|
||||
return adopt_ref(*new PageTransitionEvent(event_name, event_init));
|
||||
}
|
||||
static NonnullRefPtr<PageTransitionEvent> create_with_global_object(Bindings::WindowObject&, FlyString const& event_name, PageTransitionEventInit const& event_init)
|
||||
{
|
||||
return PageTransitionEvent::create(event_name, event_init);
|
||||
}
|
||||
PageTransitionEvent(Bindings::WindowObject&, FlyString const& event_name, PageTransitionEventInit const& event_init);
|
||||
|
||||
virtual ~PageTransitionEvent() override = default;
|
||||
virtual ~PageTransitionEvent() override;
|
||||
|
||||
PageTransitionEvent& impl() { return *this; }
|
||||
|
||||
bool persisted() const { return m_persisted; }
|
||||
|
||||
protected:
|
||||
PageTransitionEvent(FlyString const& event_name, PageTransitionEventInit const& event_init)
|
||||
: DOM::Event(event_name, event_init)
|
||||
, m_persisted(event_init.persisted)
|
||||
{
|
||||
}
|
||||
|
||||
private:
|
||||
bool m_persisted { false };
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
namespace Web::Bindings {
|
||||
inline JS::Object* wrap(JS::Realm&, Web::HTML::PageTransitionEvent& object) { return &object; }
|
||||
using PageTransitionEventWrapper = Web::HTML::PageTransitionEvent;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue