mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-03 06:40:05 +00:00
LibJS: Implement Temporal.TimeZone.prototype[@@toStringTag]
This commit is contained in:
parent
ab1caad1e9
commit
2e968700aa
Notes:
sideshowbarker
2024-07-18 10:03:07 +09:00
Author: https://github.com/linusg
Commit: 2e968700aa
Pull-request: https://github.com/SerenityOS/serenity/pull/8568
Reviewed-by: https://github.com/IdanHo
Reviewed-by: https://github.com/bgianfo ✅
2 changed files with 8 additions and 0 deletions
|
@ -18,6 +18,11 @@ TimeZonePrototype::TimeZonePrototype(GlobalObject& global_object)
|
|||
void TimeZonePrototype::initialize(GlobalObject& global_object)
|
||||
{
|
||||
Object::initialize(global_object);
|
||||
|
||||
auto& vm = this->vm();
|
||||
|
||||
// 11.4.2 Temporal.TimeZone.prototype[ @@toStringTag ], https://tc39.es/proposal-temporal/#sec-temporal.timezone.prototype-@@tostringtag
|
||||
define_direct_property(*vm.well_known_symbol_to_string_tag(), js_string(vm.heap(), "Temporal.TimeZone"), Attribute::Configurable);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
test("basic functionality", () => {
|
||||
expect(Temporal.TimeZone.prototype[Symbol.toStringTag]).toBe("Temporal.TimeZone");
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue