1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:18:13 +00:00

LibJS: Implement a nearly empty Intl.ListFormat object

This adds plumbing for the Intl.ListFormat object, constructor, and
prototype.
This commit is contained in:
Timothy Flynn 2021-09-05 23:05:16 -04:00 committed by Linus Groh
parent 4ad2159812
commit 8e75e5fabb
12 changed files with 279 additions and 0 deletions

View file

@ -9,6 +9,7 @@
#include <LibJS/Runtime/Intl/AbstractOperations.h>
#include <LibJS/Runtime/Intl/DisplayNamesConstructor.h>
#include <LibJS/Runtime/Intl/Intl.h>
#include <LibJS/Runtime/Intl/ListFormatConstructor.h>
#include <LibJS/Runtime/Intl/LocaleConstructor.h>
namespace JS::Intl {
@ -30,6 +31,7 @@ void Intl::initialize(GlobalObject& global_object)
u8 attr = Attribute::Writable | Attribute::Configurable;
define_direct_property(vm.names.DisplayNames, global_object.intl_display_names_constructor(), attr);
define_direct_property(vm.names.ListFormat, global_object.intl_list_format_constructor(), attr);
define_direct_property(vm.names.Locale, global_object.intl_locale_constructor(), attr);
define_native_function(vm.names.getCanonicalLocales, get_canonical_locales, 1, attr);