How can I reliably ask for the size (in pixels) an SVG element is taking up on the host page?
I've been down that road before. Unfortunately, most of the functions for getting the size of the
<svg> element are buggy in Firefox. The only working solution I found was using
height), which needs to be parsed (and also only works when svgElement.display == 'block', which it is in your example).
I have adopted your fiddle to work in Firefox: http://jsfiddle.net/dL5pZ/5/
Update: The issue with display 'inline' was fixed some time ago around Firefox 29.
Update 2: As mentioned in another answer,
getBoundingClientRect should also work nowadays.