The problem here in [HTMLImageElement::SetLazyLoading](https://searchfox.org/mozilla-central/rev/18f09bdf36a62ea7079c018301f1d257f71f655b/dom/html/HTMLImageElement.cpp#1200-1207); ``` // If scripting is disabled don't do lazy load. // https://whatpr.org/html/3752/images.html#updating-the-image-data // // Same for printing. Document* doc = OwnerDoc(); if (!doc->IsScriptEnabled() || doc->IsStaticDocument()) { return; } ``` Unfortunately at that time, when the template's innerHTML is set, the `!docu->IsScriptEnabled()` false. That's the cause. We need to tweak the condition. I'd defer it to DOM team.
Bug 1926802 Comment 3 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
The problem here in [HTMLImageElement::SetLazyLoading](https://searchfox.org/mozilla-central/rev/18f09bdf36a62ea7079c018301f1d257f71f655b/dom/html/HTMLImageElement.cpp#1200-1207); ``` // If scripting is disabled don't do lazy load. // https://whatpr.org/html/3752/images.html#updating-the-image-data // // Same for printing. Document* doc = OwnerDoc(); if (!doc->IsScriptEnabled() || doc->IsStaticDocument()) { return; } ``` Unfortunately at that time, when the template's innerHTML is set, the `!doc->IsScriptEnabled()` is true. That's the cause. We need to tweak the condition. I'd defer it to DOM team.