mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +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
@@ -22,6 +22,8 @@ void RegExpConstructor::initialize(GlobalObject& global_object)
|
||||
NativeFunction::initialize(global_object);
|
||||
define_property(vm.names.prototype, global_object.regexp_prototype(), 0);
|
||||
define_property(vm.names.length, Value(2), Attribute::Configurable);
|
||||
|
||||
define_native_property(vm.well_known_symbol_species(), symbol_species_getter, {}, Attribute::Configurable);
|
||||
}
|
||||
|
||||
RegExpConstructor::~RegExpConstructor()
|
||||
@@ -51,4 +53,9 @@ Value RegExpConstructor::construct(Function&)
|
||||
return RegExpObject::create(global_object(), pattern, flags);
|
||||
}
|
||||
|
||||
JS_DEFINE_NATIVE_GETTER(RegExpConstructor::symbol_species_getter)
|
||||
{
|
||||
return vm.this_value(global_object);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user