In most browsers, the following would work.
window.onload = function(){ console.log( document.getElementById(\'svgElm\').getBoundingClientRect().width );
I've ended up falling back to the parent dimensions if SVG properties cannot be returned. Here is a demo http://jsbin.com/uzoyik/1/edit.
The relavent code is:
svg.clientWidth || svg.parentNode.clientWidth svg.clientHeight || svg.parentNode.clientHeight