How can I find the prototype methods (not PrototypeJS) that have been defined using reflection? Also, how to find all defined objects and methods in the global scope?
How can I find the prototype methods (not PrototypeJS) that have been defined using
Share
the
for...intravels all the way down the prototype chain, it doesn’t garauntee any specific order, but it should loop through all the properties you’re looking for…If you are looking for only inherited (via prototype) members, add a
hasOwnProperty()check…also, I’ve never tried this but, but using
window, I believe you’d find what you are looking for…