/src/serenity/Userland/Libraries/LibWeb/HTML/PageTransitionEvent.cpp
Line | Count | Source |
1 | | /* |
2 | | * Copyright (c) 2022, Andreas Kling <kling@serenityos.org> |
3 | | * |
4 | | * SPDX-License-Identifier: BSD-2-Clause |
5 | | */ |
6 | | |
7 | | #include <LibWeb/Bindings/Intrinsics.h> |
8 | | #include <LibWeb/Bindings/PageTransitionEventPrototype.h> |
9 | | #include <LibWeb/HTML/PageTransitionEvent.h> |
10 | | |
11 | | namespace Web::HTML { |
12 | | |
13 | | JS_DEFINE_ALLOCATOR(PageTransitionEvent); |
14 | | |
15 | | JS::NonnullGCPtr<PageTransitionEvent> PageTransitionEvent::create(JS::Realm& realm, FlyString const& event_name, PageTransitionEventInit const& event_init) |
16 | 0 | { |
17 | 0 | return realm.heap().allocate<PageTransitionEvent>(realm, realm, event_name, event_init); |
18 | 0 | } |
19 | | |
20 | | WebIDL::ExceptionOr<JS::NonnullGCPtr<PageTransitionEvent>> PageTransitionEvent::construct_impl(JS::Realm& realm, FlyString const& event_name, PageTransitionEventInit const& event_init) |
21 | 0 | { |
22 | 0 | return create(realm, event_name, event_init); |
23 | 0 | } |
24 | | |
25 | | PageTransitionEvent::PageTransitionEvent(JS::Realm& realm, FlyString const& event_name, PageTransitionEventInit const& event_init) |
26 | 0 | : DOM::Event(realm, event_name, event_init) |
27 | 0 | , m_persisted(event_init.persisted) |
28 | 0 | { |
29 | 0 | } |
30 | | |
31 | 0 | PageTransitionEvent::~PageTransitionEvent() = default; |
32 | | |
33 | | void PageTransitionEvent::initialize(JS::Realm& realm) |
34 | 0 | { |
35 | 0 | Base::initialize(realm); |
36 | 0 | WEB_SET_PROTOTYPE_FOR_INTERFACE(PageTransitionEvent); |
37 | 0 | } |
38 | | |
39 | | } |