How to get SVG element dimensions in FireFox?

前端 未结 4 1061
轮回少年
轮回少年 2020-12-10 01:49

In most browsers, the following would work.

window.onload = function(){
    console.log( document.getElementById(\'svgElm\').getBoundingClientRect().width );         


        
4条回答
  •  春和景丽
    2020-12-10 02:34

    This Firefox bug was fixed in Firefox 33 which was released on 14 October 2014.

    See bug 530985 for details.

提交回复
热议问题