问题
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