Untitled
Anonymous
plain_text
02/13/2025 10:11 AM
644 B
20
Indexable
if (n instanceof HTMLElement && n.nextElementSibling) {
var nextElement = n.nextElementSibling;
if (nextElement.tagName.toLowerCase() === 'canvas') {
var imageid = '#' + nextElement.id;
var canvasImage = document.getElementById(nextElement.id);
console.log(canvasImage);
} else {
console.error("Next element is not a canvas.");
}
} else {
console.error("imageTmpId is not a valid element or has no next sibling.");
}
Editor is loading...
Leave a Comment