ladybird/Userland/Libraries/LibWeb/HTML/PageTransitionEvent.h
Timothy Flynn 2692db8699 LibJS+Everywhere: Allow Cell::initialize overrides to throw OOM errors
Note that as of this commit, there aren't any such throwers, and the
call site in Heap::allocate will drop exceptions on the floor. This
commit only serves to change the declaration of the overrides, make sure
they return an empty value, and to propagate OOM errors frm their base
initialize invocations.
2023-01-29 00:02:45 +00:00

36 lines
1,008 B
C++

/*
* Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibWeb/DOM/Event.h>
namespace Web::HTML {
struct PageTransitionEventInit : public DOM::EventInit {
bool persisted { false };
};
class PageTransitionEvent final : public DOM::Event {
WEB_PLATFORM_OBJECT(PageTransitionEvent, DOM::Event);
public:
static PageTransitionEvent* create(JS::Realm&, DeprecatedFlyString const& event_name, PageTransitionEventInit const& event_init);
static PageTransitionEvent* construct_impl(JS::Realm&, DeprecatedFlyString const& event_name, PageTransitionEventInit const& event_init);
PageTransitionEvent(JS::Realm&, DeprecatedFlyString const& event_name, PageTransitionEventInit const& event_init);
virtual ~PageTransitionEvent() override;
bool persisted() const { return m_persisted; }
private:
virtual JS::ThrowCompletionOr<void> initialize(JS::Realm&) override;
bool m_persisted { false };
};
}