Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: improve ff handling of lazy images #11593

Merged
merged 6 commits into from
May 13, 2024
Merged

fix: improve ff handling of lazy images #11593

merged 6 commits into from
May 13, 2024

Conversation

trueadm
Copy link
Contributor

@trueadm trueadm commented May 13, 2024

Fixes #11589.

Rather than use the compiler to indicate if we should use importNode, which won't work in all browsers when inside a parent template that was used with cloneNode, we can instead apply the src and the lazy attributes after the img element is appended to the document.

Copy link

changeset-bot bot commented May 13, 2024

🦋 Changeset detected

Latest commit: 41e9766

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
svelte Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@Rich-Harris Rich-Harris merged commit b964a4c into main May 13, 2024
8 checks passed
@Rich-Harris Rich-Harris deleted the fix-lazy-img-ff branch May 13, 2024 22:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Svelte 5: <img loading="lazy"> loads eagerly in Firefox (part 2)
2 participants