1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:37:35 +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:
Timothy Flynn 2021-08-24 22:27:05 -04:00 committed by Linus Groh
parent 137e98cb6f
commit 0fb4e8b749
12 changed files with 325 additions and 1 deletions

View file

@ -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);
}
}