getting the "this" that a function's caller was called with in JavaScript
- by David Morrissey
Is it possible to get the this that a function's caller was called with in JavaScript without passing this to the arguments in a way which supports IE as well as Firefox/Chrome et al?
For example:
var ob = {
callme: function() {
doSomething()
}
}
function doSomething() {
alert(doSomething.caller.this === ob) // how can I…