I want to save in some variables the height and width of an image that is loaded through Javascript (no libraries, plugins, frameworks, etc) using your url.
img[i].addEventListener('mouseover', function(){
link = this.parentElement.href;
var w, h;
document.getElementById('thread').insertAdjacentHTML('afterbegin', '<div id="lightbox"><img src="' + link + '"></div>');
}, false);
Where the variable link is the text string of the url of the image, which I want to use to save the height and width of the image in the variables w and h with something similar to:
w = link.width;
h = link.height;