ladybird/Userland/Libraries/LibWeb/UIEvents/FocusEvent.h
Andrew Kaster 6a10352712 LibWeb: Remove unecessary dependence on Window from UIEvents classes
These classes only needed Window to get at its realm. Pass a realm
directly to construct UIEvents classes.
2022-10-01 21:05:32 +01:00

30 lines
632 B
C++

/*
* Copyright (c) 2022, Andreas Kling <kling@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibWeb/UIEvents/UIEvent.h>
namespace Web::UIEvents {
struct FocusEventInit : public UIEventInit {
JS::GCPtr<DOM::EventTarget> related_target;
};
class FocusEvent final : public UIEvent {
WEB_PLATFORM_OBJECT(FocusEvent, UIEvent);
public:
static FocusEvent* construct_impl(JS::Realm&, FlyString const& event_name, FocusEventInit const& event_init);
virtual ~FocusEvent() override;
private:
FocusEvent(JS::Realm&, FlyString const& event_name, FocusEventInit const&);
};
}