Test external css is applied to current document.

Test external css is applied to current document.


Is there’s a CSSApplied event that I can listen to if my javascript
code relies on CSS properties?
For example:
In an external css file I define a css class:
.test
{
width:100px;
height: 100px;
}
Then in html document I have an element <div class="test">test</div>.
Later also in this document I try to get the dimension of the the div
element.
But if the css is not applied, I got a dimension other than
100X100px.
Wonder is there any way to detect all css classes is applied?
Thanks.