1 2 3 4 5 6 7 8 9 10 11 12
load(libdir + "evalInFrame.js"); function callee() { evalInFrame(1, "var x = 'success'"); } function caller(code) { eval(code); callee(); return x; } assertEq(caller('var y = "ignominy"'), "success"); assertEq(typeof x, "undefined");