diff options
Diffstat (limited to 'Userland/Libraries/LibWeb/HTML/PageTransitionEvent.h')
-rw-r--r-- | Userland/Libraries/LibWeb/HTML/PageTransitionEvent.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/HTML/PageTransitionEvent.h b/Userland/Libraries/LibWeb/HTML/PageTransitionEvent.h new file mode 100644 index 0000000000..7c3602ed1f --- /dev/null +++ b/Userland/Libraries/LibWeb/HTML/PageTransitionEvent.h @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2021, Andreas Kling <kling@serenityos.org> + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#pragma once + +#include <LibWeb/DOM/Event.h> + +namespace Web::HTML { + +class PageTransitionEvent final : public DOM::Event { +public: + using WrapperType = Bindings::PageTransitionEventWrapper; + + static NonnullRefPtr<PageTransitionEvent> create(FlyString event_name, bool persisted) + { + return adopt_ref(*new PageTransitionEvent(move(event_name), persisted)); + } + + virtual ~PageTransitionEvent() override = default; + + bool persisted() const { return m_persisted; } + +protected: + PageTransitionEvent(FlyString event_name, bool persisted) + : DOM::Event(move(event_name)) + , m_persisted(persisted) + { + } + + bool m_persisted { false }; +}; + +} |