Open Bug 1823852 Opened 2 years ago Updated 2 years ago

img loading="lazy" doesnt seem to work in shadowdom

Categories

(Core :: DOM: Core & HTML, defect)

Firefox 111
defect

Tracking

()

UNCONFIRMED

People

(Reporter: tejashs, Unassigned)

Details

Attachments

(1 file)

Attached file test.html

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/111.0

Steps to reproduce:

Refer to the attached test.html
in the class MyImage there are two connectedCallback() functions
to switch b/w using shadowdom or not the functions can be toggled by changing name.
disable cache in devtools and reload page, monitor network tab.

Build ID 20230313175713
Distribution ID archlinux
OS Linux 6.2.7-arch1-1 #1 SMP PREEMPT_DYNAMIC Sat, 18 Mar 2023 01:06:36 +0000
OS Theme Breeze / Adwaita

Actual results:

When the custom tag uses the shadow function, all images are loaded even though loading="lazy" specified.
When using the function without shadowdom, lazy loading works as expected.

Expected results:

images should lazy load in shadowdom.
Also tested on chromium (Version 111.0.5563.64 (Official Build) Arch Linux (64-bit)
) and lazy loading works in shadowdom.

The Bugbug bot thinks this bug should belong to the 'Core::Networking' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Networking
Product: Firefox → Core
Component: Networking → DOM: Core & HTML
Severity: -- → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: