Is it possible to test in javascript if var contains an image node and if it is loaded? -


i'm passing node selections function function or function object , i'd check few things in parameters of second one.

i think should check node, property tagname set img loaded seems more dificult, image coming site , may or may not loaded.

function is_tag_img_loaded (img) {     if(img.tagname == "img" && img.loadended){         return true;     }else{ return false; } } 

the tagname check fine. can use img.complete see if loaded (and valid).


Comments