On Tue, Jun 14, 2016 at 7:00 AM Axel Hecht <l...@mozilla.com> wrote: > On 14/06/16 05:06, zbranie...@mozilla.com wrote: > > On Monday, June 13, 2016 at 9:39:32 AM UTC+1, Gijs Kruitbosch wrote: > > > Separately, the documentation put forth so far seems to indicate that > >> the localization itself is also async, on top of the asyncness of the > >> mutationobserver approach, and that could potentially result in flashes > >> of unlocalized content, depending on "how" asynchronous that API really > >> ends up being. (AFAIK, if the API returned an already-resolved promise, > >> there might be less chance of that than if it actually went off and did > >> IO off-main-thread, then came back with some results.) > > > > The DOM localization that is used in response to MutationObserver is > sync. > > > > ... unless strings trigger a load, either if the initial suite of > localizations isn't loaded yet, or the loaded strings trigger a runtime > error, which requires more l10n files to be loaded. That's obviously > cached, so it happens at first occasion. >
I don't think you can say "It's sync unless <something> in which case it's async". If that's that case then from the API consumers point of view, then (deep voodoo withstanding) it's async. Joe. _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform