|
|
@@ -28,6 +28,7 @@ this.docHelper = this.docHelper || (() => {
|
|
|
const WIN_ID_ATTRIBUTE_NAME = "data-frame-tree-win-id";
|
|
|
const IMAGE_ATTRIBUTE_NAME = "data-single-file-image";
|
|
|
const INPUT_VALUE_ATTRIBUTE_NAME = "data-single-file-value";
|
|
|
+ const LAZY_SRC_ATTRIBUTE_NAME = "data-lazy-loaded-src";
|
|
|
const IGNORED_REMOVED_TAG_NAMES = ["NOSCRIPT", "DISABLED-NOSCRIPT", "META", "LINK", "STYLE", "TITLE", "TEMPLATE", "SOURCE", "OBJECT"];
|
|
|
const REGEXP_SIMPLE_QUOTES_STRING = /^'(.*?)'$/;
|
|
|
const REGEXP_DOUBLE_QUOTES_STRING = /^"(.*?)"$/;
|
|
|
@@ -276,9 +277,9 @@ this.docHelper = this.docHelper || (() => {
|
|
|
doc.querySelectorAll("img").forEach((imageElement, imageElementIndex) => {
|
|
|
imageElement.setAttribute(imagesAttributeName(options.sessionId), imageElementIndex);
|
|
|
const imageData = {
|
|
|
- currentSrc: (options.lazyLoadImages && imageElement.getAttribute("data-lazy-loaded-src")) || imageElement.currentSrc
|
|
|
+ currentSrc: (options.lazyLoadImages && imageElement.getAttribute(LAZY_SRC_ATTRIBUTE_NAME)) || imageElement.currentSrc
|
|
|
};
|
|
|
- imageElement.removeAttribute("data-lazy-loaded-src");
|
|
|
+ imageElement.removeAttribute(LAZY_SRC_ATTRIBUTE_NAME);
|
|
|
const computedStyle = win.getComputedStyle(imageElement);
|
|
|
if (computedStyle) {
|
|
|
imageData.size = getSize(win, imageElement);
|