Hi everyone!
I'm trying something with no success 🙁
Let's look at the function, for example:
Game_Actor.prototype.isActor = function() {
return true;
};
I want to know the name of the function who called this one:
So I looked up and it seems that what I need is "arguments.callee.caller.name" so:
var alias = Game_Actor.prototype.isActor
Game_Actor.prototype.isActor = function() {
alias.call(this);
console.log(arguments.callee.caller.name);
};
but then I can't access the name!! nothing appears 🙁 I can access the arguments.callee.caller (it will return the code inside the function) but nothing more!!
Some help, here?!
I'm trying something with no success 🙁
Let's look at the function, for example:
Game_Actor.prototype.isActor = function() {
return true;
};
I want to know the name of the function who called this one:
So I looked up and it seems that what I need is "arguments.callee.caller.name" so:
var alias = Game_Actor.prototype.isActor
Game_Actor.prototype.isActor = function() {
alias.call(this);
console.log(arguments.callee.caller.name);
};
but then I can't access the name!! nothing appears 🙁 I can access the arguments.callee.caller (it will return the code inside the function) but nothing more!!
Some help, here?!