|
@@ -1,5 +1,5 @@
|
|
|
/*
|
|
|
- * Copyright (c) 2021, Tim Flynn <trflynn89@serenityos.org>
|
|
|
+ * Copyright (c) 2021-2022, Tim Flynn <trflynn89@serenityos.org>
|
|
|
*
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
*/
|
|
@@ -12,7 +12,7 @@
|
|
|
|
|
|
namespace JS::Intl {
|
|
|
|
|
|
-// 13.4 Properties of the Intl.ListFormat Prototype Object, https://tc39.es/ecma402/#sec-properties-of-intl-listformat-prototype-object
|
|
|
+// 13.3 Properties of the Intl.ListFormat Prototype Object, https://tc39.es/ecma402/#sec-properties-of-intl-listformat-prototype-object
|
|
|
ListFormatPrototype::ListFormatPrototype(GlobalObject& global_object)
|
|
|
: PrototypeObject(*global_object.object_prototype())
|
|
|
{
|
|
@@ -24,7 +24,7 @@ void ListFormatPrototype::initialize(GlobalObject& global_object)
|
|
|
|
|
|
auto& vm = this->vm();
|
|
|
|
|
|
- // 13.4.2 Intl.ListFormat.prototype [ @@toStringTag ], https://tc39.es/ecma402/#sec-Intl.ListFormat.prototype-toStringTag
|
|
|
+ // 13.3.2 Intl.ListFormat.prototype [ @@toStringTag ], https://tc39.es/ecma402/#sec-Intl.ListFormat.prototype-toStringTag
|
|
|
define_direct_property(*vm.well_known_symbol_to_string_tag(), js_string(vm, "Intl.ListFormat"), Attribute::Configurable);
|
|
|
|
|
|
u8 attr = Attribute::Writable | Attribute::Configurable;
|
|
@@ -33,7 +33,7 @@ void ListFormatPrototype::initialize(GlobalObject& global_object)
|
|
|
define_native_function(vm.names.resolvedOptions, resolved_options, 0, attr);
|
|
|
}
|
|
|
|
|
|
-// 13.4.3 Intl.ListFormat.prototype.format ( list ), https://tc39.es/ecma402/#sec-Intl.ListFormat.prototype.format
|
|
|
+// 13.3.3 Intl.ListFormat.prototype.format ( list ), https://tc39.es/ecma402/#sec-Intl.ListFormat.prototype.format
|
|
|
JS_DEFINE_NATIVE_FUNCTION(ListFormatPrototype::format)
|
|
|
{
|
|
|
auto list = vm.argument(0);
|
|
@@ -50,7 +50,7 @@ JS_DEFINE_NATIVE_FUNCTION(ListFormatPrototype::format)
|
|
|
return js_string(vm, move(formatted));
|
|
|
}
|
|
|
|
|
|
-// 13.4.4 Intl.ListFormat.prototype.formatToParts ( list ), https://tc39.es/ecma402/#sec-Intl.ListFormat.prototype.formatToParts
|
|
|
+// 13.3.4 Intl.ListFormat.prototype.formatToParts ( list ), https://tc39.es/ecma402/#sec-Intl.ListFormat.prototype.formatToParts
|
|
|
JS_DEFINE_NATIVE_FUNCTION(ListFormatPrototype::format_to_parts)
|
|
|
{
|
|
|
auto list = vm.argument(0);
|
|
@@ -66,7 +66,7 @@ JS_DEFINE_NATIVE_FUNCTION(ListFormatPrototype::format_to_parts)
|
|
|
return format_list_to_parts(global_object, *list_format, string_list);
|
|
|
}
|
|
|
|
|
|
-// 13.4.5 Intl.ListFormat.prototype.resolvedOptions ( ), https://tc39.es/ecma402/#sec-Intl.ListFormat.prototype.resolvedoptions
|
|
|
+// 13.3.5 Intl.ListFormat.prototype.resolvedOptions ( ), https://tc39.es/ecma402/#sec-Intl.ListFormat.prototype.resolvedoptions
|
|
|
JS_DEFINE_NATIVE_FUNCTION(ListFormatPrototype::resolved_options)
|
|
|
{
|
|
|
// 1. Let lf be the this value.
|
|
@@ -76,7 +76,7 @@ JS_DEFINE_NATIVE_FUNCTION(ListFormatPrototype::resolved_options)
|
|
|
// 3. Let options be ! OrdinaryObjectCreate(%Object.prototype%).
|
|
|
auto* options = Object::create(global_object, global_object.object_prototype());
|
|
|
|
|
|
- // 4. For each row of Table 9, except the header row, in table order, do
|
|
|
+ // 4. For each row of Table 10, except the header row, in table order, do
|
|
|
// a. Let p be the Property value of the current row.
|
|
|
// b. Let v be the value of lf's internal slot whose name is the Internal Slot value of the current row.
|
|
|
// c. Assert: v is not undefined.
|