Explorar el Código

remove datasrc attribute

Gildas hace 7 años
padre
commit
e59548cf97
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      lib/single-file/lazy-loader.js

+ 1 - 1
lib/single-file/lazy-loader.js

@@ -88,7 +88,7 @@ this.lazyLoader = this.lazyLoader || (() => {
 			if (dataSrc) {
 				processElement(element);
 			}
-			element.removeAttribute("data-" + attributeName);
+			element.removeAttribute(dataAttributeName ? dataAttributeName : "data-" + attributeName);
 		});
 	}