|
|
@@ -157,12 +157,13 @@ this.singlefile.lib.helper = this.singlefile.lib.helper || (() => {
|
|
|
}
|
|
|
}
|
|
|
if (element.tagName == "IMG") {
|
|
|
- element.setAttribute(IMAGE_ATTRIBUTE_NAME, data.images.length);
|
|
|
const imageData = {
|
|
|
currentSrc: elementHidden ?
|
|
|
"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" :
|
|
|
(options.loadDeferredImages && element.getAttribute(LAZY_SRC_ATTRIBUTE_NAME)) || element.currentSrc
|
|
|
};
|
|
|
+ data.images.push(imageData);
|
|
|
+ element.setAttribute(IMAGE_ATTRIBUTE_NAME, data.images.length - 1);
|
|
|
element.removeAttribute(LAZY_SRC_ATTRIBUTE_NAME);
|
|
|
computedStyle = computedStyle || win.getComputedStyle(element);
|
|
|
if (computedStyle) {
|
|
|
@@ -179,7 +180,6 @@ this.singlefile.lib.helper = this.singlefile.lib.helper || (() => {
|
|
|
imageData.objectPosition = computedStyle.getPropertyValue("object-position");
|
|
|
}
|
|
|
}
|
|
|
- data.images.push(imageData);
|
|
|
}
|
|
|
if (element.tagName == "VIDEO") {
|
|
|
if (!element.poster) {
|