mozilla / standards-positions

https://mozilla.github.io/standards-positions/
Mozilla Public License 2.0
650 stars 72 forks source link

`timezonechange` event #241

Open mathiasbynens opened 4 years ago

mathiasbynens commented 4 years ago

Request for Mozilla Position on an Emerging Web Specification

Other information

Mozilla's helpful involvement on the spec patch seems to imply some level of support, but it would be great to get that explicitly confirmed or denied. Is Mozilla supportive of the proposed timezonechange event?

dbaron commented 4 years ago

Also cc @jswalden for thoughts on implementation feasibility.

annevk commented 4 years ago

To be clear, there's two things to evaluate:

  1. The ability to dispatch an event when the timezone changes.
  2. To not expose a timezone change to script until the event is dispatched. I.e., store the timezone as internal state and update it during the same task that dispatches the event.

1 satisfies the use case, 2 would be ideal and also matches existing APIs that dispatch events for (external) state changes.

dbaron commented 4 years ago

Jeff Yaskin pointed out an interesting concern:

Nick Doty pointed out that if this event fires at the same time across all open tabs, the timestamp of that event becomes a cross-origin tracking vector. I believe this is fixed if the event is delayed until the user next activates that tab. If that much delay isn't acceptable, there may be a way to fire the events earlier if they're spread across enough time, but I don't immediately know how much spread is needed.

but it sounds like this is being looked into.

dbaron commented 4 years ago

So I think given that the discussion of how to handle correlation of the event across tabs hasn't been resolved yet, I think we should take a defer position on this one and come back to it once that is addressed.

mathiasbynens commented 4 years ago

So I think given that the discussion of how to handle correlation of the event across tabs hasn't been resolved yet

It seems there is now general agreement on the upstream thread on how to resolve these issues, e.g. https://github.com/whatwg/html/pull/3047#issuecomment-573847868 & https://github.com/whatwg/html/pull/3047#issuecomment-663181802. Does Mozilla agree with this?

Can we reopen this issue?

annevk commented 4 years ago

Happy to reopen, but it's not entirely clear to me what the suggested mitigation is. Making it coincide with a change in visibility seems somewhat reasonable, but it seems preferable if the specification text gave some guidance.