revert the return value of setBackground

This commit is contained in:
Spmario233 2023-11-07 23:19:58 +08:00
parent dad7216b7a
commit 020be275ed
1 changed files with 2 additions and 1 deletions

View File

@ -8577,7 +8577,7 @@
else src=`image/${type}/${subfolder}/${name}${ext}`; else src=`image/${type}/${subfolder}/${name}${ext}`;
} }
else src=`image/${name}${ext}`; else src=`image/${name}${ext}`;
return new Promise((resolve,reject)=>{ new Promise((resolve,reject)=>{
const image=new Image(); const image=new Image();
image.src=`${lib.assetURL}${src}`; image.src=`${lib.assetURL}${src}`;
image.onload=resolve; image.onload=resolve;
@ -8607,6 +8607,7 @@
this.style.backgroundPositionX='center'; this.style.backgroundPositionX='center';
this.style.backgroundSize='cover'; this.style.backgroundSize='cover';
})); }));
return this;
} }
}); });
HTMLDivElement.prototype.setBackgroundDB=function(img){ HTMLDivElement.prototype.setBackgroundDB=function(img){