mirror of
https://github.com/ankitects/anki.git
synced 2026-01-07 02:53:54 -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> {
|
function imageLoaded(img: HTMLImageElement): Promise<void> {
|
||||||
if (!img.getAttribute("decoding")) {
|
if (!img.getAttribute("decoding")) {
|
||||||
img.decoding = "async";
|
img.decoding = "async";
|
||||||
|
img.decode();
|
||||||
}
|
}
|
||||||
return img.complete
|
return img.complete
|
||||||
? Promise.resolve()
|
? Promise.resolve()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue