3 ms·
Something like this could work, to some degree: a = {} a.valueOf = function() { var caller = arguments.callee.caller.toString();
by russellsprouts 13y ago
Something like this could work, to some degree:
a = {}
a.valueOf = function() {
var caller = arguments.callee.caller.toString();
//parse the caller function, and return
//different values based on what comparison is being made.
}
But I think this is even worse than the getter on the global object.