mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 03:18:11 +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
|
@ -35,6 +35,8 @@ void PromiseConstructor::initialize(GlobalObject& global_object)
|
|||
// define_native_function(vm.names.race, race, 1, attr);
|
||||
define_native_function(vm.names.reject, reject, 1, attr);
|
||||
define_native_function(vm.names.resolve, resolve, 1, attr);
|
||||
|
||||
define_native_property(vm.well_known_symbol_species(), symbol_species_getter, {}, Attribute::Configurable);
|
||||
}
|
||||
|
||||
Value PromiseConstructor::call()
|
||||
|
@ -113,4 +115,9 @@ JS_DEFINE_NATIVE_FUNCTION(PromiseConstructor::resolve)
|
|||
return promise_resolve(global_object, *constructor, value);
|
||||
}
|
||||
|
||||
JS_DEFINE_NATIVE_GETTER(PromiseConstructor::symbol_species_getter)
|
||||
{
|
||||
return vm.this_value(global_object);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue