Add better representation for Temporal objects
Categories
(DevTools :: Object Inspector, enhancement)
Tracking
(firefox137 fixed)
| Tracking | Status | |
|---|---|---|
| firefox137 | --- | fixed |
People
(Reporter: nchevobbe, Assigned: nchevobbe)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
When building with ac_add_options --with-temporal-api, Temporal are enabled (see https://tc39.es/proposal-temporal/docs/).
Logging objects like Temporal.Now.instant() or Temporal.Now.timeZone() does show the right type in the console output (resp Temporal.Instant { } and Temporal.TimeZone { }), but there's nothing that give you a quick idea of the actual value.
For each type of Temporal object, we should think of a value that would ease the understanding of what those instances hold, like we do for Date instances
Comment 1•1 year ago
|
||
Now that Temporal is in nightly, it'd be helpful to increase the priority of this task.
We discussed this topic at the Temporal champions meeting this morning and our recommendation is that devtools console output should be similar to the output for Date: first the type name e.g. Temporal.Instant, then the results of calling toString on the object.
Current:
Temporal.ZonedDateTime { }
Desired:
Temporal.ZonedDateTime 2025-02-06T16:10:22.76-08:00[America/Los_Angeles]
| Assignee | ||
Comment 3•1 year ago
|
||
Updated•1 year ago
|
| Assignee | ||
Comment 4•1 year ago
|
||
Here's how it looks like with current patch.
Temporal.Duration is a bit different, but I guess it's still nice to see the serialized value
Comment 5•1 year ago
|
||
Very nice. Looks great. Thanks for the quick turnaround.
Comment 7•1 year ago
|
||
| bugherder | ||
Description
•