mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-08 17:19:13 +00:00
LibJS: Define constructor slots for describing how to read options
This is an editorial change in the ECMA-402 spec. See:
a2beb66
We implement this change by introducing a virtual interface that all
Intl "service" objects must implement. A future patch will make use of
the virtualized RelevantExtensionKeys and ResolutionOptionDescriptors
accessors, and we will need to be able to use those slots from a generic
instance type.
This commit is contained in:
parent
19ce186f97
commit
62793b1bd8
Notes:
github-actions[bot]
2025-04-08 10:53:24 +00:00
Author: https://github.com/trflynn89
Commit: 62793b1bd8
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4275
29 changed files with 284 additions and 116 deletions
|
@ -75,7 +75,7 @@ ThrowCompletionOr<GC::Ref<Object>> DisplayNamesConstructor::construct(FunctionOb
|
|||
opt.locale_matcher = matcher;
|
||||
|
||||
// 9. Let r be ResolveLocale(%Intl.DisplayNames%.[[AvailableLocales]], requestedLocales, opt, %Intl.DisplayNames%.[[RelevantExtensionKeys]], %Intl.DisplayNames%.[[LocaleData]]).
|
||||
auto result = resolve_locale(requested_locales, opt, {});
|
||||
auto result = resolve_locale(requested_locales, opt, display_names->relevant_extension_keys());
|
||||
|
||||
// 10. Let style be ? GetOption(options, "style", string, « "narrow", "short", "long" », "long").
|
||||
auto style = TRY(get_option(vm, *options, vm.names.style, OptionType::String, { "narrow"sv, "short"sv, "long"sv }, "long"sv));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue