Tuan Anh Hoang-Vu
Tuan Anh Hoang-Vu

Reputation: 1995

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

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

Upvotes: 3

Views: 1245

Answers (1)

Nickolay
Nickolay

Reputation: 32073

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

Upvotes: 5

Related Questions