Is it possible to add Function.caller support to Rhino?

与世无争的帅哥 提交于 2019-12-23 19:46:40

问题


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?


回答1:


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



来源:https://stackoverflow.com/questions/8986828/is-it-possible-to-add-function-caller-support-to-rhino

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!