Bug 1846274 Comment 13 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

> Currently the CSS is injected only after the whole message is fully loaded.
> This can take few ms, but also many seconds.
> This is visible especially when using "Dark mode" extensions (which inverts colors of the messages).
> Even with small messages with no remote content, there is visible white flash. More complex emails
> full of remote content (like some animated gif) can load for several seconds without the injected CSS.
> 
> Applying CSS in document_idle phase would eliminate this.
> Actually, just like `scripting.executeScript`, I would say the CSS and JS should be by default injected in `document_idle` phase.

I assume you mean `document_start`, right? `document_idle` is the default and corresponds to the "complete" readyState.
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/extensionTypes/RunAt

We cannot change the default, but I am trying to support `document_start` and `document_end`.

Back to Bug 1846274 Comment 13