← Back to release summary

Navigator.languages and languagechange event on workers

Category
Miscellaneous
Type
New or changed feature
Status
Enabled by default (Chrome 72)
Intent stage
None

Summary

The navigator.languages property exposes the Accept Language header and the languageevent, which is fired on the Window object to notifiy scripts of changes to this value. Both features allow web applications to handle i18n in the client and react to user language changes. This change makes these features available to workers. Specifically, navigator.languages is available on workers and languageevent is fired on workers as well as the main thread.

Standards & signals

Docs: https://developer.mozilla.org/en-US/docs/Web/API/NavigatorLanguage/languages

View on chromestatus.com