sveltejs / svelte

Cybernetically enhanced web apps
https://svelte.dev
MIT License
76.98k stars 4k forks source link

fix: improve ff handling of lazy images #11593

Closed trueadm closed 2 weeks ago

trueadm commented 2 weeks ago

Fixes https://github.com/sveltejs/svelte/issues/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.

changeset-bot[bot] commented 2 weeks ago

🦋 Changeset detected

Latest commit: 41e97668fefb7f59f99e80fc2ef0a2ae8c376bca

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