1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-11 18:20:43 +09:00

LibJS: Implement a nearly empty Intl.PluralRules object

This adds plumbing for the Intl.PluralRules object, constructor, and
prototype.
This commit is contained in:
Timothy Flynn 2022-01-28 12:56:04 -05:00 committed by Linus Groh
parent ac3e42a8de
commit 0087804d10
Notes: sideshowbarker 2024-07-17 20:05:36 +09:00
12 changed files with 229 additions and 0 deletions

View file

@ -13,6 +13,7 @@
#include <LibJS/Runtime/Intl/ListFormatConstructor.h>
#include <LibJS/Runtime/Intl/LocaleConstructor.h>
#include <LibJS/Runtime/Intl/NumberFormatConstructor.h>
#include <LibJS/Runtime/Intl/PluralRulesConstructor.h>
#include <LibJS/Runtime/Intl/RelativeTimeFormatConstructor.h>
namespace JS::Intl {
@ -38,6 +39,7 @@ void Intl::initialize(GlobalObject& global_object)
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_direct_property(vm.names.PluralRules, global_object.intl_plural_rules_constructor(), attr);
define_direct_property(vm.names.RelativeTimeFormat, global_object.intl_relative_time_format_constructor(), attr);
define_native_function(vm.names.getCanonicalLocales, get_canonical_locales, 1, attr);