diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/InstantPrototype.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/InstantPrototype.cpp index 0c58563a41..583030de93 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/InstantPrototype.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/InstantPrototype.cpp @@ -24,18 +24,18 @@ void InstantPrototype::initialize(GlobalObject& 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); + define_native_accessor(vm.names.epochSeconds, epoch_seconds_getter, {}, Attribute::Configurable); define_native_accessor(vm.names.epochMilliseconds, epoch_milliseconds_getter, {}, Attribute::Configurable); define_native_accessor(vm.names.epochMicroseconds, epoch_microseconds_getter, {}, Attribute::Configurable); define_native_accessor(vm.names.epochNanoseconds, epoch_nanoseconds_getter, {}, Attribute::Configurable); - // 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); - u8 attr = Attribute::Writable | Attribute::Configurable; - define_native_function(vm.names.valueOf, value_of, 0, attr); define_native_function(vm.names.round, round, 1, attr); define_native_function(vm.names.equals, equals, 1, attr); + define_native_function(vm.names.valueOf, value_of, 0, attr); } static Instant* typed_this(GlobalObject& global_object)