Looking at it, Rhino doesn't support the caller
property for functions - does anyone know if there is a branch that allows this, even if just in interpreter mode?
If not, does anyone have any general ideas about how this might be added?
Looking at it, Rhino doesn't support the caller
property for functions - does anyone know if there is a branch that allows this, even if just in interpreter mode?
If not, does anyone have any general ideas about how this might be added?
Never heard about Function.prototype.caller
in javascript, but there's arguments.callee.caller
, which is really unsupported in Rhino according to the Internet;
If you need to get stack traces, there's an idea for solution: http://groups.google.com/group/mozilla.dev.tech.js-engine.rhino/browse_thread/thread/a8db6d5c4c729f0e/a5f717c02af610ea?pli=1
stack
property of the JS error, anyway so I think that's ok. –
Banter arguments.callee.caller
gets parent-scope function. (function foo() { return (function bar() { return arguments.callee.caller.name) })() })() -> foo
–
Impunity © 2022 - 2024 — McMap. All rights reserved.
arguments.callee
just gives you a reference to the current function - thereforearguments.callee.caller
is getting thecaller
property of the current function. – Banter