Skip to content

Instantly share code, notes, and snippets.

@seanmonstar
Created January 16, 2010 03:15
Show Gist options
  • Save seanmonstar/278624 to your computer and use it in GitHub Desktop.
Save seanmonstar/278624 to your computer and use it in GitHub Desktop.
var A = new Class({
initialize: $empty,
a: function() {
return arguments.callee.caller.caller.caller._name;
},
b: function() {
console.log(this.a()); //knows 'b' called it
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment