LibJS: Put Temporal.Instant.prototype member definitions in spec order
This commit is contained in:
parent
6c8f0fbb35
commit
48b66c7a68
Notes:
sideshowbarker
2024-07-18 09:00:38 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/48b66c7a680 Pull-request: https://github.com/SerenityOS/serenity/pull/8753 Reviewed-by: https://github.com/IdanHo ✅
1 changed files with 4 additions and 4 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue