/* * Copyright (c) 2022, Andreas Kling * * SPDX-License-Identifier: BSD-2-Clause */ #include #include namespace Web::UIEvents { FocusEvent* FocusEvent::create_with_global_object(HTML::Window& window_object, FlyString const& event_name, FocusEventInit const& event_init) { return window_object.heap().allocate(window_object.realm(), window_object, event_name, event_init); } FocusEvent::FocusEvent(HTML::Window& window_object, FlyString const& event_name, FocusEventInit const& event_init) : UIEvent(window_object, event_name) { set_prototype(&window_object.cached_web_prototype("FocusEvent")); set_related_target(const_cast(event_init.related_target.ptr())); } FocusEvent::~FocusEvent() = default; }