mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-10 01:59:31 +00:00
LibJS: Implement a nearly empty Intl.DisplayNames object
This adds plumbing for the Intl.DisplayNames object, constructor, and prototype.
This commit is contained in:
parent
137e98cb6f
commit
0fb4e8b749
Notes:
sideshowbarker
2024-07-18 05:15:39 +09:00
Author: https://github.com/trflynn89
Commit: 0fb4e8b749
Pull-request: https://github.com/SerenityOS/serenity/pull/9599
Reviewed-by: https://github.com/alimpfard
Reviewed-by: https://github.com/davidot
Reviewed-by: https://github.com/linusg ✅
12 changed files with 325 additions and 1 deletions
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
|
||||
#include <LibJS/Runtime/GlobalObject.h>
|
||||
#include <LibJS/Runtime/Intl/DisplayNamesConstructor.h>
|
||||
#include <LibJS/Runtime/Intl/Intl.h>
|
||||
|
||||
namespace JS::Intl {
|
||||
|
@ -23,6 +24,9 @@ void Intl::initialize(GlobalObject& global_object)
|
|||
|
||||
// 8.1.1 Intl[ @@toStringTag ], https://tc39.es/ecma402/#sec-Intl-toStringTag
|
||||
define_direct_property(*vm.well_known_symbol_to_string_tag(), js_string(vm, "Intl"), Attribute::Configurable);
|
||||
|
||||
u8 attr = Attribute::Writable | Attribute::Configurable;
|
||||
define_direct_property(vm.names.DisplayNames, global_object.intl_display_names_constructor(), attr);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue