LibJS: Implement Temporal.PlainYearMonth.prototype[@@toStringTag]
This commit is contained in:
parent
4d3af45efb
commit
d8e835d22f
Notes:
sideshowbarker
2024-07-18 07:13:24 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/d8e835d22f1 Pull-request: https://github.com/SerenityOS/serenity/pull/9273 Reviewed-by: https://github.com/IdanHo ✅
2 changed files with 8 additions and 0 deletions
|
@ -18,6 +18,11 @@ PlainYearMonthPrototype::PlainYearMonthPrototype(GlobalObject& global_object)
|
|||
void PlainYearMonthPrototype::initialize(GlobalObject& global_object)
|
||||
{
|
||||
Object::initialize(global_object);
|
||||
|
||||
auto& vm = this->vm();
|
||||
|
||||
// 9.3.2 Temporal.PlainYearMonth.prototype[ @@toStringTag ], https://tc39.es/proposal-temporal/#sec-temporal.plainyearmonth.prototype-@@tostringtag
|
||||
define_direct_property(*vm.well_known_symbol_to_string_tag(), js_string(vm.heap(), "Temporal.PlainYearMonth"), Attribute::Configurable);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
test("basic functionality", () => {
|
||||
expect(Temporal.PlainYearMonth.prototype[Symbol.toStringTag]).toBe("Temporal.PlainYearMonth");
|
||||
});
|
Loading…
Add table
Reference in a new issue