1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-28 22:45:07 +00:00

LibWeb: Split JS wrapper constructors into construct/initialize

This commit is contained in:
Andreas Kling 2020-06-20 17:28:13 +02:00
parent 06e29fac57
commit 03da70c7d0
31 changed files with 107 additions and 55 deletions

View file

@ -40,9 +40,13 @@ ImageDataWrapper* wrap(JS::Heap& heap, ImageData& event)
return static_cast<ImageDataWrapper*>(wrap_impl(heap, event));
}
ImageDataWrapper::ImageDataWrapper(ImageData& impl)
: Wrapper(*interpreter().global_object().object_prototype())
ImageDataWrapper::ImageDataWrapper(JS::GlobalObject& global_object, ImageData& impl)
: Wrapper(*global_object.object_prototype())
, m_impl(impl)
{
}
void ImageDataWrapper::initialize(JS::Interpreter&, JS::GlobalObject&)
{
define_native_property("width", width_getter, nullptr);
define_native_property("height", height_getter, nullptr);