How do I retrieve an XUL element’s actual width and height?

给你一囗甜甜゛ 提交于 2020-01-04 02:54:06

问题


I wanna get the actual width of a <xul:hbox> element for presentation. How can I get it? I see HTML element has offsetWidth attribute but I can't find this attribute in XUL element


回答1:


Using element.getBoundingClientRect() or the older element.boxObject.width.



来源:https://stackoverflow.com/questions/1997419/how-do-i-retrieve-an-xul-element-s-actual-width-and-height

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!