mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:57:35 +00:00
LibJS: Move locale_relevant_extension_keys to Intl.Locale
This commit is contained in:
parent
7769cd2cab
commit
673fc02ac5
3 changed files with 16 additions and 13 deletions
|
@ -15,6 +15,18 @@ Locale* Locale::create(GlobalObject& global_object, Unicode::LocaleID const& loc
|
|||
return global_object.heap().allocate<Locale>(global_object, locale_id, *global_object.intl_locale_prototype());
|
||||
}
|
||||
|
||||
Vector<StringView> const& Locale::relevant_extension_keys()
|
||||
{
|
||||
// 14.2.2 Internal slots, https://tc39.es/ecma402/#sec-intl.locale-internal-slots
|
||||
// The value of the [[RelevantExtensionKeys]] internal slot is « "ca", "co", "hc", "kf", "kn", "nu" ».
|
||||
// If %Collator%.[[RelevantExtensionKeys]] does not contain "kf", then remove "kf" from %Locale%.[[RelevantExtensionKeys]].
|
||||
// If %Collator%.[[RelevantExtensionKeys]] does not contain "kn", then remove "kn" from %Locale%.[[RelevantExtensionKeys]].
|
||||
|
||||
// FIXME: We do not yet have an Intl.Collator object. For now, we behave as if "kf" and "kn" exist, as test262 depends on it.
|
||||
static Vector<StringView> relevant_extension_keys { "ca"sv, "co"sv, "hc"sv, "kf"sv, "kn"sv, "nu"sv };
|
||||
return relevant_extension_keys;
|
||||
}
|
||||
|
||||
// 14 Locale Objects, https://tc39.es/ecma402/#locale-objects
|
||||
Locale::Locale(Object& prototype)
|
||||
: Object(prototype)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue