summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/HTML/PageTransitionEvent.h
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibWeb/HTML/PageTransitionEvent.h')
-rw-r--r--Userland/Libraries/LibWeb/HTML/PageTransitionEvent.h31
1 files changed, 14 insertions, 17 deletions
diff --git a/Userland/Libraries/LibWeb/HTML/PageTransitionEvent.h b/Userland/Libraries/LibWeb/HTML/PageTransitionEvent.h
index a2477524f0..febd7ccb2b 100644
--- a/Userland/Libraries/LibWeb/HTML/PageTransitionEvent.h
+++ b/Userland/Libraries/LibWeb/HTML/PageTransitionEvent.h
@@ -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;
- bool persisted() const { return m_persisted; }
+ PageTransitionEvent& impl() { return *this; }
-protected:
- PageTransitionEvent(FlyString const& event_name, PageTransitionEventInit const& event_init)
- : DOM::Event(event_name, event_init)
- , m_persisted(event_init.persisted)
- {
- }
+ bool persisted() const { return m_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;
+}