enumerating JS API features
Posted: 01 Mar 2012, 15:22
Hi,
Anyone know how I can enumerate all the JS API functions / properties defined in the scripting environment?
I can check for existence of one using something like this:
But how do I get a list of all the functions/properties defined by JS API, from within my script, in the environment in which my script is running?
"for (i in this)" on the global scope just tells me what's in the global object. Likewise (just incase you were about to mention the enumerable flag) "Object.getOwnPropertyNames(this)" on the global scope doesn't list any of the JS API stuff either.
Any ideas?
Anyone know how I can enumerate all the JS API functions / properties defined in the scripting environment?
I can check for existence of one using something like this:
Code: Select all
if (!!chat) console("yay, we can chat");
"for (i in this)" on the global scope just tells me what's in the global object. Likewise (just incase you were about to mention the enumerable flag) "Object.getOwnPropertyNames(this)" on the global scope doesn't list any of the JS API stuff either.
Any ideas?