schettino72 wrote:
>Why would you need that for?
I writing a unit test framework for javascript. Test cases are
defined by extending my TestCase base class.
Chance is that there is no class.
I want to automatically find all defined test cases, so I need
to introspect the code somehow.
I solved my problem putting the test cases out of my "function" and
doing
for (var o in top){
....
Given that the `in' operator is not supported before JavaScript 1.4,
JScript 5.0, ECMAScript 3, and that `top' is a host-defined property of
the Global Object, are you sure the results your test framework yields
are always correct?
PointedEars
--
var bugRiddenCrashPronePieceOfJunk = (
navigator.userAgent.indexOf('MSIE 5') != -1
&& navigator.userAgent.indexOf('Mac') != -1
) // Plone, register_function.js:16