I'm trying to use MutationObserver to do runtime localization of the nodes that are provided by an HTML file.
I register the mutation observer on document at it's readyState=loading and in result all nodes that are in HTML files are reported to my callback. That's cool. Now, usually, firstPaint happen after this, so if I translate those nodes, all I see on firstPaint is a stable screen with properly translated nodes. The order seems to be: 1) observer registered 2) nodes injected into DOM 3) observer's callback translates the nodes 4) firstPaint But when I test this on a slow device (Keon) and on a rather complex app (Settings), every now and then I see a flash of untranslated content before the nodes are being translated by the mutation observer's callback. It just seems that in those cases the order is: 1) observer registered 2) nodes injected into DOM 3) firstPaint 4) obsever's callback translates the nodes Question: should mutationobserver's callback be run on those nodes before firstPaint? Or Question 2: should mutationobserver's callback be run on those nodes before they are injected into DOM? Thanks, zb. _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform