If you have a javascript interpreter running in an environment unknown
to you (as in what objects it exposes to the language) is it possible
to loop through all objects in some way?
Only by brute-force exhaustive search. I.e., no.
Javascript allows you to find only some of the properties of objects,
those that are enumerable. You find them using
for (var propName in object) { ... }
Those that are not enumerable cannot be seen except by knowing their
name. One example is Object.prototype.toString. You know it is there,
but if you didn't know its name, you wouldn't be able to find it except
by trying all strings as property names and see if they exist. Since
there are infintly many strings, that won't work. Restricting to only those
of, say, 32 letters or below, will make it a finite problem. Sadly,
the universe is probably also final, and could end before you finish
This is a non-browser environment, specifically the scripting engine
for doing xslt extensions in msxml.
That depends on that specific environment. If none of the properties it
adds are non-enumerable, then you can find them. Otherwise, you can't.
/L