Add timezonechange event to Window and WorkerGlobalScope
- Category
- Device
- Type
- New or changed feature
- Status
- In development (Chrome In development)
- Intent stage
- Start prototyping
WPT details: To be decided
Summary
Adds a timezonechange event and ontimezonechange event handler to Window and WorkerGlobalScope.
Motivation
The current timezone is visible to JavaScript and changes over time. Changes may be useful to note, for example, in a long-running calendar or mail application that may want to update dates and times without refreshing when the user resumes using the application after travel. Currently, to accomplish that, a webapp has to poll, for example, by repeatedly call Intl.DateTimeFormat().resolvedOptions().timeZone.
Standards & signals
- Specification: https://github.com/whatwg/html/pull/3047
- Firefox: Defer
- Safari: Positive
- Web developers: Positive
- Tracking bug: https://bugs.chromium.org/p/chromium/issues/detail?id=908550
Ecosystem
- Web Platform Tests: https://wpt.fyi/results/?q=add-timezonechange-event-to-window-and-workerglobalscope
- Chrome Platform Showcase: https://chrome-platform-showcase.paulkinlan-ea.deno.net/features
- GenDN reference: https://gendn.paulkinlan-ea.deno.net/features
- chrome.dev demos search: https://www.google.com/search?q=site%3Achrome.dev+Add%20timezonechange%20event%20to%20Window%20and%20WorkerGlobalScope
- MDN Web Docs: https://developer.mozilla.org/en-US/search?q=Add%20timezonechange%20event%20to%20Window%20and%20WorkerGlobalScope
- Baseline status: https://webstatus.dev/?q=Add%20timezonechange%20event%20to%20Window%20and%20WorkerGlobalScope
Docs: https://docs.google.com/document/d/1gu-HAVIjVxfPQEE0uQg9Y4tJwYl33Y54DKTA9hfDyic/edit#
Explainers: https://github.com/whatwg/html/pull/3047