mirror of
https://github.com/ankitects/anki.git
synced 2026-01-05 18:13:56 -05:00
Start decoding images immediately
This commit is contained in:
parent
62252f7216
commit
dc2389cdf4
1 changed files with 1 additions and 0 deletions
|
|
@ -12,6 +12,7 @@ export function allImagesLoaded(): Promise<void[]> {
|
|||
function imageLoaded(img: HTMLImageElement): Promise<void> {
|
||||
if (!img.getAttribute("decoding")) {
|
||||
img.decoding = "async";
|
||||
img.decode();
|
||||
}
|
||||
return img.complete
|
||||
? Promise.resolve()
|
||||
|
|
|
|||
Loading…
Reference in a new issue