Are there any properties one can use or web tools so I could evaluate the scope of two javascript objects at runtime?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Not in a browser. The Rhino JavaScript platform gives you all kind of access to scopes and contexts though (through Java).
For what purpose do you need to access that scope?
If you want to execute a piece of code with access to properties of a certain object, you could always use
evalandwith(with their performance drawbacks included).If you want to execute code in a certain content, without the object, just define a function inside that scope that you can execute from the outside.
For example: