mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-13 01:59:14 +03:00
LibJS: Implement Temporal.Instant.prototype[@@toStringTag]
This commit is contained in:
parent
439b35dc7d
commit
dad336c944
Notes:
sideshowbarker
2024-07-18 10:02:47 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/dad336c9449 Pull-request: https://github.com/SerenityOS/serenity/pull/8568 Reviewed-by: https://github.com/IdanHo Reviewed-by: https://github.com/bgianfo ✅
@ -18,6 +18,11 @@ InstantPrototype::InstantPrototype(GlobalObject& global_object)
|
||||
void InstantPrototype::initialize(GlobalObject& global_object)
|
||||
{
|
||||
Object::initialize(global_object);
|
||||
|
||||
auto& vm = this->vm();
|
||||
|
||||
// 8.3.2 Temporal.Instant.prototype[ @@toStringTag ], https://tc39.es/proposal-temporal/#sec-temporal.instant.prototype-@@tostringtag
|
||||
define_direct_property(*vm.well_known_symbol_to_string_tag(), js_string(vm.heap(), "Temporal.Instant"), Attribute::Configurable);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,3 @@
|
||||
test("basic functionality", () => {
|
||||
expect(Temporal.Instant.prototype[Symbol.toStringTag]).toBe("Temporal.Instant");
|
||||
});
|
Loading…
Reference in New Issue
Block a user