Hi Joseph:
Not as familiar with SVG as I am with Canvas, but I am thinking that
you can likely (assuming I interpreted the documentation correctly)
hook into the SVG load event. Do investigate this, as I am not sure,
but below are a couple of sources. Take a look at SVGLoad, perhaps you
can use something like that instead of you doing the checking,
leverage if it's valid the callback that's native there.
http://www.w3.org/TR/SVG/interact.html
Then something like:
http://stackoverflow.com/questions/3883257/loading-svg-into-svgweb-dynamically-with-jquery
svg.addEventListener('SVGLoad', function() {
svg = this; // this will correctly refer to your SVG root
alert('loaded!');
}, false);
// also supported:
svg.onsvgload = function() {
alert('loaded!');
}
Best regards,
Alfredo
--
Alfredo Quiroga-Villamil
AOL/Yahoo/Gmail/MSN IM: lawwton