1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-30 18:38:12 +00:00

LibJS: Set correct "length" of Object constructor

This commit is contained in:
Linus Groh 2020-05-02 18:40:19 +01:00 committed by Andreas Kling
parent 85582953c6
commit d007e8d00f

View file

@ -39,6 +39,7 @@ ObjectConstructor::ObjectConstructor()
: NativeFunction("Object", *interpreter().global_object().function_prototype())
{
put("prototype", interpreter().global_object().object_prototype(), 0);
put("length", Value(1), Attribute::Configurable);
u8 attr = Attribute::Writable | Attribute::Configurable;
put_native_function("defineProperty", define_property, 3, attr);