18:41
<Michael Ficarra>
should it be possible to observe the change of system default locale over the course of a single program execution?
18:41
<Michael Ficarra>
I don't see any constraint on deterministic behaviour of https://tc39.es/ecma402/#sec-defaultlocale
18:55
<ryzokuken>
should it be possible to observe the change of system default locale over the course of a single program execution?
I don't believe so
18:55
<Michael Ficarra>
ryzokuken: where is that constraint expressed?
18:56
<Richard Gibson>
there are no constraints and the specification text is analogous to that of SystemTimeZoneIdentifier. I'd expect most if not all implementations to reflect changes (but they should not be required to do so).
18:56
<ryzokuken>
I think on the web platform side
18:56
<ryzokuken>
There was this PR Frank wax working on to address that
18:56
<ryzokuken>
On the whatwg side if I remember correctly
18:56
<ryzokuken>
Let me try to find it now
18:57
<sffc>
Frank was working on an ontimezonechange event. I recall discussion of a onlocalechange event but I'm not sure what came of that
18:57
<sffc>
It might not work for locale-change since it is intended to be consistent with the Accept-Language header
18:58
<ryzokuken>
Frank was working on an ontimezonechange event. I recall discussion of a onlocalechange event but I'm not sure what came of that
It was discussed but I don't remember it moving forward, there was something it was blocked on
19:00
<Michael Ficarra>
okay so it sounds like it's not a JS constraint but a web constraint because of that header consistency
20:12
<littledan>
HTML has an event for observing the locale change (but I'm not sure if that's plumbed through to being the same as Intl's locale, necessarily). Last I heard, only Firefox ever fired it.
20:12
<littledan>
the header, then, only indicates the locale at the time of the request
20:13
<littledan>
I think this is a hole we should fill--we should develop a clear model, shared by JS and HTML, of whether the locale can change, and make sure it's noted in both places and appropriate APIs exist (or don't exist)
20:14
<littledan>
Mozilla people have raised the importance of live locale changing. We should figure out whether we want that to be part of our shared model as it relates to the default locale or whether it should just be an application-level thing.