1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 01:07:36 +00:00

LibWeb: Add a proper FocusEvent interface for "focus" and "blur" events

This commit is contained in:
Andreas Kling 2022-02-07 00:04:10 +01:00
parent 386912c019
commit 627ad6c37c
9 changed files with 80 additions and 3 deletions

View file

@ -0,0 +1,21 @@
/*
* Copyright (c) 2022, Andreas Kling <kling@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibWeb/UIEvents/FocusEvent.h>
namespace Web::UIEvents {
FocusEvent::FocusEvent(FlyString const& event_name, FocusEventInit const& event_init)
: UIEvent(event_name)
{
set_related_target(const_cast<DOM::EventTarget*>(event_init.related_target.ptr()));
}
FocusEvent::~FocusEvent()
{
}
}