w3c / geolocation

W3C Geolocation API
https://www.w3.org/TR/geolocation/
81 stars 56 forks source link

Consider using DOMHighResTimestamp instead of DOMTimeStamp #103

Closed yoavweiss closed 2 years ago

yoavweiss commented 2 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.

marcoscaceres commented 2 years ago

We probably can’t switch because of web compat. It’s used to determine the age of the acquired position.

But we could rename it LegacyGeolocationTimeStamp as it’s just a typedef and define it as used by the API. That could finally deprecating it from the platform.

yoavweiss commented 2 years ago

Geolocation is not the only user today. Agree that renaming it may prevent new users though.

marcoscaceres commented 2 years ago

Ah, my bad. Those WICG ones should be easy to update at least.

npm1 commented 2 years ago

Compat aside, looks like DOMTimeStamp (or now EpochTimeStamp) introduce high resolution timers (there's not clamping whatsoever), so for privacy/security they should probably move?

npm1 commented 2 years ago

Nevermind, Yoav mentioned this is an int so the granularity is not sub-ms.