It varies on a test by test basis, but there are many cases where I couldn't think of a better way. However, I have run all my tests on IE9 and IE10 and obtained results that are consistent with non-script versions of the tests.  I haven't come across any issues so far when checking for width/height.  I did have some problems when I originally tried to detect background color (though not necessarily an IE issue). That prompted the move to width.