mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:18:11 +00:00
LibWeb: Split JS wrapper constructors into construct/initialize
This commit is contained in:
parent
06e29fac57
commit
03da70c7d0
31 changed files with 107 additions and 55 deletions
|
@ -38,9 +38,13 @@
|
|||
namespace Web {
|
||||
namespace Bindings {
|
||||
|
||||
EventTargetWrapper::EventTargetWrapper(EventTarget& impl)
|
||||
: Wrapper(*interpreter().global_object().object_prototype())
|
||||
EventTargetWrapper::EventTargetWrapper(JS::GlobalObject& global_object, EventTarget& impl)
|
||||
: Wrapper(*global_object.object_prototype())
|
||||
, m_impl(impl)
|
||||
{
|
||||
}
|
||||
|
||||
void EventTargetWrapper::initialize(JS::Interpreter&, JS::GlobalObject&)
|
||||
{
|
||||
define_native_function("addEventListener", add_event_listener, 2);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue