1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:47:36 +00:00

LibJS: Implement a nearly empty Intl.NumberFormat object

This adds plumbing for the Intl.NumberFormat object, constructor, and
prototype.
This commit is contained in:
Timothy Flynn 2021-09-08 21:34:27 -04:00 committed by Linus Groh
parent a1954262f8
commit 07f12b108b
12 changed files with 550 additions and 1 deletions

View file

@ -11,6 +11,7 @@
#include <LibJS/Runtime/Intl/Intl.h>
#include <LibJS/Runtime/Intl/ListFormatConstructor.h>
#include <LibJS/Runtime/Intl/LocaleConstructor.h>
#include <LibJS/Runtime/Intl/NumberFormatConstructor.h>
namespace JS::Intl {
@ -33,6 +34,7 @@ void Intl::initialize(GlobalObject& global_object)
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_direct_property(vm.names.NumberFormat, global_object.intl_number_format_constructor(), attr);
define_native_function(vm.names.getCanonicalLocales, get_canonical_locales, 1, attr);
}