-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Temporal proposal HTML serialization support #6284
base: main
Are you sure you want to change the base?
Conversation
The changes that @Ms2ger made to include all appropriate Temporal objects and serialize exclusively built-in things LGTM. AFAIK, these are all the changes needed to integrate Temporal into HTML. |
81f0aae
to
bcfc01a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I rebased this and fixed some editorial nits. It LGTM but needs implementer interest (probably we have it through the TC39 process?) and, most importantly, tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Calendar user code thread seems to not yet be resolved?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK cool. Just waiting on tests, implementer interest, and browser bugs then before we can merge.
4338a93
to
50b7305
Compare
This patch lets Temporal objects be serialized, both in storage and with postMessage, if they use built-in calendars and timezones. This is the only expected integration of Temporal with HTML/DOM expected initially; see earlier discussion in w3ctag/design-reviews#311 Co-authored-by: Domenic Denicola <[email protected]> Co-authored-by: Ms2ger <[email protected]>
50b7305
to
cd5e85c
Compare
I updated this to match the consensus from the 102nd TC39 Meeting (12 June), notably dropping Calendar and TimeZone objects. (These changes have not all made it into the proposal spec text yet.) I also wrote a wpt PR with some tests. I'm not sure if this needs independent implementer interest signals / implementation bugs, but if so, I'll deal with that next week. |
Editorial nit: we prefer to avoid single-step
we'd write
Because of the force-pushing, I can't tell if this has been there the whole time and we hadn't caught it previously (sorry if so!), or if it was introduced in recent revisions. Anyway, normative contents still LGTM. It would be good to have independent bugs, since structured serialization is often dealt with by different browser teams. For implementer interest, if you have some indication that TC39 consensus includes structured serialization, then that's enough. (I'm unclear whether the consensus you're referring to in the above comment is for structured serialization, or whether it's for dropping Calendar and TimeZone objects.) When should we merge this? I guess Temporal is stage 3, which is when we've merged things into HTML in the past. So I'm happy to merge once the checkboxes are checked, as long as you are. |
Thanks!
The previous version had substeps to handle user-defined time zones and calendars. I'd like to maybe slightly push back against this comment, though, because I think merging the substep into the previous paragraph would be somewhat less readable due to the quite big records I'm creating. I defer to you if you do still want me to do it, though.
Filed those.
Sorry for the confusion - the TC39 consensus was for dropping Calendar and TimeZone objects. My understanding is that structured cloning hasn't really been discussed in TC39. I filed standards positions issues to make sure.
I guess we can give a bit of time for people to respond to the standards positions, but apart from that, I'd be happy to merge. |
Regarding structured clone, we'll work through the Mozilla standards position to develop a real position. I can't speak for V8, but I don't think Temporal's trajectory has changed particularly. |
This patch lets Temporal objects be serialized, both in storage and with
postMessage, if they use built-in calendars and timezones. This is the
only expected integration of Temporal with HTML/DOM expected initially;
see earlier discussion in w3ctag/design-reviews#311
The current draft just includes Temporal.PlainDate, and it will be extended
to all of the Temporal types after initial review. This patch should not be
landed until (at least) Temporal reaches Stage 3.
(See WHATWG Working Mode: Changes for more details.)
/infrastructure.html ( diff )
/structured-data.html ( diff )