Merge branch 'main' into main

This commit is contained in:
Daniela Silva 2025-12-31 19:12:45 -03:00 committed by GitHub
commit c0f54842c5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View file

@ -256,6 +256,7 @@ Eltaurus <https://github.com/Eltaurus-Lt>
jariji
Francisco Esteva <fr.esteva@duocuc.cl>
Daniela Silva Rocha <daniela.silvarocha@outlook.com>
SelfishPig <https://github.com/SelfishPig>
********************

View file

@ -10,9 +10,6 @@ export function allImagesLoaded(): Promise<void[]> {
}
function imageLoaded(img: HTMLImageElement): Promise<void> {
if (!img.getAttribute("decoding")) {
img.decoding = "async";
}
return img.complete
? Promise.resolve()
: new Promise((resolve) => {
@ -31,6 +28,8 @@ function extractImageSrcs(fragment: DocumentFragment): string[] {
function createImage(src: string): HTMLImageElement {
const img = new Image();
img.src = src;
img.decoding = "async";
img.decode();
return img;
}