blob: 183a3c92e74386153f591946a913fe9ce3d96320 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
/*
* 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));
}
}
}
|