是否可以为 Rhino 添加 Function.caller 支持?

发布于 2024-12-28 19:04:20 字数 109 浏览 5 评论 0原文

看看它,Rhino 不支持函数的 caller 属性 - 有谁知道是否有一个分支允许这样做,即使只是在解释器模式下?

如果没有,有人对如何添加它有任何一般想法吗?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

寄人书 2025-01-04 19:04:20

从来没有听说过 javascript 中的 Function.prototype.caller,但是有 arguments.callee.caller,根据互联网,Rhino 确实不支持它;

如果您需要获取堆栈跟踪,有一个解决方案:
http://groups.google.com/group/mozilla.dev.tech.js-engine.rhino/browse_thread/thread/a8db6d5c4c729f0e/a5f717c02af610ea?pli=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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文