apply id from jl-img to inner image element
This commit is contained in:
parent
f0e92fe024
commit
50689d2b83
1 changed files with 3 additions and 1 deletions
|
@ -27,10 +27,12 @@ class CustomImage extends HTMLElement {
|
||||||
image.setAttribute("style", this.getAttribute("style"));
|
image.setAttribute("style", this.getAttribute("style"));
|
||||||
image.setAttribute("width", this.getAttribute("width"));
|
image.setAttribute("width", this.getAttribute("width"));
|
||||||
image.setAttribute("height", this.getAttribute("height"));
|
image.setAttribute("height", this.getAttribute("height"));
|
||||||
|
image.setAttribute("id", this.getAttribute("id"));
|
||||||
image.setAttribute("loading", "lazy");
|
image.setAttribute("loading", "lazy");
|
||||||
image.setAttribute("original-src", originalURL);
|
image.setAttribute("original-src", originalURL);
|
||||||
this.appendChild(image);
|
this.appendChild(image);
|
||||||
|
|
||||||
|
this.setAttribute("id", "");
|
||||||
|
|
||||||
if(!(this.getAttribute("data-noPreview") === "true")) {
|
if(!(this.getAttribute("data-noPreview") === "true")) {
|
||||||
image.onclick = () => {
|
image.onclick = () => {
|
||||||
|
|
Loading…
Reference in a new issue