1
1
Fork 0
mirror of https://github.com/boxgaming/qbjs.git synced 2024-06-10 17:16:47 +00:00

Updated _LoadImage for consistent cross-origin behavior

This commit is contained in:
boxgaming 2022-05-06 16:57:54 -05:00
parent be5a6facde
commit 5f5d14a23d

6
qb.js
View file

@ -293,8 +293,12 @@ var QB = new function() {
};
this.func__LoadImage = async function(url) {
var res = await fetch(url);
var b = await res.blob();
var img = new Image();
img.src = url;
img.src = URL.createObjectURL(b)
while (!img.complete) {
await GX.sleep(10);
}