mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 08:08:12 +00:00

SPDX License Identifiers are a more compact / standardized way of representing file license information. See: https://spdx.dev/resources/use/#identifiers This was done with the `ambr` search and replace tool. ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
22 lines
599 B
C++
22 lines
599 B
C++
/*
|
|
* Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#include <LibWeb/Bindings/EventWrapper.h>
|
|
#include <LibWeb/Bindings/EventWrapperFactory.h>
|
|
#include <LibWeb/Bindings/MouseEventWrapper.h>
|
|
|
|
namespace Web {
|
|
namespace Bindings {
|
|
|
|
EventWrapper* wrap(JS::GlobalObject& global_object, DOM::Event& event)
|
|
{
|
|
if (is<UIEvents::MouseEvent>(event))
|
|
return static_cast<MouseEventWrapper*>(wrap_impl(global_object, static_cast<UIEvents::MouseEvent&>(event)));
|
|
return static_cast<EventWrapper*>(wrap_impl(global_object, event));
|
|
}
|
|
|
|
}
|
|
}
|