fix: the loadstart event is not fired on <img> elements in Chrome

This commit is contained in:
Xmader 2020-11-30 15:26:01 -05:00
parent 7f12c76413
commit 65c1e02d8b
No known key found for this signature in database
GPG Key ID: A20B97FB9EB730E4
1 changed files with 1 additions and 1 deletions

View File

@ -83,7 +83,7 @@ export default [
format: "iife",
sourcemap: false,
banner: getBannerText,
intro: "const d =document.createElement('img');d.style.display='none';d.src='data:';d.once=false;d.setAttribute('onloadstart','if(this.once)return;this.once=true;this.remove();(' + function () {",
intro: "const d =document.createElement('img');d.style.display='none';d.src='data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==';d.once=false;d.setAttribute('onload','if(this.once)return;this.once=true;this.remove();(' + function () {",
outro: "}.toString() + ')()');document.body.prepend(d)"
},
plugins,