mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 18:17:22 +02: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:
committed by
Linus Groh
parent
137e98cb6f
commit
0fb4e8b749
Notes:
sideshowbarker
2024-07-18 05:15:39 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/0fb4e8b749d 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 ✅
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user