mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 15:48:12 +00:00
LibJS: Add the Symbol.species getter to the appropriate built-ins
This commit is contained in:
parent
39c3aefe5d
commit
aefb7995f1
10 changed files with 45 additions and 0 deletions
|
@ -25,6 +25,8 @@ void ArrayBufferConstructor::initialize(GlobalObject& global_object)
|
|||
define_property(vm.names.prototype, global_object.array_buffer_prototype(), 0);
|
||||
define_property(vm.names.length, Value(1), Attribute::Configurable);
|
||||
define_native_function(vm.names.isView, is_view, 1, attr);
|
||||
|
||||
define_native_property(vm.well_known_symbol_species(), symbol_species_getter, {}, Attribute::Configurable);
|
||||
}
|
||||
|
||||
ArrayBufferConstructor::~ArrayBufferConstructor()
|
||||
|
@ -62,4 +64,9 @@ JS_DEFINE_NATIVE_FUNCTION(ArrayBufferConstructor::is_view)
|
|||
return Value(false);
|
||||
}
|
||||
|
||||
JS_DEFINE_NATIVE_GETTER(ArrayBufferConstructor::symbol_species_getter)
|
||||
{
|
||||
return vm.this_value(global_object);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue