mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 20:29:18 +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
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2022-2024, Tim Flynn <trflynn89@serenityos.org>
|
||||
* Copyright (c) 2022-2025, Tim Flynn <trflynn89@ladybird.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -113,7 +113,7 @@ ThrowCompletionOr<GC::Ref<Object>> CollatorConstructor::construct(FunctionObject
|
|||
opt.kf = locale_key_from_value(case_first);
|
||||
|
||||
// 21. Let r be ResolveLocale(%Intl.Collator%.[[AvailableLocales]], requestedLocales, opt, %Intl.Collator%.[[RelevantExtensionKeys]], localeData).
|
||||
auto result = resolve_locale(requested_locales, opt, Collator::relevant_extension_keys());
|
||||
auto result = resolve_locale(requested_locales, opt, collator->relevant_extension_keys());
|
||||
|
||||
// 22. Set collator.[[Locale]] to r.[[Locale]].
|
||||
collator->set_locale(move(result.locale));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue