WICG / cookie-store

Asynchronous access to cookies from JavaScript
https://wicg.github.io/cookie-store/
Apache License 2.0
143 stars 35 forks source link

Consider using DOMHighResTimestamp instead of DOMTimeStamp #205

Closed yoavweiss closed 1 year ago

yoavweiss commented 3 years ago

We're considering our options RE DOMTimeStamp, and wondering what it's used for. It seems less well-defined than DOMHighResTimestamp. Would y'all consider switching over?

See heycam/webidl#2 for discussion.

inexorabletash commented 3 years ago

I think that's fine. This may require updating these definitions a bit:

https://wicg.github.io/cookie-store/#dom-cookieinit-expires - change the type https://wicg.github.io/cookie-store/#dom-cookielistitem-expires - change the type https://wicg.github.io/cookie-store/#as-a-timestamp - fine as is? https://wicg.github.io/cookie-store/#date-serialize - just change the type name? https://wicg.github.io/cookie-store/#delete-a-cookie - talks about "earliest representable date" ... probably still okay

inexorabletash commented 2 years ago

DOMTimeStamp is gone now https://github.com/whatwg/webidl/pull/1021 so someone needs to put up a PR soon, I guess?

inexorabletash commented 2 years ago

cc: @domenic - looks like this spec is still using it:

https://dontcallmedom.github.io/webidlpedia/names/CookieInit.html vs. https://dontcallmedom.github.io/webidlpedia/names/DOMTimeStamp.html

Is it because DOMTimeStamp? is not indexed or something?

domenic commented 2 years ago

Oh jeez, my bad for merging early then. /Cc @dontcallmedom

It seems like cookies might actually need EpochTimeStamp instead of DOMHighResTimeStamp since they need to be compatible with JS Date.

inexorabletash commented 2 years ago

Yeah, EpochTimeStamp seems like a good fit - https://w3c.github.io/hr-time/#dom-epochtimestamp

I think https://w3c.github.io/hr-time/#dfn-epoch-relative-timestamp will let us remove some of the prose in https://wicg.github.io/cookie-store/#algorithms

ayuishii commented 1 year ago

https://github.com/WICG/cookie-store/pull/208 looks like its updated the spec to use EpochTimeStamp. @inexorabletash is there anything left for this issue?

inexorabletash commented 1 year ago

https://www.w3.org/TR/hr-time-3/#dom-epochtimestamp says EpochTimeStamp is just a rename of DOMTimeStamp; we still need to update the spec to DOMHighResTimeStamp

I can put up a PR for that.

ayuishii commented 1 year ago

SG, thanks for the PRs. Filed a crbug for chromium. https://crbug.com/1416988