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:
parent
386912c019
commit
627ad6c37c
9 changed files with 80 additions and 3 deletions
21
Userland/Libraries/LibWeb/UIEvents/FocusEvent.cpp
Normal file
21
Userland/Libraries/LibWeb/UIEvents/FocusEvent.cpp
Normal 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()
|
||||
{
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue