I have the following JavaScript:
function b() {
alert(arguments.caller[0]);
}
function X(x) {
this.x = x;
}
X.prototype.a = function(i) {
b();
}
new X(10).a(5);
This will show the message "5". However, I want to show "10", i.e. in the function b I want to access the "this" property of the caller. Is this possible, and how?