mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 15:45:25 +00:00
LibJS: Add the Symbol.species getter to the appropriate built-ins
This commit is contained in:
committed by
Linus Groh
parent
39c3aefe5d
commit
aefb7995f1
@@ -37,6 +37,8 @@ void ArrayConstructor::initialize(GlobalObject& global_object)
|
||||
define_native_function(vm.names.from, from, 1, attr);
|
||||
define_native_function(vm.names.isArray, is_array, 1, attr);
|
||||
define_native_function(vm.names.of, of, 0, attr);
|
||||
|
||||
define_native_property(vm.well_known_symbol_species(), symbol_species_getter, {}, Attribute::Configurable);
|
||||
}
|
||||
|
||||
Value ArrayConstructor::call()
|
||||
@@ -151,4 +153,9 @@ JS_DEFINE_NATIVE_FUNCTION(ArrayConstructor::of)
|
||||
return array;
|
||||
}
|
||||
|
||||
JS_DEFINE_NATIVE_GETTER(ArrayConstructor::symbol_species_getter)
|
||||
{
|
||||
return vm.this_value(global_object);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user