1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 06:58:11 +00:00
serenity/Userland/Libraries/LibWeb/Bindings/EventTargetWrapperFactory.cpp
Linus Groh 40a70461a0 LibWeb: Replace GlobalObject with Realm in wrapper functions
Similar to create() in LibJS, wrap() et al. are on a low enough level to
warrant passing a Realm directly instead of relying on the current realm
from the VM, as a wrapper may need to be allocated while no JS is being
executed.
2022-08-23 13:58:30 +01:00

17 lines
340 B
C++

/*
* Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibWeb/Bindings/EventTargetWrapperFactory.h>
#include <LibWeb/DOM/EventTarget.h>
namespace Web::Bindings {
JS::Object* wrap(JS::Realm& realm, DOM::EventTarget& target)
{
return target.create_wrapper(realm);
}
}