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
commit d007e8d00f
Notes: sideshowbarker 2024-07-19 07:02:17 +09:00

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);