mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-09 01:29:17 +00:00
LibJS: Implement Intl[@@toStringTag]
This commit is contained in:
parent
44a8b55c50
commit
97010d4903
Notes:
sideshowbarker
2024-07-18 07:12:35 +09:00
Author: https://github.com/linusg
Commit: 97010d4903
Pull-request: https://github.com/SerenityOS/serenity/pull/9289
2 changed files with 8 additions and 0 deletions
|
@ -18,6 +18,11 @@ Intl::Intl(GlobalObject& global_object)
|
|||
void Intl::initialize(GlobalObject& global_object)
|
||||
{
|
||||
Object::initialize(global_object);
|
||||
|
||||
auto& vm = this->vm();
|
||||
|
||||
// 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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
test("basic functionality", () => {
|
||||
expect(Intl[Symbol.toStringTag]).toBe("Intl");
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue