mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
LibJS: Implement Temporal.PlainDate.prototype[@@toStringTag]
This commit is contained in:
parent
cc00ccec41
commit
94e1324a67
Notes:
sideshowbarker
2024-07-18 08:45:57 +09:00
Author: https://github.com/IdanHo Commit: https://github.com/SerenityOS/serenity/commit/94e1324a673 Pull-request: https://github.com/SerenityOS/serenity/pull/8870 Reviewed-by: https://github.com/linusg
2 changed files with 8 additions and 0 deletions
|
@ -18,6 +18,11 @@ PlainDatePrototype::PlainDatePrototype(GlobalObject& global_object)
|
|||
void PlainDatePrototype::initialize(GlobalObject& global_object)
|
||||
{
|
||||
Object::initialize(global_object);
|
||||
|
||||
auto& vm = this->vm();
|
||||
|
||||
// 3.3.2 Temporal.PlainDate.prototype[ @@toStringTag ], https://tc39.es/proposal-temporal/#sec-temporal.plaindate.prototype-@@tostringtag
|
||||
define_direct_property(*vm.well_known_symbol_to_string_tag(), js_string(vm.heap(), "Temporal.PlainDate"), Attribute::Configurable);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
test("basic functionality", () => {
|
||||
expect(Temporal.PlainDate.prototype[Symbol.toStringTag]).toBe("Temporal.PlainDate");
|
||||
});
|
Loading…
Reference in a new issue