Untitled

 avatar
unknown
plain_text
5 months ago
481 B
4
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