I am trying to determine how to determine when an svg image is loaded in a browser. I am using Raphael JS and I have tried:
var image = paper.image(path, 0,0,10,10); image.node.addEventListener('load', function(){alert("test");});
and
$('image').on('load')
all to no avail. I also used onload and onsvgload, none of which work.
Is it possible to determine if the svg image is really uploaded?
I even tried loading the image using the Image () object and then calling paper.image () - but I get two calls to the image (instead of using the preloaded image); i.e:
var preload = new Image(); preload.src = imgPath; preload.addEventListener('load', function () { image.path = preload.src;
Any ideas?
source share