Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eval does not execute within the proper context when hooked #5

Open
GoogleCodeExporter opened this issue Nov 13, 2015 · 4 comments
Open

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Enable win.eval hook
2. Execute evel within the context of a function, not a window, and reference 
variables that are only valid within the function context

What is the expected output? What do you see instead?

eval command should work

What version of the product are you using? On what operating system?

eval is executed within the context of the window

Please provide any additional information below.

function x() {
  var y = 1;

  try {
    eval("y++");
  } catch(e) {}
}
var z = new x();

Not sure if the try/catch block or function creation matters.

Original issue reported on code.google.com by megazzt on 22 Jun 2011 at 3:07

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant