mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 18:17:22 +02:00
LibJS: Define the "name" property on the number format function
Also add a missing spec link.
This commit is contained in:
committed by
Linus Groh
parent
3645f6a0fc
commit
b019a7fe64
Notes:
sideshowbarker
2024-07-18 01:08:59 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/b019a7fe64e Pull-request: https://github.com/SerenityOS/serenity/pull/10921 Reviewed-by: https://github.com/linusg ✅
@@ -10,7 +10,7 @@
|
||||
|
||||
namespace JS::Intl {
|
||||
|
||||
// 15.1.4 Number Format Functions
|
||||
// 15.1.4 Number Format Functions, https://tc39.es/ecma402/#sec-number-format-functions
|
||||
NumberFormatFunction* NumberFormatFunction::create(GlobalObject& global_object, NumberFormat& number_format)
|
||||
{
|
||||
return global_object.heap().allocate<NumberFormatFunction>(global_object, number_format, *global_object.function_prototype());
|
||||
@@ -24,8 +24,11 @@ NumberFormatFunction::NumberFormatFunction(NumberFormat& number_format, Object&
|
||||
|
||||
void NumberFormatFunction::initialize(GlobalObject& global_object)
|
||||
{
|
||||
auto& vm = this->vm();
|
||||
|
||||
Base::initialize(global_object);
|
||||
define_direct_property(vm().names.length, Value(1), Attribute::Configurable);
|
||||
define_direct_property(vm.names.length, Value(1), Attribute::Configurable);
|
||||
define_direct_property(vm.names.name, js_string(vm, String::empty()), Attribute::Configurable);
|
||||
}
|
||||
|
||||
ThrowCompletionOr<Value> NumberFormatFunction::call()
|
||||
|
||||
Reference in New Issue
Block a user